-
Notifications
You must be signed in to change notification settings - Fork 13
feat: compact mode #536
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
feat: compact mode #536
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
172de88
refactor: use global variable for items height
5a5ae06
feat(AsideHeader): add isCompactMode prop infrastructure
a2c7473
feat(AsideHeader): add compact item height support
f760686
feat(AsideHeader): add compact collapsed width (40px)
8ad898e
feat(AsideHeader): add compact margin-inline (6px)
cbc1025
feat(AsideHeader): add compact border-radius and header divider
85a35e6
docs(AsideHeader): add isCompactMode documentation and story
5b00a07
fix: items height
4b045f6
refactor: extract getCollapsedWidth utility function
f4be484
feat: add compact divider icon for 40px navigation width
7f04de3
refactor: move compact-mode CSS variables to aside container
b87ae37
feat: add compact mode support for CollapseButton and update stories
9527df7
feat: use css variable to set --_--item-collapsed-radius
1a1003e
feat: added new test case for navigation with compact mode
71bf7b4
test: renamed test files with collapsed mode
02a0ebd
fix: wrong margin between items
1dd2afc
feat: updated font size and line height in navigation
f790efb
feat: adjust logo size by compact mode
de62acc
test: update screenshots
ec91703
feat: remove unused code
ce49ac0
fix: gaps calculation
3c92749
fix: css issue with icon margin
1423e0b
refactor: renamed some test cases and stories
deabf72
refactor: remove commented commented code
4da2228
refactor: renamed some variables for better readability
e25324b
fix: add default value for logo place when variable --_--item-height …
95c1a63
test: updated screenshot with default logo width
5ade186
feat: get back logo size for footer
f78d6cc
feat: use correct margins in logo component
c823d98
test: updated screenshots
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.43 KB
(100%)
...sual.test.tsx-snapshots/ActionBar-render-story-Showcase-dark-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.32 KB
(100%)
...visual.test.tsx-snapshots/ActionBar-render-story-Showcase-dark-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.27 KB
(100%)
...ual.test.tsx-snapshots/ActionBar-render-story-Showcase-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.43 KB
(100%)
...isual.test.tsx-snapshots/ActionBar-render-story-Showcase-light-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.35 KB
(100%)
...test.tsx-snapshots/ActionBar-render-story-SingleSection-dark-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.46 KB
(100%)
...l.test.tsx-snapshots/ActionBar-render-story-SingleSection-dark-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.33 KB
(100%)
...est.tsx-snapshots/ActionBar-render-story-SingleSection-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.42 KB
(100%)
....test.tsx-snapshots/ActionBar-render-story-SingleSection-light-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.25 KB
(100%)
....test.tsx-snapshots/ActionBar-render-story-StretchGroup-dark-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.41 KB
(100%)
...al.test.tsx-snapshots/ActionBar-render-story-StretchGroup-dark-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.22 KB
(100%)
...test.tsx-snapshots/ActionBar-render-story-StretchGroup-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.35 KB
(100%)
...l.test.tsx-snapshots/ActionBar-render-story-StretchGroup-light-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1.66 KB
(100%)
...st.tsx-snapshots/AsideHeader-render-story-AdvancedUsage-dark-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.49 KB
(100%)
...test.tsx-snapshots/AsideHeader-render-story-AdvancedUsage-dark-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.7 KB
(110%)
...t.tsx-snapshots/AsideHeader-render-story-AdvancedUsage-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.66 KB
(100%)
...est.tsx-snapshots/AsideHeader-render-story-AdvancedUsage-light-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+150 KB
...-snapshots/AsideHeader-render-story-CollapsedNavigation-dark-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+213 KB
...sx-snapshots/AsideHeader-render-story-CollapsedNavigation-dark-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+146 KB
...snapshots/AsideHeader-render-story-CollapsedNavigation-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+209 KB
...x-snapshots/AsideHeader-render-story-CollapsedNavigation-light-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-148 KB
...ual.test.tsx-snapshots/AsideHeader-render-story-Compact-dark-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-211 KB
...isual.test.tsx-snapshots/AsideHeader-render-story-Compact-dark-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-145 KB
...al.test.tsx-snapshots/AsideHeader-render-story-Compact-light-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-207 KB
...sual.test.tsx-snapshots/AsideHeader-render-story-Compact-light-webkit-linux.png
Binary file not shown.
Binary file added
BIN
+100 KB
...sx-snapshots/AsideHeader-render-story-CompactItemSizing-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+107 KB
....tsx-snapshots/AsideHeader-render-story-CompactItemSizing-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+98.4 KB
...x-snapshots/AsideHeader-render-story-CompactItemSizing-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+108 KB
...tsx-snapshots/AsideHeader-render-story-CompactItemSizing-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.41 KB
(100%)
...tsx-snapshots/AsideHeader-render-story-CustomBackground-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.58 KB
(100%)
...t.tsx-snapshots/AsideHeader-render-story-CustomBackground-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.46 KB
(100%)
...sx-snapshots/AsideHeader-render-story-CustomBackground-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+2.27 KB
(100%)
....tsx-snapshots/AsideHeader-render-story-CustomBackground-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.67 KB
(100%)
...test.tsx-snapshots/AsideHeader-render-story-CustomTheme-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.87 KB
(100%)
...l.test.tsx-snapshots/AsideHeader-render-story-CustomTheme-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.66 KB
(100%)
...est.tsx-snapshots/AsideHeader-render-story-CustomTheme-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+2.48 KB
(100%)
....test.tsx-snapshots/AsideHeader-render-story-CustomTheme-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+25 Bytes
(100%)
...al.test.tsx-snapshots/AsideHeader-render-story-Fallback-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(100%)
...sual.test.tsx-snapshots/AsideHeader-render-story-Fallback-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.48 KB
(100%)
...test.tsx-snapshots/AsideHeader-render-story-HeaderAlert-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.42 KB
(100%)
...l.test.tsx-snapshots/AsideHeader-render-story-HeaderAlert-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.43 KB
(100%)
...est.tsx-snapshots/AsideHeader-render-story-HeaderAlert-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+2.16 KB
(100%)
....test.tsx-snapshots/AsideHeader-render-story-HeaderAlert-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.63 KB
(100%)
...-snapshots/AsideHeader-render-story-HeaderAlertCentered-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.53 KB
(100%)
...sx-snapshots/AsideHeader-render-story-HeaderAlertCentered-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.55 KB
(100%)
...snapshots/AsideHeader-render-story-HeaderAlertCentered-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+2.28 KB
(100%)
...x-snapshots/AsideHeader-render-story-HeaderAlertCentered-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.49 KB
(100%)
...sx-snapshots/AsideHeader-render-story-HeaderAlertCustom-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.54 KB
(100%)
....tsx-snapshots/AsideHeader-render-story-HeaderAlertCustom-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.37 KB
(100%)
...x-snapshots/AsideHeader-render-story-HeaderAlertCustom-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.98 KB
(100%)
...tsx-snapshots/AsideHeader-render-story-HeaderAlertCustom-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+3.36 KB
(100%)
...l.test.tsx-snapshots/AsideHeader-render-story-LineClamp-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+3.04 KB
(100%)
...ual.test.tsx-snapshots/AsideHeader-render-story-LineClamp-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+4.13 KB
(100%)
....test.tsx-snapshots/AsideHeader-render-story-LineClamp-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+5 KB
(100%)
...al.test.tsx-snapshots/AsideHeader-render-story-LineClamp-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.7 KB
(100%)
....tsx-snapshots/AsideHeader-render-story-MultipleTooltip-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.19 KB
(100%)
...st.tsx-snapshots/AsideHeader-render-story-MultipleTooltip-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.42 KB
(100%)
...tsx-snapshots/AsideHeader-render-story-MultipleTooltip-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.99 KB
(100%)
...t.tsx-snapshots/AsideHeader-render-story-MultipleTooltip-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.59 KB
(100%)
...al.test.tsx-snapshots/AsideHeader-render-story-Showcase-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.67 KB
(100%)
...sual.test.tsx-snapshots/AsideHeader-render-story-Showcase-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.52 KB
(100%)
...l.test.tsx-snapshots/AsideHeader-render-story-Showcase-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
+2.62 KB
(100%)
...ual.test.tsx-snapshots/AsideHeader-render-story-Showcase-light-webkit-linux.png
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,24 +5,11 @@ | |
| height: 100%; | ||
| padding: var(--g-spacing-4) var(--g-spacing-6); | ||
| box-sizing: border-box; | ||
| --gn-aside-header-item-expanded-radius: 6px; | ||
| --gn-aside-header-item-expanded-radius: #{variables.$item-expanded-radius}; | ||
| --_--item-height: #{variables.$item-height}; | ||
|
|
||
| &__content { | ||
| overflow: auto; | ||
| flex: 1; | ||
| } | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why these styles were removed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because they're unused |
||
| &__discoverable-feature-wrapper { | ||
| display: flex; | ||
| } | ||
|
|
||
| &__menu-group { | ||
| width: 100%; | ||
| margin-inline: 10px; | ||
|
|
||
| &:not(:last-child) { | ||
| padding-bottom: var(--g-spacing-2); | ||
| border-bottom: 1px solid var(--g-color-line-generic); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why is this variable no longer needed?
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.
Because I use the
--_--item-heightinstead