Skip to content

[67542] Allow single selection variant for the tree view - #360

Merged
HDinger merged 5 commits into
mainfrom
feature/67542-allow-single-selection-variant-for-the-tree-view
Sep 30, 2025
Merged

[67542] Allow single selection variant for the tree view#360
HDinger merged 5 commits into
mainfrom
feature/67542-allow-single-selection-variant-for-the-tree-view

Conversation

@HDinger

@HDinger HDinger commented Sep 26, 2025

Copy link
Copy Markdown
Collaborator

What are you trying to accomplish?

Support :single as select_variant for the TreeView

Screenshots

Sep-26-2025 14-58-58

Integration

No

List the issues that this change affects.

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

Risk Assessment

  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.

What approach did you choose and why?

I tried to copy the approach of the SelectPanel, which is showingan arrow to indicate the selection. Toggling the visibility is based on the aria-checked state.
By using aria-checked as the base, we remain also consistent with our implementation for select_variant: :multiple which leads to less code being needed.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

@changeset-bot

changeset-bot Bot commented Sep 26, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c9acf8c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@openproject/primer-view-components Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@HDinger
HDinger marked this pull request as draft September 26, 2025 13:18
@github-actions

github-actions Bot commented Sep 26, 2025

Copy link
Copy Markdown

⚠️ Visual or ARIA snapshot differences found

Our visual and ARIA snapshot tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.

Review differences

@HDinger
HDinger force-pushed the feature/67542-allow-single-selection-variant-for-the-tree-view branch 6 times, most recently from 0a6743d to 74c215e Compare September 30, 2025 06:26
@HDinger
HDinger marked this pull request as ready for review September 30, 2025 07:06
@oliverguenther

Copy link
Copy Markdown
Member

2025-09-30_09-48-34

There is quite a delay when toggling another item, the previous checkmark is removed quite "sluggishly". Not a big deal, just something I noticed when using the component

Comment thread app/components/primer/alpha/tree_view.pcss Outdated
@HDinger
HDinger force-pushed the feature/67542-allow-single-selection-variant-for-the-tree-view branch from 92d02ca to 346b1ee Compare September 30, 2025 10:47
@HDinger
HDinger merged commit 8a130e2 into main Sep 30, 2025
26 of 27 checks passed
@HDinger
HDinger deleted the feature/67542-allow-single-selection-variant-for-the-tree-view branch September 30, 2025 11:27
@openprojectci openprojectci mentioned this pull request Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants