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

feat(widget-builder): Batch URL param changes #81923

Merged
merged 10 commits into from
Dec 11, 2024

Conversation

narsaynorath
Copy link
Member

Batch together URL param updates. This allows us to modify different values in the widget builder state serially but push to the URL only once. e.g. clearing sort by when switching to a big number widget.

@narsaynorath narsaynorath requested a review from a team as a code owner December 10, 2024 19:41
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
8353 1 8352 0
View the top 1 failed tests by shortest run time
NewWidgetBuiler edits name and description
Stack Traces | 5.55s run time
Error: thrown: "Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
    at .../widgetBuilder/components/newWidgetBuilder.spec.tsx:159:3
    at _dispatchDescribe (.../jest-circus/build/index.js:91:26)
    at describe (.../jest-circus/build/index.js:55:5)
    at Object.<anonymous> (.../widgetBuilder/components/newWidgetBuilder.spec.tsx:56:1)
    at Runtime._execModule (.../jest-runtime/build/index.js:1439:24)
    at Runtime._loadModule (.../jest-runtime/build/index.js:1022:12)
    at Runtime.requireModule (.../jest-runtime/build/index.js:882:12)
    at jestAdapter (.../build/legacy-code-todo-rewrite/jestAdapter.js:77:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runTestInternal (.../jest-runner/build/runTest.js:367:16)
    at runTest (.../jest-runner/build/runTest.js:444:34)
    at Object.worker (.../jest-runner/build/testWorker.js:106:12)

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@@ -2185,6 +2193,12 @@ describe('Dashboards > Detail', function () {
id: '1',
title: 'Custom Errors',
});
jest.mocked(useWidgetBuilderState).mockReturnValue({
Copy link
Member Author

Choose a reason for hiding this comment

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

I mocked a bunch of these explicitly to avoid triggering the debounced stuff in the new state update provider. The updates here aren't actually that interesting, just as long as we know that adding the widget works with the correct state.

@narsaynorath narsaynorath merged commit 92e5511 into master Dec 11, 2024
42 checks passed
@narsaynorath narsaynorath deleted the nar/feat/widget-builder-batch-url-param-changes branch December 11, 2024 15:00
Copy link

sentry-io bot commented Dec 11, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: useUrlBatchContext must be used within a UrlParamBatchProvider useUrlBatchContext(urlParamBatchContext.tsx) View Issue

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants