Conversation
* re-orged Props.mdx files into separate pages * updated MDN links * update properties column with working links and styling * updated statuses for pages that will receive new logical properties * formatted * fix Responsive Properities story * applied Cass's feedback
…l vs Physical prop resolution (#3234) * working PoC * fix build and format * lint fixes * some more refactoring * fix existing test failures * add test for getPropertyMode * updated gamutprovider to include useLogicalProperties * fix failiing tests * more test fixes * formatted * add logicalprops switcher to toolbar * updated shorthand in margin related CSS properties * fix linting issue re: physical * update docs to show logical prop updates to margin related props * updated padding too * updated Usage Guide and clean up * add new file to explain logical and physical properties * update docs for readibility * formatted and cleaned up * fix tests and edit MockGamutProvider to use useLogicalProperties * temp fix for test failure * removed useLogicalProperties from contextValue b.c. it's not used anymore * added toolbar button for direction * address Cass's feedback
* working PoC * fix build and format * lint fixes * some more refactoring * fix existing test failures * add test for getPropertyMode * updated gamutprovider to include useLogicalProperties * fix failiing tests * more test fixes * formatted * add logicalprops switcher to toolbar * updated shorthand in margin related CSS properties * fix linting issue re: physical * update docs to show logical prop updates to margin related props * updated padding too * updated Usage Guide and clean up * add new file to explain logical and physical properties * update docs for readibility * formatted and cleaned up * fix tests and edit MockGamutProvider to use useLogicalProperties * temp fix for test failure * start on border related logical props * updated more border props * formatted * added border color props * grammar * formatted * feat(Icon): ✨ Add Live Learning Icon * chore(release): publish - @Codecademy/gamut@68.0.1 - @codecademy/gamut-icons@9.55.0 - @codecademy/gamut-kit@0.6.580 --------- Co-authored-by: Kenny Lin <kenny.lin.91@gmail.com> Co-authored-by: Hailey <hailey.robledo@skillsoft.com> Co-authored-by: codecademydev <dev@codecademy.com>
- @Codecademy/gamut@68.0.1 - @codecademy/gamut-icons@9.55.0 - @codecademy/gamut-kit@0.6.580
- @codecademy/styleguide@79.1.0
- @codecademy/styleguide@79.1.1
…l vs Physical prop resolution (#3234) * working PoC * fix build and format * lint fixes * some more refactoring * fix existing test failures * add test for getPropertyMode * updated gamutprovider to include useLogicalProperties * fix failiing tests * more test fixes * formatted * add logicalprops switcher to toolbar * updated shorthand in margin related CSS properties * fix linting issue re: physical * update docs to show logical prop updates to margin related props * updated padding too * updated Usage Guide and clean up * add new file to explain logical and physical properties * update docs for readibility * formatted and cleaned up * fix tests and edit MockGamutProvider to use useLogicalProperties * temp fix for test failure * removed useLogicalProperties from contextValue b.c. it's not used anymore * added toolbar button for direction * address Cass's feedback
|
View your CI Pipeline Execution ↗ for commit f09dace ☁️ Nx Cloud last updated this comment at |
|
* cleaned working state * fix ContentContainer test * formatted
* added logical props and provided examples * add in story * fix popover tests * forcing GHA checks * clean up some comments * fix story height * add example for overflow * new story * formatted * fix popovercontainer alignment * revert testing change
| // Merge useLogicalProperties into theme so variance can access it via props.theme | ||
| const themeWithLogicalProperties = { | ||
| ...theme, | ||
| useLogicalProperties, | ||
| }; | ||
| const content = ( | ||
| <ThemeProvider theme={theme}> | ||
| <ThemeProvider theme={themeWithLogicalProperties}> |
There was a problem hiding this comment.
i wonder if you should memoize this, ThemeProivider is kindof an expensive operation and we want to make sure it doesn't rerender for unrelated reasons
| @@ -522,7 +523,7 @@ describe('ConnectedNestedCheckboxes utils', () => { | |||
| }); | |||
|
|
|||
| it('should render an unchecked checkbox with correct props', () => { | |||
| const state = { checked: false }; | |||
| const state = { checked: false, indeterminate: false }; | |||
There was a problem hiding this comment.
i don't think you need these changes, aren't they getting indeterminate by default
There was a problem hiding this comment.
ah thanks! yea, I'll revert —
fwiw, I saw these as TS errors 🤔
but after I removed the indeterminate: false they didn't come back
so maybe just some weird package state before.
| {...popoverPosition.styles} | ||
| /* Physical inline style for centered alignments (top/bottom) where | ||
| inset-inline-start would incorrectly flip the center point in RTL */ | ||
| /* eslint-disable-next-line gamut/no-inline-style */ | ||
| style={popoverPosition.physicalStyles} |
There was a problem hiding this comment.
i'm not the biggest fan of this approach - can 't we just swap the margin prop based on direction? this RTL change probably means we need to bump up the urgency of our ticket for PopoverContainer flipping dir when its offscreen ( i think we have something like this in the backlog)
There was a problem hiding this comment.
Would you want me to revert?
I don't remember messing with margin and got hung up on the edges (top, bottom, right, left) and getting stunk this before resorting to the robot to provide an answer.
There was a problem hiding this comment.
per our discussion — will keep this, and cut a bigger ticket to address
| color: ${themed('colors.navy-700')}; | ||
| background-color: ${themed('colors.gray-100')}; | ||
| display: inline-block; | ||
| overflow-x: scroll; |
There was a problem hiding this comment.
did we move this style somewhere else?
There was a problem hiding this comment.
tbh I don't even remember how I got here... lol
but I saw this was overriding line 36 (where overflow-x was being set to auto)
Any preference? auto vs scroll?
dreamwasp
left a comment
There was a problem hiding this comment.
have a couple comments but nothing blocking 🔥
|
📬 Published Alpha Packages: |
|
🚀 Styleguide deploy preview ready! Preview URL: https://69b16c7e1fadcb397cf5400b--gamut-preview.netlify.app |
Overview
Updates
Gamut:
variance/config.tsborder*,borderWidth*,borderColor*,borderStyle*,borderRadius*,width+heightrelated CSS propsinset+overflowrelated CSS propsdirectionas a tokengetPropertyMode, to transform to resolve the correct CSS property to useuseLogicalPropsStorybook:
PR Checklist
Related PRs:
Testing Instructions
Don't make me tap the sign.
Foundations/System/Props/AboutAboutpage and the other new separated out pages/border,/color,/layout,/positioning, and/spacea. some notable examples: Menu, Popover, PopoverContainer, Tab, Tip, ConnectedForm/GridForm, DataList/DataTable
PR Links and Envs