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

Refactor VisualizationProvider to expose an itemMap instead of the explore #8153

Closed
ZeRego opened this issue Nov 29, 2023 · 1 comment · Fixed by #8239
Closed

Refactor VisualizationProvider to expose an itemMap instead of the explore #8153

ZeRego opened this issue Nov 29, 2023 · 1 comment · Fixed by #8239
Assignees
Labels
🖥 frontend This issue requires changes to the frontend released tech-debt Cruft, refactoring, and hinderances to developer productivity

Comments

@ZeRego
Copy link
Contributor

ZeRego commented Nov 29, 2023

The visualization provider shouldn't be directly dependent on the explore object/data.
Instead, it should base itself on an itemsMap: Record<string, Item> which contains all the necessary data for the visualization and configuration.

Update:

  • add itemMap to context ( the value should come from the explore + resultsData?.metricQuery )
  • remove explore, dimensions, metrics, customDimensions, customMetrics, allMetrics, allNumericMetrics from the context and use the itemMap instead

This will:

  • reduce duplicated code
  • reduce hooks loops
  • centralize data+logic

This is preparation work for Refactor metric query results types#8145

@lightdash-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 0.899.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥 frontend This issue requires changes to the frontend released tech-debt Cruft, refactoring, and hinderances to developer productivity
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants