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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4c02548
[SharedUX] Migrate PageTemplate > SolutionNavAvatar
Mar 23, 2022
b0c2032
[SharedUX] Migrate PageTemplate > NoDataPage > ActionCards
Mar 18, 2022
2664372
[SharedUX] Migrate PageTemplate > NoDataPage > SolutionNav
Mar 22, 2022
6756004
Updating snapshot
Mar 22, 2022
95387f2
Fix i18n
Mar 22, 2022
ab4e3b2
Fix index.tsx
Mar 23, 2022
b4a9f0f
Fix failing test
Mar 23, 2022
9b8877b
Remove unnecessary export
Mar 23, 2022
347e401
Change folder structure of solution_nav_avatar
Mar 23, 2022
f6d818c
[SharedUX] Migrate PageTemplate > NoDataPage > ActionCards
Mar 18, 2022
30534ea
[SharedUX] Migrate PageTemplate > NoDataPage > SolutionNav
Mar 22, 2022
ec2aa19
Updating snapshot
Mar 22, 2022
c476398
Fix index.tsx
Mar 23, 2022
db9f0c7
Fix failing test
Mar 23, 2022
8df73d7
Remove unnecessary export
Mar 23, 2022
418595e
Merge branch 'main' into page-template-3
Mar 23, 2022
372840f
Fix comment
Mar 23, 2022
88fba5a
Renaming component
Mar 23, 2022
6b47699
Fix folder structure
Mar 23, 2022
44c5039
Fix storybook
Mar 23, 2022
b65b050
Style fix
Mar 23, 2022
dcbffa4
Merge SolutionAvatar changes
Mar 23, 2022
96859b2
Fix SolutionAvatar reference
Mar 24, 2022
b6515ba
Resolving merge conflicts
Mar 25, 2022
0f9f73d
Merge branch 'main' into page-template-3
kibanamachine Mar 25, 2022
f713bae
Fix failing test
Mar 25, 2022
3e772af
Fix failing snapshot
Mar 25, 2022
8bf163d
Merge branch 'main' into page-template-3
kibanamachine Mar 28, 2022
b3b98b5
Merge branch 'main' into page-template-3
kibanamachine Mar 30, 2022
329bc92
Applying PR comments
Mar 31, 2022
5e67940
Updating failing snapshot
Mar 31, 2022
3c1179c
Extract i18n
Mar 31, 2022
1b5ef2d
Merge branch 'main' into page-template-3
kibanamachine Mar 31, 2022
41ffd07
collapsed > isCollapsed
Mar 31, 2022
f2f082f
Merge branch 'main' into page-template-3
kibanamachine Mar 31, 2022
973d86a
Applying PR comments
Apr 1, 2022
4f4c217
Merge branch 'page-template-3' of https://github.com/majagrubic/kiban…
Apr 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/kbn-shared-ux-components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,23 @@ export const LazyIconButtonGroup = React.lazy(() =>
*/
export const IconButtonGroup = withSuspense(LazyIconButtonGroup);

/**
* The lazily loaded `KibanaPageTemplateSolutionNav` component that is wrapped by the `withSuspense` HOC. Consumers should use
* `React.Suspense` or `withSuspense` HOC to load this component.
*/
export const KibanaPageTemplateSolutionNavLazy = React.lazy(() =>
import('./page_template/solution_nav').then(({ KibanaPageTemplateSolutionNav }) => ({
default: KibanaPageTemplateSolutionNav,
}))
);

/**
* A `KibanaPageTemplateSolutionNav` component that is wrapped by the `withSuspense` HOC. This component can
* be used directly by consumers and will load the `KibanaPageTemplateSolutionNavLazy` component lazily with
* a predefined fallback and error boundary.
*/
export const KibanaPageTemplateSolutionNav = withSuspense(KibanaPageTemplateSolutionNavLazy);

/**
* The Lazily-loaded `KibanaSolutionAvatar` component. Consumers should use `React.Suspense` or
* the withSuspense` HOC to load this component.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export type { KibanaPageTemplateSolutionNavProps } from './solution_nav';
export { KibanaPageTemplateSolutionNav } from './solution_nav';
export type { KibanaPageTemplateSolutionNavCollapseButtonProps } from './solution_nav_collapse_button';
export { KibanaPageTemplateSolutionNavCollapseButton } from './solution_nav_collapse_button';
Original file line number Diff line number Diff line change
@@ -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.


// Put the page background color in the flyout version too
.kbnPageTemplateSolutionNav__flyout {
background-color: $euiPageBackgroundColor;
}

.kbnPageTemplateSolutionNav {
@include euiSideNavEmbellish;
@include euiYScroll;

@include euiBreakpoint('m' ,'l', 'xl') {
width: 248px;
padding: $euiSizeL;
}

.kbnPageTemplateSolutionNavAvatar {
margin-right: $euiSize;
}
}

.kbnPageTemplateSolutionNav--hidden {
pointer-events: none;
opacity: 0;

@include euiCanAnimate {
transition: opacity $euiAnimSpeedFast $euiAnimSlightResistance;
}
}
Loading