Skip to content

refactor (state management): Remove extra layer when mapping URL parameters to Explore state #7086

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

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ericpgreen2
Copy link
Contributor

@ericpgreen2 ericpgreen2 commented Apr 7, 2025

In our current state mapping flow, we convert URLSearchParamsV1ExplorePresetMetricsExplorerEntity. The intermediate V1ExplorePreset layer is unnecessary and adds complexity.

This PR removes the extra layer, directly mapping URLSearchParams to MetricsExplorerEntity.

Note: This PR doesn’t much cleanup the state mapping logic itself, but it simplifies the flow and sets us up for future cleanup.

Builds on #7084, #7087

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@ericpgreen2 ericpgreen2 requested a review from AdityaHegde April 7, 2025 14:05
@ericpgreen2 ericpgreen2 self-assigned this Apr 7, 2025
@AdityaHegde
Copy link
Collaborator

This sadly conflicts heavily with #7062. I am getting rid of the intermediate step in there already. This would be redundant.

@ericpgreen2
Copy link
Contributor Author

This sadly conflicts heavily with #7062. I am getting rid of the intermediate step in there already. This would be redundant.

Nice to see that! Just this is the kind of thing that should be a standalone PR. Do you want to split your work out into a dedicated PR or should I get this one over-the-line?

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.

2 participants