Skip to content

fix: DH-18976: Table aggregation totals rows are the wrong colour #2457

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gzh2003
Copy link
Contributor

@gzh2003 gzh2003 commented Jun 5, 2025

Part of DH-18976. Fixes an issue where the pendingRow check was not properly bounded, causing aggregation rows to be incorrectly treated as pending in the color logic.

This occurred because pendingRow(y) would return null for any row index beyond the current pendingNewRowCount, causing rows rendered at the bottom of the table to mistakenly adopt the pendingTextColor.

Changes:

  • Added proper bounds to the pendingRow logic
  • Modified setValues to:
    1. Filter edits that fall in the pending row area
    2. Calculate the maximum pending row index needed
    3. Expand pendingNewRowCount if necessary before processing edits

@gzh2003 gzh2003 requested a review from mofojed June 5, 2025 20:27
@gzh2003 gzh2003 self-assigned this Jun 5, 2025
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 12.90323% with 27 lines in your changes missing coverage. Please review.

Project coverage is 47.18%. Comparing base (431c057) to head (7257383).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ckages/iris-grid/src/IrisGridTableModelTemplate.ts 12.90% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2457      +/-   ##
==========================================
- Coverage   47.21%   47.18%   -0.03%     
==========================================
  Files         718      718              
  Lines       39620    39645      +25     
  Branches     9914     9926      +12     
==========================================
+ Hits        18706    18707       +1     
- Misses      20903    20927      +24     
  Partials       11       11              
Flag Coverage Δ
unit 47.18% <12.90%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

);

if (pendingRowsNeeded >= this.pendingNewRowCount) {
this.pendingNewRowCount = pendingRowsNeeded + 1;
Copy link
Contributor Author

@gzh2003 gzh2003 Jun 5, 2025

Choose a reason for hiding this comment

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

This was previously handled implicitly as this.pendingRow(y) would return true for any y above pendingRowStart, even if it wasn’t a valid pending row. With the new bounds check, this no longer applies, so the count needs to be updated.

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.

1 participant