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] EUI visual refresh for SharedUX #202780

Merged
merged 27 commits into from
Dec 12, 2024

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Dec 3, 2024

Summary

Closes #200620

  1. Remove usage of deprecated color variables
  2. Remove usage of @kbn/ui-theme
  3. A few other changes as requested by @andreadelrio

@tsullivan tsullivan force-pushed the sharedux/eui-visual-refresh-audit branch from 282c488 to 9c6ba0d Compare December 3, 2024 17:52
.euiAccordion-isOpen & {
color: ${euiTheme.colors.title};
color: ${euiTheme.colors.textHeading};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to access this UI:

guide-panel-step.mov

<EuiTabs css={{ padding: `0 ${euiThemeVars.euiSizeL}` }}>{this.renderTabs()}</EuiTabs>
<EuiTabs css={({ euiTheme }) => ({ padding: `0 ${euiTheme.size.l}` })}>
{this.renderTabs()}
</EuiTabs>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accessing this element in Kibana:

tutorial-instruction-set.mov

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might strip this change out of this PR because the Jest test that is impacted is pretty difficult to get updated.

border: `${euiTheme.border.thin}`,
color: `${euiTheme.colors.text}`,
color: `${euiTheme.colors.textParagraph}`,
Copy link
Member Author

@tsullivan tsullivan Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accessing this from Kibana:

toolbar-buttons.mov

return (
<EuiBetaBadge
label={text}
size="s"
css={css`
margin-left: ${euiTheme.size.s};
color: ${euiTheme.colors.text};
color: ${euiTheme.colors.textParagraph};
Copy link
Member Author

@tsullivan tsullivan Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we are actually using this component anywhere currently, but it could be somewhere in the navigation panel for solutions:

navigation-panels.mov

@@ -143,7 +143,7 @@ export const FileUpload = React.forwardRef<EuiFilePickerClass, Props>(
css={css`
display: flex;
align-items: center;
min-height: ${euiButtonHeightSmall};
min-height: ${euiTheme.size.xl};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this component through the developer examples. To do this, you have to run Kibana with the --run-examples flag

file-example.mov

@tsullivan tsullivan force-pushed the sharedux/eui-visual-refresh-audit branch from c63463d to a24e855 Compare December 4, 2024 23:55
@elastic elastic deleted a comment from elasticmachine Dec 4, 2024
@@ -94,7 +94,7 @@ export const QuitGuideModal = ({
onClick={deactivateGuide}
isLoading={isLoading}
fill
color="warning"
color="primary"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change request came from @andreadelrio

>
<SideNavComponentLazy {...props} />
</Suspense>
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just affects the loading state of the solution side nav. You will need to throttle the browser's network or play back a video frame-by-frame to see it.

side-nav-loading-state.mov

@@ -48,7 +48,7 @@
}
&.securitySolution {
.euiCard__image {
background-color: $euiColorSuccess;
background-color: $euiColorAccentSecondary;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

analytics-overview.mov

@tsullivan tsullivan force-pushed the sharedux/eui-visual-refresh-audit branch from abcc004 to b4798c8 Compare December 5, 2024 18:47
<EuiFlexItem
css={({ euiTheme }) => ({ marginLeft: `-${euiTheme.size.base}` })}
grow={false}
>
<EuiIconTip type="iInCircle" content={this.props.mustCopyOnSaveMessage} />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message was added by #175062. It looks like this code might no longer be reachable, as there seems to be no longer an "Edit" button when viewing managed content (tested with a managed dashboard). There is only a "Duplicate" button.

@@ -72,7 +79,7 @@ export const TagTable: FC<TagTableProps> = ({
<>
<TagBadge tag={tag} />
{tag.managed && (
<div css={{ marginLeft: euiThemeVars.euiSizeS }}>
<div css={{ marginLeft: euiTheme.size.s }}>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saved-objects-tagging-management.mov

<SideNavComponentLazy {...props} />
</Suspense>
);
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to run Kibana in serverless mode to see this. When Kibana first loads, the side navigation shows a loading icon where the navigation elements appear, similar to https://github.com/elastic/kibana/pull/202780/files#r1870452922

serverless-side-navigation.mov

@tsullivan tsullivan marked this pull request as ready for review December 5, 2024 19:26
@tsullivan tsullivan requested review from a team as code owners December 5, 2024 19:26
@tsullivan tsullivan added the release_note:skip Skip the PR/issue when compiling release notes label Dec 5, 2024
Copy link
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design changes LGTM. Thanks! I will create a follow up issue for the illustration that have hard-coded colors.

@tsullivan
Copy link
Member Author

The build metrics show large increase in module count and async chunk sizes for the imageEmbeddable and cases plugins.

I've pushed 73d9d65 to test if this has a positive impact on the build metrics. Details to come soon.

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codeowner changes lgtm

@@ -28,7 +28,7 @@ import {
import * as StatusCheckStates from './status_check_states';

import { injectI18n, FormattedMessage } from '@kbn/i18n-react';
import { euiThemeVars } from '@kbn/ui-theme';
import { euiThemeVars } from '@kbn/ui-theme'; // FIXME: remove this, and access style variables from EUI context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might be able to be rid of this, if we adopt the css style function callback on L281

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eokoneyo that works fine as a solution to remove this import, but unfortunately that has heavy impact to the Jest unit test for the src/plugins/home/public/application/components/tutorial/tutorial.test.js file. The test would need to mount the component wrapped in <EuiProvider>, which changes the structure of the component, and the tests themselves are using Enzyme and are heavily dependent on the structure of the component.

This entire plugin is on the roadmap to be rewritten into TypeScript in the next quarter. Maybe just adding this FIXME comment is the right thing to do for now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tsullivan right... it's probably best to resolve this much later then

@@ -58,7 +58,7 @@ export const GuideButton = ({
<EuiButton
isLoading={isLoading}
onClick={toggleGuidePanel}
color="success"
color="accent"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Is this expected? Or should it rather be accentSecondary? @andreadelrio
I thought accent buttons shouldn't really be used? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that we don't know for certain if we will make accentSecondary an available button given the numerous concerns raised by designers about having two greens (particularly in buttons). Therefore I think it's safer to use the accent button which has existed in the system for a long time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, yeah I think I was behind on latest button color decisions 😅 I also just saw this (message).

Copy link
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM from EUI side 👍

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #102 / Entity Manager _search API includes source and additional metadata fields

Metrics [docs]

Async chunks

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

id before after diff
canvas 1.1MB 1.1MB +18.0B
cases 491.2KB 491.2KB +12.0B
dashboard 668.3KB 668.3KB +18.0B
discover 785.8KB 785.8KB +18.0B
imageEmbeddable 70.2KB 70.2KB +17.0B
lens 1.5MB 1.5MB +18.0B
navigation 26.4KB 26.4KB +9.0B
presentationUtil 74.1KB 74.2KB +54.0B
savedObjectsTagging 46.9KB 47.0KB +13.0B
securitySolution 14.7MB 14.7MB +18.0B
serverless 27.0KB 27.0KB +9.0B
slo 851.1KB 851.1KB +18.0B
unifiedHistogram 71.4KB 71.4KB +18.0B
total +240.0B

Page load bundle

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

id before after diff
guidedOnboarding 30.2KB 30.2KB +27.0B
imageEmbeddable 6.0KB 6.0KB -54.0B
navigation 18.3KB 18.3KB -22.0B
savedObjects 18.2KB 18.1KB -76.0B
savedObjectsTagging 23.2KB 23.2KB -54.0B
serverless 15.0KB 15.0KB -26.0B
total -205.0B

History

Copy link
Contributor

@eokoneyo eokoneyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM, thanks for this!

Copy link
Contributor

@eokoneyo eokoneyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM, thanks for this!

@tsullivan tsullivan merged commit 0a38463 into elastic:main Dec 12, 2024
9 checks passed
@tsullivan tsullivan deleted the sharedux/eui-visual-refresh-audit branch December 12, 2024 19:02
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12303034965

@tsullivan tsullivan added backport:skip This commit does not require backporting and removed backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Dec 12, 2024
@tsullivan
Copy link
Member Author

Backport workflow has been cancelled

CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
## Summary

Part of elastic#200620

1. Remove usage of deprecated color variables
2. Remove usage of `@kbn/ui-theme`
3. A few other changes as requested by @andreadelrio

---------

Co-authored-by: kibanamachine <[email protected]>
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) v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SharedUX] Check integration and QA for Visual Refresh
7 participants