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

fix: Color Mode BoxShadow for cards #2849

Merged
merged 8 commits into from
Mar 29, 2024
Merged

fix: Color Mode BoxShadow for cards #2849

merged 8 commits into from
Mar 29, 2024

Conversation

j10sanders
Copy link
Contributor

@j10sanders j10sanders commented Mar 15, 2024

@j10sanders j10sanders requested a review from dreamwasp March 15, 2024 23:52
Copy link
Contributor

@dreamwasp dreamwasp left a comment

Choose a reason for hiding this comment

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

this is a very clever solution -- don't have any comment right now minus the need for a lint-ignore on line 103! will ✅ once i've tested in mono + monolith

@j10sanders j10sanders changed the title Fix: Color Mode BoxShadow for cards fix: Color Mode BoxShadow for cards Mar 18, 2024
@j10sanders j10sanders marked this pull request as ready for review March 18, 2024 16:18
@j10sanders j10sanders requested a review from a team as a code owner March 18, 2024 16:18
@j10sanders j10sanders requested a review from dreamwasp March 18, 2024 18:49
@j10sanders
Copy link
Contributor Author

@dreamwasp I haven't done extensive QA but it does fix the homepage issue

Screen.Recording.2024-03-18.at.7.16.52.PM.mov

@j10sanders
Copy link
Contributor Author

@dreamwasp I added preview envs to the description

Copy link
Contributor

@dreamwasp dreamwasp left a comment

Choose a reason for hiding this comment

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

pending monorepo errors being cleared

outline?: boolean;
mode: ColorModes;
Copy link
Contributor

Choose a reason for hiding this comment

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

seeing test failures in the monorepo here related to this line -maybe happening on initial load before useColorModes has a chance to return the mode? two solutions i can think of are 1. making light the default mode before if mode doesn't exist yet or 2. making mode not required here (tho having a default fallback might be safer)

Copy link
Contributor

@dreamwasp dreamwasp left a comment

Choose a reason for hiding this comment

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

left notes on mono PR to sync packages there

@j10sanders
Copy link
Contributor Author

left notes on mono PR to sync packages there

should be fixed now! Happy to pair on QA as well

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://6604750ad4a2fd46b2605063--gamut-preview.netlify.app

Deploy Logs

@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]

Copy link
Contributor

@dreamwasp dreamwasp left a comment

Choose a reason for hiding this comment

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

QA's and looked perfect minus the one small bug with DynamicCardWrapper i pointed out in my comment

boxShadow: `-8px 8px 0 currentColor`,
},
},
outline: outlineStyles(mode),
Copy link
Contributor

Choose a reason for hiding this comment

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

this DynamicCardWrapper variant appears to be broken in dark mode:

jon.mov

i think we only need to theme-sensitive outlineStyles in the variant(s) / CardWrapper components.

when i apply a variant they work more the way I'd expect them to (and the white variant is perfect). tested locally with the hyper variant:

jon2.mov

@j10sanders
Copy link
Contributor Author

Great catch. I believe it is all fixed here.

Video of the new functionality
https://github.com/Codecademy/gamut/assets/11084414/b44087f3-fafc-4f3c-909e-50763e97d3d8

With variant=hyper (to be sure it doesn't break variant):
https://github.com/Codecademy/gamut/assets/11084414/ae6371d7-dece-45f2-a578-0133bf478520

Copy link
Contributor

@dreamwasp dreamwasp left a comment

Choose a reason for hiding this comment

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

lgtm!

@j10sanders j10sanders added the Ship It :shipit: Automerge this PR when possible label Mar 29, 2024
@codecademydev codecademydev merged commit bd84e2b into main Mar 29, 2024
19 of 21 checks passed
@codecademydev codecademydev deleted the js-card-color-modes branch March 29, 2024 16:48
@codecademydev codecademydev removed the Ship It :shipit: Automerge this PR when possible label Mar 29, 2024
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