Skip to content

Fixes #39426 - Better ouiaId for ActionButtons on TableIndexPage#11025

Open
sambible wants to merge 1 commit into
theforeman:developfrom
sambible:fixes-39426-better-ouiaid-actionbutton-tableindexpage
Open

Fixes #39426 - Better ouiaId for ActionButtons on TableIndexPage#11025
sambible wants to merge 1 commit into
theforeman:developfrom
sambible:fixes-39426-better-ouiaid-actionbutton-tableindexpage

Conversation

@sambible

Copy link
Copy Markdown

Updates ActionButtons and TableIndexPage to better reflect the function of the various buttons that can appear on TableIndexPage based pages.

Before: ouiaId was always action-buttons-button

After: ouiaId will be one of action-buttons-create action-buttons-export or action-buttons-documentation based on the actual function of the button.

@github-actions github-actions Bot added the UI label Jun 15, 2026
@sambible sambible changed the title Fixes #39426 Better ouiaId for ActionButtons on TableIndexPage Fixes #39426 - Better ouiaId for ActionButtons on TableIndexPage Jun 15, 2026
@sambible sambible force-pushed the fixes-39426-better-ouiaid-actionbutton-tableindexpage branch from f149203 to db12ba3 Compare June 15, 2026 22:27

@qcjames53 qcjames53 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR Sam! I think the changes look pretty good to me but it needs one logic tweak to work.

<>
<Button
ouiaId="action-buttons-button"
ouiaId={firstButton.ouiaId ? undefined : "action-buttons-button"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
ouiaId={firstButton.ouiaId ? undefined : "action-buttons-button"}
ouiaId={firstButton.ouiaId || 'action-buttons-button'}

With your approach I think you'd want to use a solution like this. I believe the existing ternary doesn't work.

@sambible sambible force-pushed the fixes-39426-better-ouiaid-actionbutton-tableindexpage branch from db12ba3 to 2039322 Compare June 16, 2026 18:35
/**
* Generate a button or a dropdown of buttons
* @param {String} title The title of the button for the title and text inside the button
* @param {String} ouiaId If included, use this as the ouiaId

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One nitpick, there's a trailing space here. Would you mind deleting it please?

@sambible sambible force-pushed the fixes-39426-better-ouiaid-actionbutton-tableindexpage branch from 2039322 to af9c4d3 Compare June 16, 2026 18:55

@qcjames53 qcjames53 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks great to me, thank you!

@qcjames53

Copy link
Copy Markdown
Contributor

I don't understand why the single commit check is failing but the failing docker pulls appear unrelated.

@ianballou

Copy link
Copy Markdown
Contributor

Looks like there are some linting failures

@ianballou ianballou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be good to go once the linting is fixed

@sambible

Copy link
Copy Markdown
Author

Thanks, i need to get a precommit process setup, clearly im missing something in my env

@sambible sambible force-pushed the fixes-39426-better-ouiaid-actionbutton-tableindexpage branch from af9c4d3 to cfb4f89 Compare June 16, 2026 20:50

@ianballou ianballou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! TableIndexPage is still working.

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.

3 participants