-
Notifications
You must be signed in to change notification settings - Fork 858
[Visual Refresh] Update form layout append
/prepend
API
#9014
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
Draft
mgadewoll
wants to merge
12
commits into
elastic:feat/visual-refresh-append-prepend-updates
Choose a base branch
from
mgadewoll:inputs/351-refactor-append-prepend
base: feat/visual-refresh-append-prepend-updates
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[Visual Refresh] Update form layout append
/prepend
API
#9014
mgadewoll
wants to merge
12
commits into
elastic:feat/visual-refresh-append-prepend-updates
from
mgadewoll:inputs/351-refactor-append-prepend
Conversation
This file contains hidden or 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
- updates EuiFormControlLayout by adding a context to share props - updates EuiFormLabel to support visual-only renders as span element
This PR contains breaking changes. The opener of this pull request is asked to perform the following due diligence steps below, to assist EUI in our next Kibana upgrade:
|
ℹ️ Initial design feedback:
|
💚 Build SucceededHistory
cc @mgadewoll |
💚 Build Succeeded
History
cc @mgadewoll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Summary
closes https://github.com/elastic/eui-private/issues/351
Important
This PR merges into a feature branch.
This PR implements two new components:
EuiFormAppend
andEuiFormPrepend
.These components are meant to be passed into form layout
append
andprepend
slots to ensure a cohesive layout and styling.These two components are meant to replace the current generic slot API, but for the initial introduction this implementation ensures a backwards compatible usage to make the update process smoother. This currently means that the previous usages of passing other components to the
append
/prepend
slots still works and will results in mostly identical visual output.Once consumers are updated fully, the idea is to remove the additional style rules that ensure backwards compatibility and rely on usages of
EuiFormAppend
andEuiFormPrepend
only. Other usages would then result in unexpected visual output and indicate misusage.Changes
EuiFormAppend
andEuiFormPrepend
components (components, docs, tests)type="span"
onEuiFormLabel
to support using visual-only form labelsEuiFormControlLayout
to useEuiFormAppend
andEuiFormPrepend
EuiFormAppend
/EuiFormPrepend
as needed (EuiAutoRefresh
,EuiColorPicker
)EuiQuickSelectPopover
inEuiSuperDatePicker
to useEuiFormPrepend
: This results in more restrictedquickSelectButtonProps
as they reflectEuiFormPrepend
instead of genericEuiButtonEmpty
props.EuiColorPicker
to ensureid
is correctly passed onto the internalEuiFormControlLayout
Why are we making this change?
💅 UI consistency: This update is part of the Visual Refresh project and it's purpose is to ensure a cohesive visual output for form layout append/prepend elements.
Screenshots #
Previous "generic slot" usage
New EuiFormAppend/Prepend usage
EuiAutoRefresh
EuiSuperDatePicker
EuiColorPicker
Impact to users
quickSelectButtonProps
onEuiSuperDatePicker
maybe cause breaking changes as it reflects a more restricted prop type forEuiFormPrepend
instead ofEuiButtonEmpty
.🟢 There are no usages of
quickSelectButtonProps
onEuiSuperDatePicker
orEuiQuickSelectPopover
directly in Kibana or Cloud.ℹ️ The backwards compatibility of the changes ensures that existing Kibana usages work as expected.
We do however want to update simple Kibana usages to use
EuiFormAppend
/EuiFormPrepend
already to drive adoption. This will be done as an additional step and linked here once available.Deployment
💻 Kibana instance (credentials)
ℹ️ This instance currently does not have any usage updates yet.
QA
EuiFormAppend
/EuiFormPrepend
components and their usage inappend
/prepend
usage and ensure it matches design specs (figma, figma)append
/prepend
between feature branch and stagingappend
/prepend
in Amsterdam (feature branch, staging)EuiSuperDatePicker
's quick select button looks/works as expected (feature branch, staging)EuiAutoRefresh
looks according to new design specs (staging)EuiColorPicker
has no regression (feature branch, staging)General checklist
@default
if default values are missing) and playground togglesChecked Code Sandbox works for any docs examplesIf applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)