Skip to content

Add apply button and dirty state#6751

Draft
duncanuszkay-d2l wants to merge 5 commits intomainfrom
dunk.apply-button
Draft

Add apply button and dirty state#6751
duncanuszkay-d2l wants to merge 5 commits intomainfrom
dunk.apply-button

Conversation

@duncanuszkay-d2l
Copy link
Copy Markdown
Contributor

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

Note for reviewers- looking for some early input on direction before finishing this up 👀

This PR is split up into commits to make it easier to review.

https://desire2learn.atlassian.net/browse/NTNGL-5471?atlOrigin=eyJpIjoiMDk2MmRlZjZmMjkxNGNhZjlmMTIxMTdiMjJiODZjODYiLCJwIjoiaiJ9

Functional Testing

Moving between the new backdrop states:

Recording.2026-04-07.163437.mp4

Using the new system in the downstream consumer (WIP integration PR)

Recording.2026-04-07.163602.mp4

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

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

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.apply-button branch 3 times, most recently from ca89028 to 1703061 Compare April 7, 2026 20:28
Comment thread components/backdrop/backdrop-loading.js Outdated
}
:host([_state="showing"]),
:host([_state="shown"]),
:host([_state="loading"]),
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 shown state now represents the dirty dialog being open:

Image

The loading state represents the loading spinner being visible:

Image

Comment thread components/backdrop/backdrop-loading.js Outdated
if (this._state === 'hidden') return nothing;
return html`
<div class="backdrop" @transitionend="${this.#handleTransitionEnd}" @transitioncancel="${this.#hide}"></div>
<div class="backdrop" @transitionend="${this.#handleTransitionEnd}" @transitioncancel="${this.#handleTransitionEnd}"></div>
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 resolved a bug I began to run into once I adjusted the demo to allow the more rapid state changes- we can't assume that a cancellation of a transition must indicate that we need to hide, we need to check to make sure that we're in the hiding state.

@duncanuszkay-d2l duncanuszkay-d2l requested a review from GZolla April 8, 2026 14:58
Comment thread components/backdrop/backdrop-loading.js Outdated
Comment on lines +185 to +186
await this.shadowRoot.querySelector('d2l-empty-state-simple').getUpdateComplete();
await this.shadowRoot.querySelector('d2l-empty-state-action-button').getUpdateComplete();
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 ensures that we're accurately measuring the height offset for the dialog box, this should remain consistent regardless of the text content

@duncanuszkay-d2l duncanuszkay-d2l force-pushed the dunk.apply-button branch 2 times, most recently from 6c65b4d to 1d1bf11 Compare April 8, 2026 15:41
@duncanuszkay-d2l duncanuszkay-d2l removed the request for review from GZolla April 9, 2026 18:00
@duncanuszkay-d2l duncanuszkay-d2l force-pushed the dunk.apply-button branch 3 times, most recently from 499ce36 to 5e9287c Compare April 9, 2026 18:43
@duncanuszkay-d2l duncanuszkay-d2l force-pushed the dunk.apply-button branch 4 times, most recently from 0b7aca8 to 2ae18aa Compare April 13, 2026 19:14
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