Skip to content

Dunk.list#6802

Draft
duncanuszkay-d2l wants to merge 1 commit into
mainfrom
dunk.list
Draft

Dunk.list#6802
duncanuszkay-d2l wants to merge 1 commit into
mainfrom
dunk.list

Conversation

@duncanuszkay-d2l

@duncanuszkay-d2l duncanuszkay-d2l commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

https://desire2learn.atlassian.net/browse/GAUD-9707

https://desire2learn.atlassian.net/browse/GAUD-9706

We want to add a loading overlay onto our list element, similar to what we added onto the table.

This feature is useful in cases where reloading the table data is slow enough that it's worth providing visual notice to the user and/or letting the user add all of their filters and confirm before starting the load.

Demo:

Recording.2026-06-15.114115.mp4

@duncanuszkay-d2l duncanuszkay-d2l changed the base branch from main to dunk.dirty-dialog April 14, 2026 15:41
@github-actions

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-6802/

Note

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

@duncanuszkay-d2l duncanuszkay-d2l force-pushed the dunk.dirty-dialog branch 9 times, most recently from 54c986a to 7903c49 Compare April 17, 2026 19:11
Base automatically changed from dunk.dirty-dialog to main April 27, 2026 14:02
@duncanuszkay-d2l duncanuszkay-d2l force-pushed the dunk.list branch 2 times, most recently from 0212eaa to 6fa30b9 Compare June 12, 2026 17:32
@duncanuszkay-d2l duncanuszkay-d2l force-pushed the dunk.list branch 2 times, most recently from 8e89f82 to 3ea9f2c Compare June 15, 2026 15:20
this._selectAllDisabled = true;
break;
case 'loading':
setTimeout(() => { this._selectAllDisabled = this.dataState !== 'clean'; }, 800);

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.

In this iteration, disabling controls is a responsibility assumed by the caller, since they're picking and choosing which controls to include in their slot.

The alternative would be to go programmatically disable everything within the control slot- this might not be desirable for all use cases, especially if those controls are part of a flow in which the loading backdrop would go away, E.G.

  • User clicks a checkbox in the list controls to only show students who are failing the course in a list.
  • Since this would require a non-trivial load time, the backdrop is triggered and the overlay appears
  • The user changes their mind, they actually want to keep the non-failing students in the list
  • If the list controls were all greyed out, they would have no choice but to click the refresh button, wait for it to load, then switch back to the selection they wanted

Comment thread components/list/list.js
_breakpoint: { type: Number, reflect: true },
_slimColor: { type: Boolean, reflect: true, attribute: '_slim-color' }
_slimColor: { type: Boolean, reflect: true, attribute: '_slim-color' },
_backdropTriggered: { type: Boolean, reflect: true }

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 state attribute is a defensive measure to avoid breaking or changing existing list users. It records if the backdrop feature has ever been used, which opts into the new styles below.

Comment thread components/list/list.js
Comment on lines +201 to +203
:host([_backdropTriggered]) {
position: relative;
}

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.

The backdrop must be rendered within a stacking context so that it doesn't leak out and render over a parent element or the entire page.

Comment thread components/list/list.js
Comment on lines +204 to +212
:host([_backdropTriggered]) slot {
z-index: 2;
}
:host([_backdropTriggered]) d2l-backdrop-loading {
z-index: 1;
}
:host([_backdropTriggered]) #list-slot {
z-index: 0;
}

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.

For most cases, I'd expect that we could ignore this by:

  • Only including the items that will be stacked on top of each other in the stacking context, by introducing a position:relative div that wraps around those specific elements
  • Rely on the element ordering to specify the stacking order

Unfortunately, adding the position:relative div around just those elements was causing a 1px discrepancy in height when combined with a negative margin (slack thread).

To avoid addressing that difficult issue, I've instead opted to make the list itself a stacking context, and manually specify an order that ensures that only the list items (in #list-slot) are overlaid by the backdrop.

Comment on lines 41 to +46
selectAllPagesAllowed: { type: Boolean, attribute: 'select-all-pages-allowed' },
/**
* Whether to disable and visually grey out the select all items checkbox
* @type {boolean}
*/
selectAllPagesDisabled: { type: Boolean, attribute: 'select-all-pages-disabled' },

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.

Having both of these properties is not ideal since the difference between Allowed and Disabled isn't clear just in their names.

I also considered using disabled as the attribute name, but I thought this carried the implication that all of the slotted items would be disabled too, which is not the case by design.

Any ideas on how to make this nicer without breaking the existing API are welcome 😄

@duncanuszkay-d2l duncanuszkay-d2l marked this pull request as ready for review June 15, 2026 15:43
@duncanuszkay-d2l duncanuszkay-d2l requested a review from a team as a code owner June 15, 2026 15:43
@duncanuszkay-d2l duncanuszkay-d2l marked this pull request as draft June 22, 2026 14:49
@duncanuszkay-d2l duncanuszkay-d2l removed the request for review from svanherk June 22, 2026 14:49
@duncanuszkay-d2l

duncanuszkay-d2l commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Discovered some issues relating to scrolling and dialog positioning, returning to draft while they're being resolved.

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.

1 participant