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.
Description
This PR refactors how grids render columns, removing "virtual" horizontal scroll and instead rendering all columns. This provides one major advantage, which is that we never need to fully remount any cells. There was an issue where svelte was memoising props being passed to cells and resulted in crashes when reordering relationship columns. Fully remounting cells cripples performance, so it's actually far more performant to render all columns.
Performance has still been optimised by taking advantage of the shiny new CSS style
content-visibility: hidden
which is used so that all columns offscreen are not rendered but are still part of the DOM and stay updated.This is a follow up from the convo in #12076 and fixes the core underlying issue.
Horizontal scrolling performance is even faster and smoother with these changes:
Screen.Recording.2023-10-18.at.08.33.06.mov
Other misc changes
It's now much easier to delete columns. You can click on the name of the column in the confirmation prompt to autofill the value into the confirmation input:
Screen.Recording.2023-10-18.at.08.21.28.mov
There were multiple issues with the error displayed when you have duplicate auto columns, so I've fixed those:
Addresses:
Feature branch env
Feature Branch Link