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 vue reactivity of rows by changing the reference of the updated row #7940

Merged
merged 6 commits into from
Dec 4, 2024

Conversation

davetsay
Copy link
Contributor

@davetsay davetsay commented Dec 3, 2024

Closes #7938

Describe your changes:

  • make in place row updates trigger vue reactivity
  • do not trigger row update calculations on horizontal scroll

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?

@davetsay davetsay added the bug:regression It used to work. Now it doesn't :( label Dec 3, 2024
@davetsay davetsay added this to the Target:4.1.0 milestone Dec 3, 2024
@davetsay davetsay added type:bug needs:e2e Needs an e2e test labels Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.57%. Comparing base (61b982a) to head (86af8ca).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7940      +/-   ##
==========================================
+ Coverage   56.71%   57.57%   +0.86%     
==========================================
  Files         677      678       +1     
  Lines       27404    27427      +23     
  Branches     2690     2691       +1     
==========================================
+ Hits        15541    15790     +249     
+ Misses      11525    11296     -229     
- Partials      338      341       +3     
Flag Coverage Δ
e2e-ci 62.81% <100.00%> (+2.04%) ⬆️
e2e-full 41.92% <50.00%> (+18.32%) ⬆️
unit 49.33% <67.85%> (-0.15%) ⬇️
Files with missing lines Coverage Δ
example/eventGenerator/EventMetadataProvider.js 100.00% <100.00%> (ø)
...Generator/EventWithAcknowledgeTelemetryProvider.js 100.00% <100.00%> (ø)
example/eventGenerator/plugin.js 100.00% <100.00%> (ø)
src/plugins/telemetryTable/TelemetryTableRow.js 88.88% <ø> (-0.31%) ⬇️
...s/telemetryTable/collections/TableRowCollection.js 66.21% <100.00%> (+4.72%) ⬆️
...ugins/telemetryTable/components/TableComponent.vue 44.52% <100.00%> (+0.39%) ⬆️

... and 36 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 61b982a...86af8ca. Read the comment docs.

@akhenry akhenry self-requested a review December 4, 2024 03:45
Copy link
Contributor

@akhenry akhenry left a comment

Choose a reason for hiding this comment

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

Just wondering whether the splice change by itself fixes it?

Also, can you explain the scrollX issue? Is it related to in-place row updates? The scope of change approved by the CCB is for fixing in-place row updates.

@davetsay
Copy link
Contributor Author

davetsay commented Dec 4, 2024

Just wondering whether the splice change by itself fixes it?

Also, can you explain the scrollX issue? Is it related to in-place row updates? The scope of change approved by the CCB is for fixing in-place row updates.

The incoming vs existing is more slimming the code down. We create new TelemetryTableRows, so their datum is already normalized, etc, so we don't have to re-perform that operation. So, updateWithDatum being slimmed down is just a code improvement. Splice vs index replacement is not entirely it. You can index replace with a reference to a new row to trigger reactivity.

The horizontal scroll I came across when I started wondering if throttled calls was affecting adding rows and updating rows. We are calling updateView and recalculating visibleRows on every vertical AND horizontal scroll. It's unnecessary on horizontal scroll, but can remove if you feel it introduces too much risk.

@davetsay davetsay requested a review from akhenry December 4, 2024 18:04
@davetsay davetsay added pr:e2e:couchdb npm run test:e2e:couchdb and removed needs:e2e Needs an e2e test pr:e2e:couchdb npm run test:e2e:couchdb labels Dec 4, 2024
@davetsay davetsay enabled auto-merge (squash) December 4, 2024 19:18
@davetsay davetsay merged commit 14b947c into master Dec 4, 2024
29 checks passed
@davetsay davetsay deleted the fix/7938-vipergc-692-update-rows-in-place branch December 4, 2024 19:27
akhenry pushed a commit that referenced this pull request Dec 4, 2024
…ow (#7940)

* do not call `updateVisibleRows` on horizontal scroll
* add example provider for in place row updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:regression It used to work. Now it doesn't :( type:bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Telemetry Table] in place updates are not being rendered
2 participants