-
Notifications
You must be signed in to change notification settings - Fork 842
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
[Emotion] Convert EuiHeader and EuiHeaderLogo #6878
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2d9b2b4
Combine global and Amsterdam and Sass vars
cee-chen 95c89a0
Set up `header.styles.ts`
cee-chen 482b3ae
Set up `euiHeaderVariables` and convert more shared CSS
cee-chen 2579e63
Convert position styles to Emotion
cee-chen 252a935
Convert default and dark theme styles to Emotion
cee-chen 8f9c0e8
[EuiHeader] Convert tests to RTL
cee-chen 198fb7a
Remove unused `euiHeaderProfile` Sass
cee-chen 5836c4d
[EuiHeaderLogo] Clean up CSS
cee-chen f5b0146
[EuiHeaderLogo] Convert to Emotion
cee-chen cdb6c66
[EuiHeaderLogo] Update tests
cee-chen f1d8bed
[EuiHeaderLogo] Reorganize files into its own subdirectory
cee-chen 5cb9358
Add storybook stories
cee-chen 4e4b7b6
Delete Sass files
cee-chen 5c39b09
changelog
cee-chen 6002fbd
Merge branch 'main' into emotion/header
cee-chen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
// Components | ||
@import 'mixins'; | ||
|
||
@import 'header'; | ||
@import 'header_profile'; | ||
@import 'header_links/index'; | ||
@import 'header_logo'; | ||
@import 'header_alert/index'; | ||
@import 'header_section/index'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { EuiHeader, EuiHeaderProps } from './header'; | ||
|
||
const meta: Meta<EuiHeaderProps> = { | ||
title: 'EuiHeader', | ||
component: EuiHeader, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<EuiHeaderProps>; | ||
|
||
export const Playground: Story = { | ||
args: { | ||
position: 'static', | ||
theme: 'default', | ||
}, | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Was the change from
width: 320
towidth: 300
intentional? I see it inheader/header_alert.tsx
as well but just wanted to be sure.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.
Yes, this was intentional and was caused by the removed
.euiHeaderProfile
className below. That class was setting some padding, but could have been replaced bypanelPaddingSize
without requiring custom CSS. Doing so means there's extra width now however, so I reduced it slightly to a nice round number.The width honestly doesn't really matter and is just an implementation detail/example - it also only affects this specific example and not consumer usage.