Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix table sorting in descending order #7863

Merged
merged 3 commits into from
Oct 8, 2024
Merged

Fix table sorting in descending order #7863

merged 3 commits into from
Oct 8, 2024

Conversation

shefalijoshi
Copy link
Contributor

@shefalijoshi shefalijoshi commented Oct 2, 2024

Closes VIPERGC-643

Describe your changes:

When adding sorted arrays to the beginning of the table rows, make sure to insert them in the order of occurrence and not accidentally reverse them (by using unshift) while inserting.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

…in the same order and not accidentally reverse them while inserting.
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.45%. Comparing base (47f0b66) to head (9ab2529).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7863      +/-   ##
==========================================
- Coverage   57.59%   57.45%   -0.15%     
==========================================
  Files         675      675              
  Lines       27317    27317              
  Branches     2673     2673              
==========================================
- Hits        15734    15694      -40     
- Misses      11247    11287      +40     
  Partials      336      336              
Flag Coverage Δ
e2e-ci 62.40% <100.00%> (ø)
e2e-full 41.88% <0.00%> (-9.67%) ⬇️
unit 49.35% <0.00%> (ø)
Files with missing lines Coverage Δ
...s/telemetryTable/collections/TableRowCollection.js 63.94% <100.00%> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47f0b66...9ab2529. Read the comment docs.

@unlikelyzero unlikelyzero added this to the Build 9 RC11 milestone Oct 3, 2024
@unlikelyzero unlikelyzero self-requested a review October 3, 2024 15:53
@@ -150,13 +150,13 @@ export default class TableRowCollection extends EventEmitter {
}

insertOrUpdateRows(rowsToAdd, addToBeginning) {
rowsToAdd.forEach((row) => {
rowsToAdd.forEach((row, addRowsIndex) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I get it, smort. 🤓👈

@akhenry
Copy link
Contributor

akhenry commented Oct 3, 2024

Tested locally and it looks good to me, thanks!

@akhenry
Copy link
Contributor

akhenry commented Oct 8, 2024

Have filed a followup for a test - #7870

@akhenry akhenry added the pr:e2e:couchdb npm run test:e2e:couchdb label Oct 8, 2024
@akhenry akhenry enabled auto-merge (squash) October 8, 2024 13:51
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Oct 8, 2024
@akhenry akhenry merged commit 83e4a12 into master Oct 8, 2024
23 checks passed
@akhenry akhenry deleted the fix-table-sort-desc branch October 8, 2024 13:56
davetsay added a commit that referenced this pull request Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants