Skip to content

chore: Finalize drawer animation and visual design #3482

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

Merged
merged 31 commits into from
May 13, 2025

Conversation

at-susie
Copy link
Member

@at-susie at-susie commented May 7, 2025

Description

This PR:

  • applies the latest visual design decision including gap background color and new icons
  • fixes width animation issues when a global drawer enters a view

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@at-susie at-susie marked this pull request as ready for review May 9, 2025 09:00
@at-susie at-susie requested a review from a team as a code owner May 9, 2025 09:00
@at-susie at-susie requested review from johannes-weber and georgylobko and removed request for a team and johannes-weber May 9, 2025 09:00

> .global-drawer-wrapper {
display: grid;
min-inline-size: var(#{custom-props.$drawerSize});
Copy link
Member

Choose a reason for hiding this comment

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

min-inline-size and inline-size have already been set for the parent element. Why do we need to set them twice?

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot 2025-05-13 at 12 01 07
The inline-size seems unnecessary, but the min-inline-size is necessary, otherwise it has an unwanted width changing behavior when it's entering like the attached image.

@@ -140,4 +98,124 @@ $global-drawer-expanded-mode: #{awsui.$motion-duration-refresh-only-slow} #{awsu
display: flex;
align-items: center;
}

&.drawer-global {
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: When I tried to commit the changes from your patch file, our internal linter pointed out specificity conflicts. So I needed to move the whole block to bottom.

Copy link
Member

Choose a reason for hiding this comment

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

That should not be a case. These style were there before, eslint should be happy with them


> .global-drawer-wrapper {
inline-size: 100%;
grid-template-columns: 8px 1fr;
Copy link
Member

Choose a reason for hiding this comment

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

Can we replace this magic number with a token?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the callout. Updated and pushed the fix


> .global-drawer-wrapper {
display: grid;
min-inline-size: var(#{custom-props.$drawerSize});
Copy link
Member

Choose a reason for hiding this comment

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

The question still stands: do we really need to set the inline size twice? Based on our earlier discussion, we agreed that it’s not necessary

Copy link
Member Author

Choose a reason for hiding this comment

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

While inline-size is not necessary, which I removed, the min-inline-size is still necessary otherwise the unwanted width change happens.

Uploading Screen Recording 2025-05-13 at 15.54.49.mov…

Copy link
Member

Choose a reason for hiding this comment

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

Ok, should we remove min-inline-size from the parent selector then?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, I removed it in this commit

@at-susie at-susie merged commit f66e7d7 into feat/expandable-drawer May 13, 2025
39 checks passed
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.

2 participants