fix(did): allow sorting dataset replicas by replication progress - #825
Open
Vrohs wants to merge 2 commits into
Open
fix(did): allow sorting dataset replicas by replication progress#825Vrohs wants to merge 2 commits into
Vrohs wants to merge 2 commits into
Conversation
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.
By submitting this PR, I confirm I have followed the Contributing Guide.
Description
Replication Progresson the dataset replicas table could not be sorted. It hadsortable: false, and nofieldand novalueGetter, so removing the flag on its own would have sorted on nothing.ProgressBarCellcomputed the percentage inline. This pulls that out intogetReplicationPercentageand uses it both to render the bar and as the column's sort value, so the two cannot drift apart. An empty dataset reports 0% rather than dividing by zero.Two side effects of giving the column a value, handled here:
defaultColDefrenders on every column, was previously a no-op. Left alone it would have become a text filter matching a raw float, so it is set toagNumberColumnFilter.fieldthe column was addressed by position (col-id="0"). Added an explicitcolId, matchingcolId: 'actions'/colId: 'state'elsewhere, so sort state can reference it stably.On the rest of the issue:
RegularTablesetssortable: truein itsdefaultColDefandStreamedTablerendersRegularTable, so every table already inherits sorting. I checked the rendered headers in Storybook for the RSE, rule, subscription and DID list views and the approve-rules table, and every data column is sortable. Of the explicitsortable: falseopt-outs, six look correct and are left alone: two checkbox-selection columns, two Actions button columns, and theFTS Monitoring/DDM Dashboardlink columns, which have no value to sort on.Checklist
in the description and the commit follows conventional commits
Notes for contributors
the Contributing Guide): use
Closes: #____on the commit that resolvesthe issue, and
Issue: #____on intermediate commits or if the issueshould remain open.
appropriate for the touched components; otherwise leave it empty and one
will be assigned.
closed promptly.
Additional notes for reviewer
Note: This OPTIONAL section is only relevant for the REVIEWER, please leave it in the PR
Reviewer template
Reviewers should copy&paste the code-block below and fill it out for APPROVED pull requests. If the PR does not meet the standards the project sets out, the reasons should be WELL EXPLAINED in a CHANGE REQUEST (The answers below do not need to be answered in that case)