[Research] [CCI] OUI usage audit in the vis_type_table
plugin
#4162
Labels
enhancement
New feature or request
OUI compliance
Issues and PRs to maximize OUI usage and remove style and component hacks
OUI
Issues that require migration to OUI
Audit for #4099
In this plugin there is only one
.scss
file with only 4 css classes.OpenSearch-Dashboards/src/plugins/vis_type_table/public/components/table_vis_app.scss
Lines 1 to 29 in bd7d707
OpenSearch-Dashboards/src/plugins/vis_type_table/public/components/table_vis_app.tsx
Lines 46 to 64 in bd7d707
OpenSearch-Dashboards/src/plugins/vis_type_table/public/components/table_vis_component_group.tsx
Lines 25 to 34 in bd7d707
Conclusion
After looking through the plugin files, it seems like overall it is mostly using OUI with almost no native html. The only exceptions are the div containers for that use
visTable__group
andvisTable
custom styles. There are other usage of native html, but they are expected ( e.g. h3 in EuiTitle ).Also, the
flex: x y z
style is used in both containers. Currently OUI flex component do not supportflex-shrink
andflex-basis
. The same observations were made in other OUI audits. (#4122, #3966). The issue for this was already made opensearch-project/oui#776.Suggestions.
.visTable__component__title
for centering text, use already existing OUI utility classoui-textCenter
.div
containers with OUI flex components. It will also allow us to get rid of the.visTable__groupInColumns
custom styling, because theOuiFlexGroup
andOuiFlexItem
do support bothflex-direction
andalign-items
. Current solution uses classnames to dynamically change the direction by applying.visTable__groupInColumns
class to.visTable
div
container.oui-overflow*
CSS utilities oui#774.The text was updated successfully, but these errors were encountered: