Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design system: Modular CSS support, Color palette, Ant theme update #5453

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Nov 4, 2024

Closes HJ-146

Description Of Changes

Adds Modular CSS support via SASS integration with NextJS. Creates new CSS module containing and exporting our custom color palette to match Figma work. Utilizes new palette to feed values in the Ant theme.

Code Changes

  • Add sass npm package, which NextJS will automatically recognize and support for CSS modules
  • Create new palette.module.scss with values input directly from the Figma palette
  • Reorder Ant theme components as alphabetical
  • Apply new palette values to the Ant theme
  • Adds notes to ant theme on priority order
  • Convert SearchBar component to use palette and global.css overrides instead of tailwind wrangling. Set as a proof-of-concept pattern to follow in the future.

Steps to Confirm

  1. Visit Data map report (http://localhost:3000/reporting/datamap) and take a look at the search component to make sure styling is correct.
  2. Visit the Ant POC page (http://localhost:3000/ant-poc) and make sure the colors still look correct

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Relevant Follow-Up Issues Created
  • Update CHANGELOG.md

Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 10:23pm

@gilluminate gilluminate force-pushed the gill/HJ-146/design-system-modular-css branch from df4aeec to ad77763 Compare November 4, 2024 16:51
Copy link

cypress bot commented Nov 4, 2024

fides    Run #10771

Run Properties:  status check passed Passed #10771  •  git commit c31ddf2839 ℹ️: Merge aa56277b1dd08ccd33176c7a7d28f591a1a67bc8 into e5f240d537c41c8ddb429f737928...
Project fides
Branch Review refs/pull/5453/merge
Run status status check passed Passed #10771
Run duration 00m 37s
Commit git commit c31ddf2839 ℹ️: Merge aa56277b1dd08ccd33176c7a7d28f591a1a67bc8 into e5f240d537c41c8ddb429f737928...
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

@gilluminate gilluminate force-pushed the gill/HJ-146/design-system-modular-css branch from ad77763 to 646a181 Compare November 4, 2024 17:26
@gilluminate gilluminate force-pushed the gill/HJ-146/design-system-modular-css branch 2 times, most recently from e951f11 to a405e1b Compare November 4, 2024 17:46
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.47%. Comparing base (e5f240d) to head (2aeddcb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5453      +/-   ##
==========================================
+ Coverage   77.00%   85.47%   +8.46%     
==========================================
  Files         384      384              
  Lines       24116    24116              
  Branches     2624     2624              
==========================================
+ Hits        18571    20612    +2041     
+ Misses       4971     2950    -2021     
+ Partials      574      554      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! This is organized very neatly. Having a single source of truth for colors is very important. The flexibility for having the palettes be used for ant overrides, but also exported as variables and TS too is going to be very helpful. Left a tiny question about base styles. Thanks for also updating the PC. Approved.

colorError: "#d9534f",
colorLink: "#2272ce",
colorBgBase: "#ffffff",
colorPrimary: palette.FIDESUI_MINOS,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean using the palette for overides.

* Adds the color variables from the palette to the root element
*/
:root {
@each $color, $value in $colors {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very helpful to have every color as a css variable.

clients/admin-ui/src/theme/tailwind.css Show resolved Hide resolved
@@ -0,0 +1,85 @@
$colors: (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With all the different libraries, utilities, etc having a single source for colors is going to be much simpler. This is great, and the added TS export of colors is just chef kiss.

clients/admin-ui/src/theme/ant.ts Show resolved Hide resolved
Comment on lines 77 to 79
- name: Build
run: npm run build

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cy:start already runs a build, so this was slowing down everything considerably building everything twice!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice optimization

@@ -1,6 +1,6 @@
{
"extends": ["//"],
"pipeline": {
"tasks": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new version update made this change automatically

}
"turbo": "^2.2.3"
},
"packageManager": "[email protected]"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turbo upgrade made all of these additions automatically

@gilluminate gilluminate force-pushed the gill/HJ-146/design-system-modular-css branch from ba49a77 to f7970bc Compare November 4, 2024 19:44
@@ -1,6 +1,6 @@
{
"$schema": "https://turbo.build/schema.v1.json",
"pipeline": {
"tasks": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turbo upgrade made this change automatically

Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for doing this, this'll make things a lot easier moving forward.

@gilluminate gilluminate force-pushed the gill/HJ-146/design-system-modular-css branch from c01a4dd to ecacfd1 Compare November 4, 2024 22:19
@gilluminate gilluminate force-pushed the gill/HJ-146/design-system-modular-css branch from ecacfd1 to aa56277 Compare November 4, 2024 22:44
@gilluminate gilluminate merged commit e3d2fe8 into main Nov 4, 2024
21 of 22 checks passed
@gilluminate gilluminate deleted the gill/HJ-146/design-system-modular-css branch November 4, 2024 23:01
Copy link

cypress bot commented Nov 4, 2024

fides    Run #10772

Run Properties:  status check passed Passed #10772  •  git commit e3d2fe8c03: Design system: Modular CSS support, Color palette, Ant theme update (#5453)
Project fides
Branch Review main
Run status status check passed Passed #10772
Run duration 00m 37s
Commit git commit e3d2fe8c03: Design system: Modular CSS support, Color palette, Ant theme update (#5453)
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants