-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[SharedUX] EUI visual refresh for SharedUX #202780
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
Changes from all commits
e58f61a
ea3654b
57be122
e33c2ca
abc049b
c3704f1
74bf238
7a70b81
1b69f1c
b4798c8
9a7a624
cb86d84
f2338db
d9fdff3
21dba67
221f8b4
b793f95
4d9f373
7ef630b
06778d3
ddf07f5
46ea1b4
73d9d65
fb95f53
06858e7
d5ee36b
ec429d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| { | ||
| "type": "shared-common", | ||
| "type": "shared-browser", | ||
| "id": "@kbn/shared-ux-button-toolbar", | ||
| "owner": [ | ||
| "@elastic/appex-sharedux" | ||
| ], | ||
| "group": "platform", | ||
| "visibility": "shared" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,9 +24,9 @@ export const ToolbarButtonStyles = ({ euiTheme }: UseEuiTheme) => { | |
| borderColor: euiTheme.border.color, | ||
| }, | ||
| emptyButton: { | ||
| backgroundColor: euiTheme.colors.emptyShade, | ||
| backgroundColor: euiTheme.colors.backgroundBasePlain, | ||
| border: `${euiTheme.border.thin}`, | ||
| color: `${euiTheme.colors.text}`, | ||
| color: `${euiTheme.colors.textParagraph}`, | ||
|
||
| }, | ||
| buttonPositions: { | ||
| left: { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,14 +25,13 @@ export const LabelBadge = ({ | |
| className?: string; | ||
| }) => { | ||
| const { euiTheme } = useEuiTheme(); | ||
|
|
||
| return ( | ||
| <EuiBetaBadge | ||
| label={text} | ||
| size="s" | ||
| css={css` | ||
| margin-left: ${euiTheme.size.s}; | ||
| color: ${euiTheme.colors.text}; | ||
| color: ${euiTheme.colors.textParagraph}; | ||
|
||
| vertical-align: middle; | ||
| margin-bottom: ${euiTheme.size.xxs}; | ||
| `} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| { | ||
| "type": "shared-common", | ||
| "type": "shared-browser", | ||
| "id": "@kbn/shared-ux-file-picker", | ||
| "owner": [ | ||
| "@elastic/appex-sharedux" | ||
| ], | ||
| "group": "platform", | ||
| "visibility": "shared" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| { | ||
| "type": "shared-common", | ||
| "type": "shared-browser", | ||
| "id": "@kbn/shared-ux-file-upload", | ||
| "owner": [ | ||
| "@elastic/appex-sharedux" | ||
| ], | ||
| "group": "platform", | ||
| "visibility": "shared" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,27 +7,30 @@ | |
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| import { css } from '@emotion/react'; | ||
| import React from 'react'; | ||
| import useObservable from 'react-use/lib/useObservable'; | ||
|
|
||
| import { | ||
| EuiText, | ||
| EuiSpacer, | ||
| EuiFlexItem, | ||
| EuiFlexGroup, | ||
| EuiFilePicker, | ||
| EuiFlexGroup, | ||
| EuiFlexItem, | ||
| EuiSpacer, | ||
| EuiText, | ||
| useEuiTheme, | ||
| useGeneratedHtmlId, | ||
| mathWithUnits, | ||
| } from '@elastic/eui'; | ||
| import type { | ||
| EuiFilePickerClass, | ||
| EuiFilePickerProps, | ||
| } from '@elastic/eui/src/components/form/file_picker/file_picker'; | ||
| import { euiThemeVars } from '@kbn/ui-theme'; | ||
|
|
||
| import { useBehaviorSubject } from '@kbn/shared-ux-file-util'; | ||
| import { css } from '@emotion/react'; | ||
| import useObservable from 'react-use/lib/useObservable'; | ||
| import { i18nTexts } from './i18n_texts'; | ||
| import { ControlButton, ClearButton } from './components'; | ||
|
|
||
| import { ClearButton, ControlButton } from './components'; | ||
| import { useUploadState } from './context'; | ||
| import { i18nTexts } from './i18n_texts'; | ||
|
|
||
| export interface Props { | ||
| meta?: unknown; | ||
|
|
@@ -41,8 +44,6 @@ export interface Props { | |
| className?: string; | ||
| } | ||
|
|
||
| const { euiFormMaxWidth, euiButtonHeightSmall } = euiThemeVars; | ||
|
|
||
| const styles = { | ||
| horizontalContainer: css` | ||
| display: flex; | ||
|
|
@@ -79,12 +80,15 @@ export const FileUpload = React.forwardRef<EuiFilePickerClass, Props>( | |
| const id = useGeneratedHtmlId({ prefix: 'filesFileUpload' }); | ||
| const errorId = `${id}_error`; | ||
|
|
||
| // FIXME: add a token for this on euiTheme.components. https://github.com/elastic/eui/issues/8217 | ||
| const formMaxWidth = mathWithUnits(euiTheme.size.base, (x) => x * 25); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This copies the @elastic/eui-team is there a way we can access this through the EUI context?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ We're introducing a new token for it |
||
|
|
||
| return ( | ||
| <div | ||
| data-test-subj="filesFileUpload" | ||
| css={[ | ||
| css` | ||
| max-width: ${fullWidth ? '100%' : euiFormMaxWidth}; | ||
| max-width: ${fullWidth ? '100%' : formMaxWidth}; | ||
| `, | ||
| fullWidth ? styles.fullWidth : undefined, | ||
| compressed ? styles.horizontalContainer : undefined, | ||
|
|
@@ -143,7 +147,7 @@ export const FileUpload = React.forwardRef<EuiFilePickerClass, Props>( | |
| css={css` | ||
| display: flex; | ||
| align-items: center; | ||
| min-height: ${euiButtonHeightSmall}; | ||
| min-height: ${euiTheme.size.xl}; | ||
|
||
| `} | ||
| size="s" | ||
| color="danger" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ export const GuideButton = ({ | |
| <EuiButton | ||
| isLoading={isLoading} | ||
| onClick={toggleGuidePanel} | ||
| color="success" | ||
| color="accent" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Is this expected? Or should it rather be
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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). |
||
| fill | ||
| size="s" | ||
| data-test-subj="guideButton" | ||
|
|
@@ -97,7 +97,7 @@ export const GuideButton = ({ | |
| return ( | ||
| <EuiButton | ||
| onClick={navigateToLandingPage} | ||
| color="success" | ||
| color="accent" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. setup-guide-button.mov |
||
| fill | ||
| size="s" | ||
| data-test-subj="guideButtonRedirect" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,17 +17,21 @@ export const getGuidePanelStepStyles = (euiTheme: EuiThemeComputed, stepStatus: | |
| height: 24px; | ||
| border-radius: 50%; | ||
| border: 2px solid | ||
| ${stepStatus === 'inactive' ? euiTheme.colors.lightShade : euiTheme.colors.success}; | ||
| ${stepStatus === 'inactive' ? euiTheme.colors.borderBasePlain : euiTheme.colors.success}; | ||
| font-weight: ${euiTheme.font.weight.medium}; | ||
| text-align: center; | ||
| line-height: 1.4; | ||
| color: ${stepStatus === 'inactive' ? euiTheme.colors.subduedText : euiTheme.colors.text}; | ||
| color: ${stepStatus === 'inactive' | ||
| ? euiTheme.colors.textSubdued | ||
| : euiTheme.colors.textParagraph}; | ||
| `, | ||
| stepTitle: css` | ||
| font-weight: ${euiTheme.font.weight.semiBold}; | ||
| color: ${stepStatus === 'inactive' ? euiTheme.colors.subduedText : euiTheme.colors.text}; | ||
| color: ${stepStatus === 'inactive' | ||
| ? euiTheme.colors.textSubdued | ||
| : euiTheme.colors.textParagraph}; | ||
| .euiAccordion-isOpen & { | ||
| color: ${euiTheme.colors.title}; | ||
| color: ${euiTheme.colors.textHeading}; | ||
|
||
| } | ||
| `, | ||
| description: css` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,7 +94,7 @@ export const QuitGuideModal = ({ | |
| onClick={deactivateGuide} | ||
| isLoading={isLoading} | ||
| fill | ||
| color="warning" | ||
| color="primary" | ||
|
||
| > | ||
| {i18n.translate('guidedOnboarding.quitGuideModal.quitButtonLabel', { | ||
| defaultMessage: 'Quit guide', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 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?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tsullivan right... it's probably best to resolve this much later then |
||
|
|
||
| class InstructionSetUi extends React.Component { | ||
| constructor(props) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ | |
| } | ||
| &.securitySolution { | ||
| .euiCard__image { | ||
| background-color: $euiColorSuccess; | ||
| background-color: $euiColorAccentSecondary; | ||
|
||
| } | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,34 +8,34 @@ | |
| */ | ||
|
|
||
| import { css } from '@emotion/react'; | ||
| import { euiThemeVars } from '@kbn/ui-theme'; | ||
| import React, { Suspense, type FC } from 'react'; | ||
| import { EuiSkeletonRectangle } from '@elastic/eui'; | ||
| import { EuiSkeletonRectangle, useEuiTheme } from '@elastic/eui'; | ||
| import { i18n } from '@kbn/i18n'; | ||
|
|
||
| import type { Props as NavigationProps } from './side_navigation'; | ||
|
|
||
| const SideNavComponentLazy = React.lazy(() => import('./side_navigation')); | ||
|
|
||
| export const SideNavComponent: FC<NavigationProps> = (props) => ( | ||
| <Suspense | ||
| fallback={ | ||
| <EuiSkeletonRectangle | ||
| css={css` | ||
| margin: ${euiThemeVars.euiSize}; | ||
| `} | ||
| width={16} | ||
| height={16} | ||
| borderRadius="s" | ||
| contentAriaLabel={i18n.translate( | ||
| 'navigation.sideNavigation.loadingSolutionNavigationLabel', | ||
| { | ||
| defaultMessage: 'Loading solution navigation', | ||
| } | ||
| )} | ||
| /> | ||
| } | ||
| > | ||
| <SideNavComponentLazy {...props} /> | ||
| </Suspense> | ||
| ); | ||
| export const SideNavComponent: FC<NavigationProps> = (props) => { | ||
| const { euiTheme } = useEuiTheme(); | ||
| return ( | ||
| <Suspense | ||
| fallback={ | ||
| <EuiSkeletonRectangle | ||
| css={css` | ||
| margin: ${euiTheme.size.base}; | ||
| `} | ||
| width={16} | ||
| height={16} | ||
| borderRadius="s" | ||
| contentAriaLabel={i18n.translate( | ||
| 'navigation.sideNavigation.loadingSolutionNavigationLabel', | ||
| { defaultMessage: 'Loading solution navigation' } | ||
| )} | ||
| /> | ||
| } | ||
| > | ||
| <SideNavComponentLazy {...props} /> | ||
| </Suspense> | ||
| ); | ||
|
||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,6 @@ | |
| "@kbn/config-schema", | ||
| "@kbn/i18n", | ||
| "@kbn/std", | ||
| "@kbn/ui-theme", | ||
| ], | ||
| "exclude": [ | ||
| "target/**/*", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,6 @@ import { FormattedMessage } from '@kbn/i18n-react'; | |
| import React from 'react'; | ||
| import { EuiText } from '@elastic/eui'; | ||
| import { i18n } from '@kbn/i18n'; | ||
| import { euiThemeVars } from '@kbn/ui-theme'; | ||
|
|
||
| export interface OnSaveProps { | ||
| newTitle: string; | ||
|
|
@@ -405,7 +404,10 @@ export class SavedObjectSaveModal extends React.Component<Props, SaveModalState> | |
| /> | ||
| </EuiFlexItem> | ||
| {this.props.mustCopyOnSaveMessage && ( | ||
| <EuiFlexItem css={{ marginLeft: `-${euiThemeVars.euiSize}` }} grow={false}> | ||
| <EuiFlexItem | ||
| css={({ euiTheme }) => ({ marginLeft: `-${euiTheme.size.base}` })} | ||
| grow={false} | ||
| > | ||
| <EuiIconTip type="iInCircle" content={this.props.mustCopyOnSaveMessage} /> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| </EuiFlexItem> | ||
| )} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,25 @@ | ||
| { | ||
| "extends": "../../../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "outDir": "target/types", | ||
| "outDir": "target/types" | ||
| }, | ||
| "include": ["common/**/*", "public/**/*", "server/**/*"], | ||
| "include": [ | ||
| "common/**/*", | ||
| "public/**/*", | ||
| "server/**/*", | ||
| // Emotion theme typing | ||
| "../../../typings/emotion.d.ts" | ||
| ], | ||
| "kbn_references": [ | ||
| "@kbn/core", | ||
| "@kbn/data-plugin", | ||
| "@kbn/i18n", | ||
| "@kbn/data-views-plugin", | ||
| "@kbn/i18n-react", | ||
| "@kbn/ui-theme", | ||
| "@kbn/react-kibana-mount", | ||
| "@kbn/test-jest-helpers", | ||
| "@kbn/test-jest-helpers" | ||
| ], | ||
| "exclude": [ | ||
| "target/**/*", | ||
| "target/**/*" | ||
| ] | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
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.
settings-bottom-bar.mov