Skip to content

Conversation

@nolanplett
Copy link

@nolanplett nolanplett commented Jan 13, 2026

Fixing a defect for SHIELD-13816

@nolanplett nolanplett requested a review from a team as a code owner January 13, 2026 22:34
@github-actions
Copy link
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-6502/

Note

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

for (let i = 0; i < candidateRowHeadCells.length; i++) {
candidateRowHeadCells[i].style.minWidth = '';
candidateRowBody.cells[i].style.minWidth = '';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to merge this into the for loop just below; otherwise we're looping through the head cells twice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notably, the for loop below already fetches the i'th head cell and the i'th body cell, so you should be able to move this logic below those two fetches.

@nolanplett
Copy link
Author

Thus far, only the resizing defect has been fixed, the flickering defect still happens.

@grant-cleary
Copy link
Contributor

Resetting the minimum width when we do the sizing calculation seems fine (and safe enough) to me. I'm not sure what kind of cost we may incur in doing so, but it might be unavoidable.

@nolanplett
Copy link
Author

The current code in this PR fixes the main problems that were happening: the flickering when the width of the grid was close to that of the page (caused by a render loop), the misalignment of columns when resizing, and the mis-sizing of columns when resizing.

There is a small defect left, which is in the comment/video below.

@nolanplett
Copy link
Author

New defect 1: when you are in a scroll mode and scroll all the way to the right there is sometimes one frame of flickering.
New defect 2: when you are scrolled to the right and then zoom, some of the grid is misaligned until you scroll again (see photo).
image

@nolanplett
Copy link
Author

Testing:
I went to the Grades page on Course 1 (this is pre-setup with lots of data). Looking at the grid while zooming original had 2 defects: 1. The width of columns would remain too wide after refreshing when zoomed in. 2. There would be flickering between views when the grid was almost the same width as the page.

After the change, both of the above defects no longer happen. The width resizes automatically, and the flickering does not happen. When testing, I found another defect of the scroll not being able to go all the way to the right, so I changed the code and retested, and now all of those defects are fixed.

These changes did result in 2 new small defects (see above comment) which Elaine is aware of.

@joshhoey joshhoey self-requested a review January 15, 2026 16:32
@joshhoey
Copy link

These changes did result in 2 new small defects (see above comment) which Elaine is aware of.

Are these defects considered acceptable or are you fixing them in other PRs?

@nolanplett
Copy link
Author

There is a larger defect of these changes not allowing the grid to be scrolled to the right in some instances. These fixes are on hold for now, and will be revisited in the future.

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