Skip to content

GAUD-10312 - No interaction with arrows when divider collapsed - #7334

Closed
svanherk wants to merge 4 commits into
mainfrom
GAUD-10312-No-interaction-with-arrows-when-divider-collapsed
Closed

GAUD-10312 - No interaction with arrows when divider collapsed#7334
svanherk wants to merge 4 commits into
mainfrom
GAUD-10312-No-interaction-with-arrows-when-divider-collapsed

Conversation

@svanherk

@svanherk svanherk commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

After talking to design, it was decided that the arrows should become inactive when the divider is collapsed, and act simply as direction indicators. The user should use the divider line or the toggle button to open a collapsed divider.

vdiff report here shows the arrows no longer having a hover state, and unit tests updated to test no no events/interaction.

@svanherk
svanherk changed the base branch from main to GAUD-10312-Add-divider-arrow-vdiffs August 7, 2026 20:06
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-7334/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

if (this.#clickedArrow) return; // Arrows don't support dragging

const clickedArrow = path.find(el => el.classList?.contains('divider-arrow'));
if (clickedArrow) {

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.

This code moving into the click handler above fixes an eventual bug that would have come up with overlay. It's the same issue the drawer would have had - if we move the divider before the click happens, it'll click what's behind it. I thought this was only an issue with the drawer handle, but it also happens to the arrows in overlay mode, where clicking the overlay closes the drawer.

Even if we don't want that to happen (I need to ask design), it's just better and will likely save us from some other bug in the future.

Base automatically changed from GAUD-10312-Add-divider-arrow-vdiffs to main August 7, 2026 21:25
Comment on lines 332 to +333
this.#clickedHandle = path.some(el => el.classList?.contains('divider-handle'));
this.#clickedArrow = path.find(el => el.classList?.contains('divider-arrow'));

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.

One thing I wanted to call out here - this is a maybe a tad confusing, because one stores a boolean and one stores the actual arrow (since I need it later). I could store the handle to be consistent, but I don't need it. I could use two variables (one to store that the arrow was clicked, and one to store the arrow) but that felt like overkill. Or I could update the naming, but I liked how this flowed 🤷‍♀️

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@svanherk
svanherk marked this pull request as ready for review August 7, 2026 23:27
@svanherk
svanherk requested a review from a team as a code owner August 7, 2026 23:27
@dbatiste

dbatiste commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Maybe more of a question for design, but if it's not interactive then maybe we should hide the divider arrows when collapsed, since they become inoperable and the slider icon already provides a visual indication of direction when collapsed...?

Another question... when I try it out, I notice that the divider arrows only seem to appear when I click on the divider. Is that expected? Should they be displayed if the user hovers over them or the divider?

I see that the divider arrows do provide a visual indication of whether they can grow or shrink the side-nav. Although they were originally meant for the pointer non-drag a11y case, I find the visual helpful when using the keyboard with arrow keys, especially when I reach the min/max size.

@svanherk

svanherk commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Maybe more of a question for design, but if it's not interactive then maybe we should hide the divider arrows when collapsed, since they become inoperable and the slider icon already provides a visual indication of direction when collapsed...?

Another question... when I try it out, I notice that the divider arrows only seem to appear when I click on the divider. Is that expected? Should they be displayed if the user hovers over them or the divider?

Yeah I talked to @glen-bartlett-d2l about both and the outcome of his investigations were:

  1. Leave the arrow when collapsed to match primary-secondary, but make it inactive.
  2. The user needs to focus the divider for the arrows to appear. This also matches primary-secondary (although those are not interactive), but I think it makes sense to reduce noise when interacting with the content and not really caring about the divider.

But I'll poke Glen about this comment.

I see that the divider arrows do provide a visual indication of whether they can grow or shrink the side-nav. Although they were originally meant for the pointer non-drag a11y case, I find the visual helpful when using the keyboard with arrow keys, especially when I reach the min/max size.

It's actually the opposite lol - they were originally meant as only the helpful visual indication, and then were re-purposed for the non-drag a11y case after you brought it up! 😄

@dbatiste

dbatiste commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

I see, thanks. There's definitely a bit going on, now serving the dual purpose. I'll admit I tried to click it while it was collapsed, but maybe a user wouldn't normally do that.

The user needs to focus the divider for the arrows to appear.

The focus requirement makes it a little harder for mouse/pointer non-drag users, but they'd probably discovered it after they click the slider once or twice. It's not really any harder than the HTML editor resizer - it too needs to be first clicked to toggle into that mode. However in its case, showing those click targets on hover was never an option because the user needs to hover to begin dragging. Anyway, remembering the size hopefully reduces need for resizing as well.

@glen-bartlett-d2l

Copy link
Copy Markdown
Contributor

Maybe more of a question for design, but if it's not interactive then maybe we should hide the divider arrows when collapsed, since they become inoperable and the slider icon already provides a visual indication of direction when collapsed...?
Another question... when I try it out, I notice that the divider arrows only seem to appear when I click on the divider. Is that expected? Should they be displayed if the user hovers over them or the divider?

Yeah I talked to @glen-bartlett-d2l about both and the outcome of his investigations were:

  1. Leave the arrow when collapsed to match primary-secondary, but make it inactive.
  2. The user needs to focus the divider for the arrows to appear. This also matches primary-secondary (although those are not interactive), but I think it makes sense to reduce noise when interacting with the content and not really caring about the divider.

But I'll poke Glen about this comment.

I see that the divider arrows do provide a visual indication of whether they can grow or shrink the side-nav. Although they were originally meant for the pointer non-drag a11y case, I find the visual helpful when using the keyboard with arrow keys, especially when I reach the min/max size.

It's actually the opposite lol - they were originally meant as only the helpful visual indication, and then were re-purposed for the non-drag a11y case after you brought it up! 😄

@svanherk After thinking about this a bit, Dave does have a point about the expand button already showing that directionality when the panel is closed, so showing the other arrow there is a bit misleading (although no more misleading than the one in primary secondary, which looks like something you should be able to click). I don't feel strongly about leaving it there, but if it's easy to change, it might be best to not show it when the panel is closed?

@svanherk

Copy link
Copy Markdown
Contributor Author

@svanherk After thinking about this a bit, Dave does have a point about the expand button already showing that directionality when the panel is closed, so showing the other arrow there is a bit misleading (although no more misleading than the one in primary secondary, which looks like something you should be able to click). I don't feel strongly about leaving it there, but if it's easy to change, it might be best to not show it when the panel is closed?

Yup that's also an easy change - will remove. I think I'll do a separate PR and keep this as is, for history.

@svanherk

Copy link
Copy Markdown
Contributor Author

Closing in favour of #7341

@svanherk svanherk closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants