Skip to content

Fixes #39562 - Update eslint-plugin-rules require-ouiaid with PF5 components - #11117

Merged
MariaAga merged 1 commit into
theforeman:developfrom
lfu:39562_require_ouiaid_pf5
Aug 11, 2026
Merged

MariaAga merged 1 commit into
theforeman:developfrom
lfu:39562_require_ouiaid_pf5

Conversation

@lfu

@lfu lfu commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor
  • Update require-ouiaid eslint rule for PatternFly 5 compatibility
  • Added: MenuToggle (PF5 replacement for DropdownToggle) and ClipboardCopy (existing PF component, previously missing from the list)
  • Add additional option parameter to extend the defaults list without overriding them
  • Sort component list alphabetically

Test plan

  • Verify the rule catches missing ouiaId on newly added components (e.g. MenuToggle):
cp /home/vagrant/foreman/script/lint/@theforeman/eslint-plugin-rules/require-ouiaid.js \
   /home/vagrant/foreman/node_modules/@theforeman/eslint-plugin-rules/lib/require-ouiaid.js
cd /home/vagrant/foreman
npx eslint \
  --plugin @theforeman/rules \
  --rule '@theforeman/rules/require-ouiaid: error' \
  ../foreman_rh_cloud/webpack/
  • Verify the additional option works to extend defaults:
cat > /home/vagrant/foreman/ouiaid-test.json << 'EOF'
{
  "parser": "babel-eslint",
  "plugins": ["@theforeman/rules"],
  "rules": {
    "@theforeman/rules/require-ouiaid": ["error", { "additional": ["MyExtraComponent"] }]
  }
}
EOF
cd /home/vagrant/foreman
npx -c ouiaid-test.json ../foreman_rh_cloud/webpack/

List of OUIA-compliant PatternFly components:

@lfu
lfu force-pushed the 39562_require_ouiaid_pf5 branch 2 times, most recently from de0d891 to c431876 Compare July 28, 2026 17:49
@lfu

lfu commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Test failure not related to the ouiaId eslint rule change.

@lfu
lfu force-pushed the 39562_require_ouiaid_pf5 branch from c431876 to 810b467 Compare July 28, 2026 19:58
@github-actions github-actions Bot added the UI label Jul 28, 2026
Comment thread script/lint/@theforeman/eslint-plugin-rules/require-ouiaid.js
Comment thread script/lint/@theforeman/eslint-plugin-rules/require-ouiaid.js

@MariaAga MariaAga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webpack/assets/javascripts/react_app/components/common/ClipboardCopy/index.js Also imports ClipboardCopy from pf5 so it should have a ouiaid

@lfu

lfu commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@MariaAga Anything else to update?

@MariaAga

MariaAga commented Aug 3, 2026

Copy link
Copy Markdown
Member

@lfu I dont see my comment addressed in the PR

webpack/assets/javascripts/react_app/components/common/ClipboardCopy/index.js Also imports ClipboardCopy from pf5 so it should have a ouiaid

@lfu
lfu force-pushed the 39562_require_ouiaid_pf5 branch from 85b05d4 to aef3c10 Compare August 3, 2026 16:02
@lfu

lfu commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@MariaAga Updated.
Test failure seems unrelated. It passed locally.

@MariaAga MariaAga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM, had a quick look (with packit) at hosts, host and new token page to make sure nothing weird is happening, and all works well

@MariaAga
MariaAga merged commit 363d718 into theforeman:develop Aug 11, 2026
43 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants