Skip to content
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

Merged
merged 37 commits into from
Apr 2, 2022

Conversation

majagrubic
Copy link
Contributor

@majagrubic majagrubic commented Mar 22, 2022

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.

For maintainers

@@ -0,0 +1,30 @@
$euiSideNavEmphasizedBackgroundColor: transparentize($euiColorLightShade, .7);
@import '@elastic/eui/src/components/side_nav/mixins';
Copy link
Contributor Author

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?

Copy link
Contributor

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.


&--xxl {
@include euiBottomShadowMedium;
@include size(100px);
Copy link
Contributor Author

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.

@majagrubic majagrubic added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) release_note:skip Skip the PR/issue when compiling release notes v8.3.0 labels Mar 23, 2022
@majagrubic majagrubic marked this pull request as ready for review March 23, 2022 13:34
@majagrubic majagrubic requested a review from a team as a code owner March 23, 2022 13:34
@majagrubic majagrubic requested a review from cchaos March 23, 2022 13:34
@majagrubic majagrubic requested review from a team as code owners March 23, 2022 15:35
@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

expected head sha didn’t match current head ref.

@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@cchaos cchaos left a 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...
Screen Recording 2022-03-30 at 03 20 14 PM

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.

@@ -0,0 +1,30 @@
$euiSideNavEmphasizedBackgroundColor: transparentize($euiColorLightShade, .7);
@import '@elastic/eui/src/components/side_nav/mixins';
Copy link
Contributor

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.

@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

@majagrubic majagrubic requested a review from cchaos March 31, 2022 13:00
@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@cchaos cchaos left a 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,
Copy link
Contributor

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'],
Copy link
Contributor

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.

Suggested change
options: ['logoObservability', 'logoSecurity'],
options: ['logoKibana', 'logoObservability', 'logoSecurity'],
defaultValue: 'logoKibana',

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataViewEditor 140 153 +13
spaces 251 264 +13
total +26

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dataViewEditor 142.8KB 154.0KB +11.2KB
spaces 257.5KB 268.6KB +11.1KB
total +22.2KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/shared-ux-components 3 4 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataViewEditor 10.6KB 10.6KB -1.0B
spaces 20.4KB 20.4KB +1.0B
total -0.0B
Unknown metric groups

API count

id before after diff
@kbn/shared-ux-components 28 32 +4

async chunk count

id before after diff
dataViewEditor 6 7 +1
spaces 16 17 +1
total +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@majagrubic majagrubic requested a review from cchaos April 1, 2022 12:41
Copy link
Contributor

@cchaos cchaos left a 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!

@majagrubic majagrubic merged commit 9709107 into elastic:main Apr 2, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 2, 2022
@majagrubic majagrubic deleted the page-template-3 branch April 2, 2022 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants