Skip to content

Commit

Permalink
feat(HMS-3574): add script to search compliant components
Browse files Browse the repository at this point in the history
This change add two helper scripts, one to locate ouiaId compliant
components places; the other one where ouiaId is used.

See: https://www.patternfly.org/developer-resources/open-ui-automation/#ouia-compliant-patternfly-5-components

As migration to PF5 is coming, we have added the reference the PF5
compliant components. The script match the list from the above link.

Co-authored-by: Akshay Adhikari <[email protected]>
Signed-off-by: Alejandro Visiedo <[email protected]>
  • Loading branch information
avisiedo and aadhikar committed Feb 12, 2024
1 parent 0bec4c5 commit 533930e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
39 changes: 39 additions & 0 deletions scripts/sh/search-ouia-compliant.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# See: https://www.patternfly.org/developer-resources/open-ui-automation/#ouia-compliant-patternfly-5-components
# See: https://github.com/podengo-project/idmsvc-frontend/pull/28

opts=(-HRn)

# react-core package # Prefix to use on ouiaId attribute
opts+=(-e \<Alert) # Alert
opts+=(-e \<Breadcrumb) # Breadcrumb
opts+=(-e \<Button) # Button|Link
opts+=(-e \<Card) # Card
opts+=(-e \<Checkbox) # Checkbox
opts+=(-e \<Chip) # Chip
opts+=(-e \<Dropdown) # Dropdown
opts+=(-e \<DropdownItem) # Dropitem
opts+=(-e \<FormSelect) # Select
opts+=(-e \<Menu) # Menu
opts+=(-e \<Modal) # Modal
opts+=(-e \<Navigation) # Nav
opts+=(-e \<NavExpandable) # Navexpandable
opts+=(-e \<NavItem) # Navitem
opts+=(-e \<Pagination) # Pagination
opts+=(-e \<Radio) # Radio
opts+=(-e \<Select) # Select
opts+=(-e \<Switch) # Switch
opts+=(-e \<TabContent) # Tabcontent
opts+=(-e \<Tabs) # Tabs
opts+=(-e \<Text) # Text
opts+=(-e \<TextInput) # Textinput
opts+=(-e \<Title) # Title
opts+=(-e \<Toolbar) # Toolbar

# react-table package
opts+=(-e \<Table) # Table
opts+=(-e \<Tr) # Tr

# Launch the search
grep "${opts[@]}" src/
15 changes: 15 additions & 0 deletions scripts/sh/search-ouiaid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Quick script to collect all the places where the ouiaId
# is used (for compliant components), and directly used
# data-ouia-component-id attribute (expanded for the compliant
# components), to wrap the no compliant components that we
# want to select by ouiaId

opts=()

opts+=(-e ouiaId)
opts+=(-e data-ouia-component-id)

grep -HRn "${opts[@]}" src/

0 comments on commit 533930e

Please sign in to comment.