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

Prevent rubber-banding in Telemetry Table filter input #7248

Conversation

scottbell
Copy link
Contributor

@scottbell scottbell commented Nov 20, 2023

Closes #7239

Describe your changes:

Sets the debounce to affect the filtering of the telemetry table, not the setting of the input value.

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 change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • 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?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

@scottbell scottbell linked an issue Nov 20, 2023 that may be closed by this pull request
7 tasks
Copy link

deploysentinel bot commented Nov 20, 2023

Current Playwright Test Results Summary

✅ 14 Passing

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 11/22/2023 10:23:12am UTC)

Run Details

Running Workflow e2e-couchdb on Github Actions

Commit: b3fff14

Started: 11/22/2023 10:21:41am UTC

View Detailed Build Results


Current Playwright Test Results Summary

✅ 162 Passing - ⚠️ 3 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 11/22/2023 10:23:12am UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: b3fff14

Started: 11/22/2023 08:25:41am UTC

⚠️ Flakes

📄   functional/plugins/notebook/restrictedNotebook.e2e.spec.js • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Restricted Notebook with a page locked and with an embed @addinit Allows embeds to be deleted if page unlocked @addinit
Retry 1Initial Attempt
3.51% (2) 2 / 57 runs
failed over last 7 days
50.88% (29) 29 / 57 runs
flaked over last 7 days
Restricted Notebook with a page locked and with an embed @addinit Disallows embeds to be deleted if page locked @addinit
Retry 1Initial Attempt
3.57% (2) 2 / 56 runs
failed over last 7 days
57.14% (32) 32 / 56 runs
flaked over last 7 days

📄   functional/plugins/imagery/exampleImagery.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Example Imagery Object Can use Mouse Wheel to zoom in and out of latest image
Retry 1Initial Attempt
1.72% (1) 1 / 58 run
failed over last 7 days
32.76% (19) 19 / 58 runs
flaked over last 7 days

View Detailed Build Results


Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Merging #7248 (b3fff14) into master (28bfc90) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7248      +/-   ##
==========================================
- Coverage   56.05%   56.01%   -0.05%     
==========================================
  Files         654      654              
  Lines       26228    26229       +1     
  Branches     2528     2528              
==========================================
- Hits        14702    14691      -11     
- Misses      10827    10836       +9     
- Partials      699      702       +3     
Flag Coverage Δ *Carryforward flag
e2e-full 41.83% <ø> (-0.06%) ⬇️ Carriedforward from 089557f
e2e-stable 58.35% <ø> (+<0.01%) ⬆️
unit 49.29% <0.00%> (-0.07%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
...ugins/telemetryTable/components/TableComponent.vue 41.96% <0.00%> (-0.12%) ⬇️

... and 10 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 28bfc90...b3fff14. Read the comment docs.

@scottbell scottbell marked this pull request as ready for review November 20, 2023 14:30
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 20, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 20, 2023
@@ -92,7 +92,7 @@ test.describe('Telemetry Table', () => {
await page.goto(table.url);

await page.getByRole('searchbox', { name: 'message filter input' }).click();
await page.getByRole('searchbox', { name: 'message filter input' }).fill('Roger');
await page.keyboard.type('Roger', { delay: 150 });
Copy link
Collaborator

@unlikelyzero unlikelyzero Nov 20, 2023

Choose a reason for hiding this comment

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

I think you could add coverage by using the previous logic and instantly changing the text. As long as the actions are quick enough, you should be able to cover the filterChanged codepath, no?

    await page.getByRole('searchbox', { name: 'message filter input' }).fill('Roger2');
    await page.getByRole('searchbox', { name: 'message filter input' }).fill('Roger');

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the question to answer would be, does this test fail if we revert the functional changes? Otherwise we should just keep the fill() since it won't matter and we'll save a sliver of runtime in the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it only happens sporadically, so I think you're right that the test change isn't worth the 150ms.

Copy link
Collaborator

@unlikelyzero unlikelyzero Nov 21, 2023

Choose a reason for hiding this comment

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

@scottbell did you catch my meaning about the filterChanged codepath

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@unlikelyzero I tested using both ways, and both are firing filterChanged FWIW, as the table is filtering values. I'm not sure why our code coverage tool isn't reporting it!

Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

Nice catch! No blocking changes requested, just a suggestion or two.

@@ -478,7 +478,7 @@ export default {
}
},
created() {
this.filterChanged = _.debounce(this.filterChanged, 500);
this.filterTelemetry = _.debounce(this.filterTelemetry, 500);
Copy link
Contributor

Choose a reason for hiding this comment

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

This would make a pretty neat composable if you're looking to get your hands dirty. Something like useDebounceFn maybe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted!

@@ -92,7 +92,7 @@ test.describe('Telemetry Table', () => {
await page.goto(table.url);

await page.getByRole('searchbox', { name: 'message filter input' }).click();
await page.getByRole('searchbox', { name: 'message filter input' }).fill('Roger');
await page.keyboard.type('Roger', { delay: 150 });
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the question to answer would be, does this test fail if we revert the functional changes? Otherwise we should just keep the fill() since it won't matter and we'll save a sliver of runtime in the test.

@ozyx ozyx added this to the Target:3.3.0 milestone Nov 20, 2023
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 21, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 21, 2023
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 22, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 22, 2023
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

LGTM

@scottbell scottbell merged commit 415b652 into master Nov 28, 2023
15 checks passed
@scottbell scottbell deleted the 7239-laggy-input-and-rubber-banding-in-telemetry-table-filter-inputs branch November 28, 2023 16:39
@unlikelyzero unlikelyzero modified the milestones: Target:3.3.0, Target:4.0.0 Feb 1, 2024
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.

Laggy input and rubber-banding in Telemetry Table filter inputs
3 participants