-
Notifications
You must be signed in to change notification settings - Fork 8
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
Expose width and height of nimble-dialog & add tokens #1553
Conversation
…in/dialog-width-height
change/@ni-nimble-components-1e4a5579-af4c-4960-8cfc-32d8417d1a34.json
Outdated
Show resolved
Hide resolved
…in/dialog-width-height
@stefanc18 based on your recent updates it looks like this is ready for reviewers to take another look. In future you can signal this by re-requesting review (I did this already in this case but let us know if you're still working on it). |
elevation3BoxShadow | ||
elevation3BoxShadow, | ||
dialogSmallWidth, | ||
dialogSmallMaxHeight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MaxHeight is a new token suffix and should be added to the list: https://github.com/ni/nimble/blob/main/packages/nimble-components/src/theme-provider/design-token-names.ts#L243
Note the comment at the top, it should come before Height in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, that will result in you needing to add an entry here as well:
const tokenTemplates: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
packages/nimble-components/src/dialog/tests/dialog-matrix.stories.ts
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/dialog/tests/dialog-matrix.stories.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up on the feedback, it's getting close!
…in/dialog-width-height
packages/nimble-components/src/dialog/tests/dialog-matrix.stories.ts
Outdated
Show resolved
Hide resolved
…in/dialog-width-height
Pull Request
🤨 Rationale
#1117
👩💻 Implementation
fit-content
, this was the default height that was applied to the dialog until now)🧪 Testing
Manually thorugh the storybook tests & matrix tests in chromatic. The sizes are configurable in the storybook similarly to how the width is configurable for the nimble drawer. For the matrix tests, I added 2 stories: one for the small dialog and one for the large dialog: https://www.chromatic.com/build?appId=60e89457a987cf003efc0a5b&number=7776
✅ Checklist