-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[SharedUX] Migrate PageTemplate > SolutionNavAvatar #128386
Conversation
|
||
&--xxl { | ||
@include euiBottomShadowMedium; | ||
@include size(100px); |
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.
what is this mixin? I haven't managed to find its definition in eui
codebase. is it needed?
@include euiBottomShadowSmall; | ||
|
||
&--xxl { | ||
@include euiBottomShadowMedium; |
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.
this is the reason this can't be turned into emotion just yet.
className | ||
)} | ||
size={size === 'xxl' ? 'xl' : size} | ||
iconSize={size} |
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.
this is a reason for ts-ignore
and it's the weirdest typescript error I have seen.
@elasticmachine merge upstream |
- Better usage example in storybook - Added missing `color=“plain”` - Added iconType={`logo${rest.name}`} to attempt to create the logo
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.
Passed you a commit and have one possible enhancement question
/** | ||
* Any EuiAvatar size available, or `xxl` for custom large, brand-focused version | ||
*/ | ||
size?: EuiAvatarProps['size'] | 'xxl'; |
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.
Is there any way we can utilize home's FeatureCatalogueSolution
type here to require a Solution to pass to the name
and iconType
props of EuiAvatar? I really like the idea of strongly typing this usage to only be allowed specifically for solutions.
Something like:
size?: EuiAvatarProps['size'] | 'xxl'; | |
size?: EuiAvatarProps['size'] | 'xxl'; | |
solution: FeatureCatalogueSolution; |
Then:
<EuiAvatar
...
name={solution.name}
iconType={solution.icon}
/>
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 like the idea, but unfortunately, that interface is only exported from the plugin, and we can't be adding dependencies on plugins here. But we have a tracking issue for that, so can add it there and change once (if 😬 ) the types are exported in a package.
… page-template-3-2 # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Public APIs missing exports
Unknown metric groupsAPI count
async chunk count
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Migrate
SolutionNavAvatar
fromkibana_react
tosharedUXComponents
. This component was originally undersolution_nav
module and was calledsolution_nav_avatar
. @cchaos pointed out this is a standalone component that can live on its own and would better be called justSolutionAvatar
, as it has outgrown its original purpose of being used just inside the solution navbar. Besides renaming, no major changes from thekibana_react
component. The .sass for this component needs to stay for now (see comment inline).Checklist
Delete any items that are not applicable to this PR.
For maintainers