Skip to content

[#72242] Workflows UX improvement: Allow multi-selection of roles in workflow #22835

Merged
mrmir merged 12 commits intodevfrom
feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow
Apr 29, 2026
Merged

[#72242] Workflows UX improvement: Allow multi-selection of roles in workflow #22835
mrmir merged 12 commits intodevfrom
feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow

Conversation

@mrmir
Copy link
Copy Markdown
Contributor

@mrmir mrmir commented Apr 20, 2026

Ticket

https://community.openproject.org/wp/72242

What are you trying to accomplish?

  • Change the role selector from an ActionMenu to multi-select SelectPanel
  • Make all components expect and work with multiple roles instead of just one

What approach did you choose and why?

  • Indeterminate checkboxes need some special handling, and the main case is that the form submits the checkboxes based on their default state (checked/unchecked) and the indeterminate state doesn't affect this. This is why there's some more logic in the tabs controller to manage checkbox state per role. Indeterminate checkboxes are read back from the DB to prevent them from being overridden by the default unchecked state

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@dfriquet dfriquet force-pushed the feature/72383-workflows-ux-improvement-apply-workflow-setting-from-role-to-role branch 3 times, most recently from 9193d3e to d58a196 Compare April 21, 2026 16:26
Base automatically changed from feature/72383-workflows-ux-improvement-apply-workflow-setting-from-role-to-role to dev April 22, 2026 13:15
@mrmir mrmir force-pushed the feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow branch 3 times, most recently from d9c9a9a to abe3684 Compare April 23, 2026 10:12
@mrmir mrmir force-pushed the feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow branch 2 times, most recently from 219d6a4 to aeef603 Compare April 24, 2026 10:52
@mrmir mrmir force-pushed the feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow branch from 8379657 to 625a65a Compare April 24, 2026 15:33
@mrmir mrmir force-pushed the feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow branch from 05e9353 to d956508 Compare April 28, 2026 11:02
@mrmir mrmir force-pushed the feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow branch from d956508 to 939592a Compare April 28, 2026 11:08
@mrmir mrmir force-pushed the feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow branch from 83abe08 to c01e3c1 Compare April 28, 2026 15:10
@mrmir mrmir force-pushed the feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow branch from c01e3c1 to 9b1303a Compare April 28, 2026 15:35
(() => {
const el = document.getElementById('#{checkbox_id}');
const bg = window.getComputedStyle(el).backgroundColor;
return bg !== 'rgba(0, 0, 0, 0)' && bg !== 'rgb(255, 255, 255)';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is there an alternate thing I could check here instead of whether or not the background is white or transparent? What I want to be testing is if the indeterminate checkbox is visible, and this needs to be done because if the default state for the checkboxes is switched to "unchecked", all other tests still pass (as indeterminate state is applied correctly), but aren't visible as it's white on white

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.

From the top of my head, I don't have a better idea. Why do we need to check the visuals compared to the indeterminate JS state?

Copy link
Copy Markdown
Contributor Author

@mrmir mrmir Apr 29, 2026

Choose a reason for hiding this comment

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

Because of the case where it can be indeterminate (and technically showing the -), but because the checkbox is unchecked, the background is white, and so it's indistinguishable visually compared to the regular unchecked state

For these cases, the JS state shows correctly that it's indeterminate, so all my specs were passing, but on the screen it looked like blank boxes everywhere 😬

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.

I see. I guess that makes sense to test it like that then?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I guess I'll keep it. Let's hope it's not too brittle

@mrmir mrmir marked this pull request as ready for review April 29, 2026 07:29
@oliverguenther
Copy link
Copy Markdown
Member

2026-04-29_10-58-29@2x

I find "Save" confusing here, should probably read more like "Select" or "Update" or "Confirm" ?

Copy link
Copy Markdown
Member

@oliverguenther oliverguenther left a comment

Choose a reason for hiding this comment

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

I really like the behavior and have not found any issues with it. I believe it will make editing much easier. There is a remark on the Save button in the select panel, but that could also be addressed separately.

@mrmir
Copy link
Copy Markdown
Contributor Author

mrmir commented Apr 29, 2026

I'll handle the select panel button separately in https://community.openproject.org/wp/74560, where I can also add some basic lookbook docs

@mrmir mrmir merged commit bd6ddfe into dev Apr 29, 2026
20 of 21 checks passed
@mrmir mrmir deleted the feature/72242-workflows-ux-improvement-allow-multi-selection-of-roles-in-workflow branch April 29, 2026 09:29
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants