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

Expose width and height of nimble-dialog & add tokens #1553

Merged
merged 17 commits into from
Nov 3, 2023

Conversation

stefanc18
Copy link
Contributor

@stefanc18 stefanc18 commented Sep 20, 2023

Pull Request

🤨 Rationale

#1117

👩‍💻 Implementation

  • Performed the tasks that are enumerated in the issue linked above.
  • Create 2 tokens for the existing (small) dialog: width & max-height
  • Create 2 tokens for the large dialog: width & height
  • Have the small dialog as the default (width & max-height of small dialog; height set to fit-content, this was the default height that was applied to the dialog until now)
  • Added storybook documentation.

🧪 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

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@stefanc18 stefanc18 changed the title Users/sciuprin/dialog width height Expose width and height of nimble-dialog & add tokens Sep 20, 2023
@stefanc18 stefanc18 marked this pull request as ready for review September 21, 2023 08:43
@jattasNI
Copy link
Contributor

@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).

image

elevation3BoxShadow
elevation3BoxShadow,
dialogSmallWidth,
dialogSmallMaxHeight
Copy link
Member

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.

Copy link
Member

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:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Member

@rajsite rajsite left a 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!

@rajsite rajsite merged commit 5207a2a into main Nov 3, 2023
12 checks passed
@rajsite rajsite deleted the users/sciuprin/dialog-width-height branch November 3, 2023 23:06
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