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): Add helper to convert widget to builder state #81478

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

narsaynorath
Copy link
Member

This lets us put the widget builder state into the URL so it can be parsed by the hook when the builder mounts. To demonstrate this, I've hooked up the "Edit Widget" button which should put the state in the URL, open the new slideout, and put my dev builder in the slideout if you set showDevBuilder in your local storage to true

It should load up with the fields populated from the query (although keep in mind I'm not doing any fancy UI stuff to filter, so e.g. a table widget will still open up and show a "Y-axis" field)

@narsaynorath narsaynorath requested a review from a team as a code owner November 29, 2024 22:56
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 29, 2024
@narsaynorath narsaynorath force-pushed the nar/feat/widget-builder-add-helper-for-widget-to-builder-state branch from 7fba528 to 168467f Compare November 29, 2024 23:01
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 26.31579% with 14 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
static/app/views/dashboards/detail.tsx 25.00% 6 Missing ⚠️
...Builder/utils/convertWidgetToBuilderStateParams.ts 0.00% 4 Missing ⚠️
static/app/views/dashboards/dashboard.tsx 25.00% 3 Missing ⚠️
...dashboards/widgetBuilder/components/devBuilder.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #81478      +/-   ##
==========================================
- Coverage   80.37%   80.37%   -0.01%     
==========================================
  Files        7230     7231       +1     
  Lines      319598   319611      +13     
  Branches    20778    20780       +2     
==========================================
+ Hits       256867   256872       +5     
- Misses      62328    62336       +8     
  Partials      403      403              

This lets us put the widget builder state into the URL so it can be
parsed by the hook when the builder mounts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant