[Research] OUI Compliance Audit of dev_tools
plugin
#4160
Labels
enhancement
New feature or request
OSCI
Open Source Contributor Initiative
OUI compliance
Issues and PRs to maximize OUI usage and remove style and component hacks
OUI
Issues that require migration to OUI
Audit of #4078
The
dev_tools
plugin has 1 Sass file:index.scss
:OpenSearch-Dashboards/src/plugins/dev_tools/public/index.scss
Lines 8 to 34 in bd7d707
The plugin does not contain
img
,span
HTML tags, but usesmain
,div
tags.OpenSearch-Dashboards/src/plugins/dev_tools/public/application.tsx
Lines 156 to 209 in bd7d707
The plugin has a component
DevToolsWrapper
, which mostly usesOUI
library components and occasionally uses HTML tags for wrapping:OpenSearch-Dashboards/src/plugins/dev_tools/public/application.tsx
Lines 81 to 88 in bd7d707
devApp__container
,devApp
classes are identical:OpenSearch-Dashboards/src/plugins/dev_tools/public/index.scss
Lines 8 to 17 in bd7d707
These could be replaced by adding some properties to
EuiFlexGroup
andEuiFlexItem
, however, OUI doesn't allow editingflex-shrink
orflex-basis
onEuiFlexItem
.devAppWrapper
can be easily replaced byEuiFlexGroup
andEuiFlexItem
s using their corresponding properties likedisplay
,direction
,grow
:OpenSearch-Dashboards/src/plugins/dev_tools/public/index.scss
Lines 19 to 23 in bd7d707
devAppTabs
can also be replaced byEuiFlexGroup
andEuiFlexItem
. AlthoughEuiFlexGroup
does not haveflex-flow
property it can be replaced by using bothdirection
andwrap
properties, sinceOpenSearch-Dashboards/src/plugins/dev_tools/public/index.scss
Lines 30 to 34 in bd7d707
devAppDataSourcePicker
is used to add margin and min-width:OpenSearch-Dashboards/src/plugins/dev_tools/public/index.scss
Lines 25 to 28 in bd7d707
I found
EuiPanel
withpadding
-related property, but could not findmargin
-related property in components. We could uselogicalShorthandCSS
, but suppose it might still require HTML tag: https://elastic.github.io/eui/#/theming/sizing/utilities#logicalConclusion
EuiFlexItem
to modifyflex-shrink
andflex-basis
;devAppWrapper
,devAppTabs
with OUI library items;The text was updated successfully, but these errors were encountered: