-
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 > NoDataPage > SolutionNav #128277
Conversation
@@ -0,0 +1,30 @@ | |||
$euiSideNavEmphasizedBackgroundColor: transparentize($euiColorLightShade, .7); | |||
@import '@elastic/eui/src/components/side_nav/mixins'; |
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 don't think this should be imported like this. Is it acceptable to just copy the relevant styling as js constants and use them here?
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.
The mixin was created by EUI specifically to be used in multiple Elastic products, we don't want to duplicate styles because then they'll get out of sync. This method of importing has been fine and eventually will get converted to a JS hook. So it's ok for now.
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.tsx
Show resolved
Hide resolved
|
||
&--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 for? I haven't been able to find its appropriate definition in eui
codebase.
87fe426
to
505654d
Compare
@elasticmachine merge upstream |
expected head sha didn’t match current head ref. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
The story for the navigation toggle is very odd, is there any way you make it seem more appropriate? Just by going there I don't understand why it's so big, what it's for, or what it's supposed to do...
Maybe it just doesn't make sense for it to have it's own story at all since it does nothing outside of the context of the actual solution nav. You could instead add more story controls to the sidenav based on isOpenOnDesktop
and/or onCollapse
.
packages/kbn-shared-ux-components/src/page_template/solution_nav/assets/texture.svg
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,30 @@ | |||
$euiSideNavEmphasizedBackgroundColor: transparentize($euiColorLightShade, .7); | |||
@import '@elastic/eui/src/components/side_nav/mixins'; |
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.
The mixin was created by EUI specifically to be used in multiple Elastic products, we don't want to duplicate styles because then they'll get out of sync. This method of importing has been fine and eventually will get converted to a JS hook. So it's ok for now.
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.stories.tsx
Outdated
Show resolved
Hide resolved
...ges/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav_collapse_button.tsx
Outdated
Show resolved
Hide resolved
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.tsx
Show resolved
Hide resolved
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.tsx
Outdated
Show resolved
Hide resolved
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.tsx
Outdated
Show resolved
Hide resolved
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.stories.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Last few thoughts
name, | ||
icon, | ||
items, | ||
isOpenOnDesktop = true, |
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.
We can try it this way, but I'm thinking there was a reason the default needed to be false when it gets controlled by the page side bar.
}, | ||
icon: { | ||
control: { type: 'radio' }, | ||
options: ['logoObservability', 'logoSecurity'], |
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.
Ah sorry, I thought the name
was hooked up to pass all the way through to the Avatar, but it doesn't. So let's also add the Kibana option and make selected by default.
options: ['logoObservability', 'logoSecurity'], | |
options: ['logoKibana', 'logoObservability', 'logoSecurity'], | |
defaultValue: 'logoKibana', |
packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.stories.tsx
Outdated
Show resolved
Hide resolved
…into page-template-3
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
To update your PR or re-run it, just comment with: |
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.
Thanks for the changes. LGTM!
Summary
This is continuation of migrating
PageTemplate
components. The components have been migrated almost as-is, including .sass files, as they use a lot of mixins that haven't been transformed into appropriate hooks. Some comments inline.Depends on: #128386
Checklist
Delete any items that are not applicable to this PR.
- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker listFor maintainers