-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[UserMenu] Allow activator content to be passed in Top bar menu #8953
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
da0cb34
chore: update top bar menu to accept activatorcontent prop; title typ…
zakwarsame 5388afb
changeset
zakwarsame 44dcfc0
remove ul
zakwarsame 9a068d2
rename activator content to custom activator
zakwarsame 6e771f6
add custom activator story to topbar
zakwarsame 5b74e1c
make usermenu popover full height
zakwarsame 4f90a0b
make new activator internal
zakwarsame 1867425
make new activator internal
zakwarsame c8b3a5c
add new "with message" story
zakwarsame cb653c3
use import as type
zakwarsame af3c8da
update changeset content
zakwarsame 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
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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@shopify/polaris': minor | ||
| --- | ||
|
|
||
| - Added `customActivator` prop to `TopBar.UserMenu` | ||
| - Added support for setting a `ReactNode ` on `ActionList` `Section` `title` |
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
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
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.
Can we just name this
activator?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.
I think since the majority of the props map to the built-in activator, it might be confusing (name, avatar, accessibilityLabel, initials, detail) since the other components with an
activatorprop don't render their own internally.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.
Agree ^. Also, there's a default activator already; passing a new one would be customizing it.
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.
Fair enough! We do have a custom activator on the Sheet component which follows the
activator?but it works slightly differently and is also a deprecated component so I'm fine with setting a new standard hereUh oh!
There was an error while loading. Please reload this page.
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.
Oh I thought Sheet's activator prop was analogous to Modal's 👀. In any case, bringing the related convo from other PR here:
Ah okay! In that case, should we:
customActivatorprop, since the pattern is being updated across the board?logoprop that renders aThumbnailto the right of thename(instead of anavataron the left) when provided, and makeinitialsoptional?Uh oh!
There was an error while loading. Please reload this page.
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.
@chloerice
Making it an internal layout change is a good idea. Although I think we still need the
customActivatorprop because the release for the store switcher change is set for Editions; and also, Plus stores will not have their layout changed even after the release.I think this depends on how much flexibility we'll want in Polaris. We can allow for both of them to be optional in a
prefix/suffixtype of way like we do inActionList. On the other hand if we want to be stricter, we can just use one internal layout, and then allow thecustomActivatorprop for the other one-off situations. For this case theavatarprop already acts as a logo since it takes in aurlthat can be passed to theAvatarcomponent.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.
Sounds like what you have is th ebest way to move forward 💯
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.
Thank you! FYI, I've made the new layout change internal and will temporarily pass in the old activator as
customActivatoruntil launch.