-
Notifications
You must be signed in to change notification settings - Fork 58
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
Use smaller and compressed varients of buttons and form components #2068
Conversation
@ps48 @mengweieric can one of you folks review this and help get it merged? |
@@ -14,7 +14,7 @@ interface EUISwitch { | |||
} | |||
export const ConfigSwitch: React.FC<EUISwitch> = ({ label, disabled, checked, handleChange }) => ( | |||
<Fragment key={`config-switch-${label}`}> | |||
<EuiFormRow label={label}> | |||
<EuiCompressedFormRow label={label}> | |||
<EuiSwitch |
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.
Should this be changed to a compressed switch?
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.
Nah; it already has the compressed attrib.
@@ -50,7 +50,7 @@ export const ConfigTreemapParentFields = ({ | |||
{obj.label !== '' ? obj.label : `Parent ${index + 1}`} | |||
</EuiLink> | |||
</EuiText> | |||
<EuiButtonIcon | |||
<EuiSmallButtonIcon | |||
color="subdued" | |||
iconType="cross" | |||
aria-label="clear-field" |
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.
should icon size prop be removed on line 57?
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.
No. EuiSmallButtonIcon
only imposes the size
prop and iconSize
should be maintained.
@@ -64,7 +64,7 @@ export const ConfigTreemapParentFields = ({ | |||
<EuiSpacer size="s" /> | |||
<EuiPanel className="panelItem_button" grow> | |||
<EuiText size="s">{addButtonText}</EuiText> | |||
<EuiButtonIcon | |||
<EuiSmallButtonIcon | |||
iconType="plusInCircle" | |||
aria-label="clear-field" | |||
iconSize="s" |
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.
Same comment as above
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.
EuiSmallButtonIcon
only imposes the size
prop and iconSize
should be maintained.
@@ -85,15 +85,15 @@ export const GridHeader = ({ | |||
/> | |||
</EuiFlexItem> | |||
<EuiFlexItem style={{ maxWidth: GRID_HEADER_COLUMN_MAX_WIDTH }}> | |||
<EuiButtonEmpty | |||
<EuiSmallButtonEmpty | |||
iconSize="s" |
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.
remove icon size?
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.
No.
@@ -45,7 +45,7 @@ export function LatencyTrendCell({ | |||
<EuiText size="s">{traceGroupName}</EuiText> | |||
</EuiFlexItem> | |||
<EuiFlexItem grow={false}> | |||
<EuiButtonIcon |
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.
Import should be changed?
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.
Minor comments
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
@AMoo-Miki Can you please update the 4 snapshots that are failing. |
Can we wait on merging this until #2063 gets approved/merged? |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-observability/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-observability/backport-2.x
# Create a new branch
git switch --create backport/backport-2068-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 69d12cee1b0e43869d078e30cc996e9d685e44a9
# Push it to GitHub
git push --set-upstream origin backport/backport-2068-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-observability/backport-2.x Then, create a pull request where the |
…pensearch-project#2068) * Use EuiSmallButton Signed-off-by: Miki <[email protected]> * Use EuiSmallButtonIcon Signed-off-by: Miki <[email protected]> * Use EuiSmallButtonEmpty Signed-off-by: Miki <[email protected]> * Use EuiCompressedFormRow Signed-off-by: Miki <[email protected]> * Use EuiCompressedField* Signed-off-by: Miki <[email protected]> * Use EuiCompressedSelect and EuiCompressedSuperSelect Signed-off-by: Miki <[email protected]> * Use EuiCompressedFilePicker Signed-off-by: Miki <[email protected]> * Use EuiCompressedRadio and EuiCompressedRadioGroup Signed-off-by: Miki <[email protected]> * Use EuiCompressedSwitch Signed-off-by: Miki <[email protected]> * Use EuiCompressedEuiTextArea Signed-off-by: Miki <[email protected]> * Use EuiCompressedComboBox Signed-off-by: Miki <[email protected]> * Use EuiSmallFilterButton Signed-off-by: Miki <[email protected]> * Undo unnecessary EuiSmallButton* uses Signed-off-by: Miki <[email protected]> * Use EuiCompressedSuperDatePicker Signed-off-by: Miki <[email protected]> * Fix tests and snapshots Signed-off-by: Miki <[email protected]> * Fix tests and snapshots Signed-off-by: Miki <[email protected]> --------- Signed-off-by: Miki <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
…pensearch-project#2068) * Use EuiSmallButton Signed-off-by: Miki <[email protected]> * Use EuiSmallButtonIcon Signed-off-by: Miki <[email protected]> * Use EuiSmallButtonEmpty Signed-off-by: Miki <[email protected]> * Use EuiCompressedFormRow Signed-off-by: Miki <[email protected]> * Use EuiCompressedField* Signed-off-by: Miki <[email protected]> * Use EuiCompressedSelect and EuiCompressedSuperSelect Signed-off-by: Miki <[email protected]> * Use EuiCompressedFilePicker Signed-off-by: Miki <[email protected]> * Use EuiCompressedRadio and EuiCompressedRadioGroup Signed-off-by: Miki <[email protected]> * Use EuiCompressedSwitch Signed-off-by: Miki <[email protected]> * Use EuiCompressedEuiTextArea Signed-off-by: Miki <[email protected]> * Use EuiCompressedComboBox Signed-off-by: Miki <[email protected]> * Use EuiSmallFilterButton Signed-off-by: Miki <[email protected]> * Undo unnecessary EuiSmallButton* uses Signed-off-by: Miki <[email protected]> * Use EuiCompressedSuperDatePicker Signed-off-by: Miki <[email protected]> * Fix tests and snapshots Signed-off-by: Miki <[email protected]> * Fix tests and snapshots Signed-off-by: Miki <[email protected]> --------- cherry-picked 69d12ce Signed-off-by: Miki <[email protected]>
…2068) (#2080) * Use EuiSmallButton * Use EuiSmallButtonIcon * Use EuiSmallButtonEmpty * Use EuiCompressedFormRow * Use EuiCompressedField* * Use EuiCompressedSelect and EuiCompressedSuperSelect * Use EuiCompressedFilePicker * Use EuiCompressedRadio and EuiCompressedRadioGroup * Use EuiCompressedSwitch * Use EuiCompressedEuiTextArea * Use EuiCompressedComboBox * Use EuiSmallFilterButton * Undo unnecessary EuiSmallButton* uses * Use EuiCompressedSuperDatePicker * Fix tests and snapshots * Fix tests and snapshots --------- cherry-picked 69d12ce Signed-off-by: Miki <[email protected]>
Description
Replace instances of
EuiButton
that don't have an explicit sizing attribute toEuiSmallButton*
.Replace instances of
Eui<form elements>
that don't have density attributes toEuiCompressed<form elements>
.Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.