feat: add resizable table columns #2625
Merged
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.
Whilst the feature here is making our table columns resizable, kongponents provides us with this functionality. But kongponents rightly doesn't dictate how you should persist the column sizes once resized.
Therefore the majority of this PR is providing a way application-wide that we can persist and retrieve user preference/settings/values etc. Here we use
localStorage
but we could just as well switch in a separate set ofsources
to use something different such as a users session.I chose to key settings by route name, and after doing so I figured we may as well make all this available via
RouteView
.Notes:
DataSink
, a writing version ofDataSource
. The most important thing for me here is the interface. The innards ofDataSink
and how it works under-the-hood will no doubt change, but I don't want to do all that at this stage, only enough for me to add this feature.DataSource:src="/me"
into RouteView and then provides RouteView#me via RouteViews slot. I figure every route will potentially need to get/set user persisted values so we may as well make it available via the RouteView rather than have to repeatedly add the DataSource everytime as we do previoius to this PR.MeshListView
for now for proof-of-concept, if I get an initial approval of this, next steps will be to roll this out everywhere.Part of #2468