[Prototype][DNM]Adjust spinner vertical position#6615
Draft
duncanuszkay-d2l wants to merge 4 commits intomainfrom
Draft
[Prototype][DNM]Adjust spinner vertical position#6615duncanuszkay-d2l wants to merge 4 commits intomainfrom
duncanuszkay-d2l wants to merge 4 commits intomainfrom
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
|
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
Note The build needs to finish before your changes are deployed. |
dlockhart
reviewed
Feb 19, 2026
This comment was marked as outdated.
This comment was marked as outdated.
Comment on lines
+41
to
+49
| <tr> | ||
| <td>Math</td> | ||
| <td class="grade">85%</td> | ||
| <td>100</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Math</td> | ||
| <td class="grade">85%</td> | ||
| <td>100</td> |
Contributor
Author
There was a problem hiding this comment.
This makes the demo long enough to easily test this property
7dc648f to
8b1e0b5
Compare
Comment on lines
+103
to
+107
| if (this.#mustRepositionSpinner) { | ||
| this.#centerLoadingSpinner(); | ||
| this.#mustRepositionSpinner = false; | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
I'm using a private property here to indicate that the spinner should be repositioned after the next render- the flow looks like this:
- The user marks the element as 'shown'
- We call
show(), which sets the state properties to start the fade-in, and records that we'll need to re-position after this render - We render the page as a result of the properties changing (must occur first to get page dimensions before we can center)
- When we move onto updated we see that the spinner needs to be re-positioned, so we do so and remove the mark
- Future renderings, such as those that result from transitions starting/completing, don't trigger further repositioning of the spinner, even if the viewport has since moved. This is by design.
Member
There was a problem hiding this comment.
I think you could do without it and check for changedProperties having _state being set to either shown (if reduced motion) or showing (if not reduced motion)?
Base automatically changed from
GAUD-9445/backdrop-loading-improvements
to
main
February 20, 2026 18:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://desire2learn.atlassian.net/browse/NTNGL-5380
If you trigger the table loading state after scrolling, you won't see the loading spinner at all since it's statically positioned below the top of the element.
In this PR, I'm calculating the vertical position for the spinner each time the loading backdrop is enabled. The position is equal to the center of the visible portion of the element.
To avoid excessive recalculation and visual noise, we do not recalculate this position again until the next time the backdrop is triggered, even if the user then scrolls or resizes the page.
Functional Testing
Testing the behaviour in three scenarios:
Recording.2026-02-19.165349.mp4
Recording.2026-02-19.165631.mp4