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

KUI -> EUI conversion guide #15529

Closed
cjcenizal opened this issue Dec 11, 2017 · 1 comment
Closed

KUI -> EUI conversion guide #15529

cjcenizal opened this issue Dec 11, 2017 · 1 comment
Assignees
Labels
discuss Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.

Comments

@cjcenizal
Copy link
Contributor

cjcenizal commented Dec 11, 2017

Codemods

@bmcconaghy suggested using codemods to perform as many of these migrations as possible. He'll own the initiative for learning how to use this and similar tools effectively.

base.less classes

This conversion is complicated by the presence of kui prefixed classes in base.less. I'll add notes for these classes in a separate section below.

Kibana UI Framework

KuiActionItem

Use EuiFlexGroup.

KuiBadge

Use EuiBadge.

KuiBar

Use EuiFlexGroup.

KuiButton

Use EuiButton.

KuiButtonGroup

@snide Will create a EuiButtonGroup component.

KuiCard

Use EuiCard (in progress).

KuiCardGroup

Use EuiFlexGroup. Create a pattern for this.

KuiCodeEditor

Use EuiCodeEditor.

KuiCollapseButton

Use EuiButtonIcon.

KuiColorPicker

Use EuiColorPicker. Needs to be migrated to EUI.

KuiColumn

Use EuiFlexGroup and EuiFlexGrid.

KuiContextMenu

Use EuiContextMenu.

KuiEmptyTablePrompt

Use EuiFlexGroup. Create a pattern for this.

KuiEvent

No longer in use

KuiEventMenu

No longer in use

KuiExpression

Use EuiExpression.

KuiFlex

Use EuiFlexGroup, etc.

KuiForm

Use EuiFormRow wherever possible for groups of labels, inputs, and validation/explanatory text.

  • KuiLabel -> EuiFormLabel
  • KuiTextInput -> EuiFieldText
  • KuiAssistedInput -> Check with @snide
  • KuiSearchInput -> EuiFieldSearch
  • KuiStaticInput -> EuiText
  • KuiTextArea -> EuiTextArea
  • KuiCheckBox -> EuiCheckbox
  • KuiSelect -> EuiSelect

KuiFieldGroup

Use EuiFlexGroup.

KuiGallery

Use EuiPanel. Create a pattern for this. Needs a Eui component for the individual item from @snide.

KuiHeaderBar

Use EuiFlexGroup.

KuiIcon

Use EuiIcon.

KuiInfoButton

Use EuiButtonIcon.

KuiInfoPanel

Use EuiCallOut.

KuiKeyboardAccessible

Use EuiKeyboardAccessible.

KuiLink

Use EuiLink.

KuiLocalNav

KuiLocalNav is actually comprised of a number of components.

  • KuiLocalNav
  • KuiLocalNavRow
  • KuiLocalNavRowSection
  • KuiLocalTab
  • KuiLocalTabs
  • KuiLocalTitle

We'll have to retain these components until we can migrate our global navigation to EuiHeader. We'll keep these inside of the ui_framework directory until we find a better place for them (e.g. inside of kibana/src).

KuiMenu

Try using EuiTable, but make sure that the lack of a header doesn't create accessibility problems for screen readers.

KuiMenuButton

Use small EuiButton.

KuiMicroButton, KuiMicroButtonGroup

Use EuiButtonIcon and EuiFlexGroup.

KuiModal

Use EuiModal.

KuiPager

Use EuiPagination.

KuiPanel

Use EuiPanel. Needs some elaboration regarding titling and other content.

KuiPanelSimple

Use EuiPanel.

KuiPopover

Use EuiPopover.

KuiScreenReaderOnly

Use EuiScreenReaderOnly.

KuiStatusText

Use EuiFlexGroup.

KuiTable

Use EuiTable.

KuiListingTable and kuiControlledTable are essentially just a KuiTable plus KuiToolBar. So the KuiTable can be converted to EuiTable and KuiToolBar into EuiFieldSearch, EuiContextMenu, and EuiPagination.

KuiTabs

Use EuiTabs.

KuiToggleButton

Use EuiAccordion.

KuiToolBar

Remove entirely. Use EuiFieldSearch, EuiContextMenu, and EuiPagination instead. Create demo.

KuiTypography

  • KuiTitle -> EuiTitle (large)
  • KuiSubTitle -> EuiTitle (default)
  • KuiTextTItle -> EuiTitle (small)
  • KuiText -> EuiText
  • KuiSubText -> EuiText (extra small)
  • KuiSubduedType -> EuiText and <EuiTextColor color="secondary">

KuiVerticalRhythm

Use EiuSpacer to create gaps. How do the sizes correlate?

base.less kui classes

kuiFormSection

kuiFormSubSection

kuiFormLabel

Replace this class with euiFormLabel.

Use EuiFormRow wherever possible for groups of labels, inputs, and validation/explanatory text.

kuiFormSubLabel

kuiOptionLabel

kuiFormPanel

kuiFormSubLabel

kuiInputNote

kuiList, kuiListItem

kuiSideBar

kuiSideBarSelect

kuiSideBarInput

kuiSideBarSection

kuiSideBarSectionTitle

kuiSideBarCollapsibleTitle

kuiSideBarFormSectionTitle

kuiSideBarFormRow

kuiSideBarOptionsLink

@cjcenizal
Copy link
Contributor Author

Pretty sure we don't need this any more. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.
Projects
None yet
Development

No branches or pull requests

2 participants