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: Introduce component ids #1849

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

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Nov 12, 2024

Closes #1696

This PR introduces a new, component id concept to Visualize, which replaces the current component iri convention.

Component id is made by combining unversioned cube iri with unversioned component iri, which is a unique combination even in case we merged two cubes with the same component iris. This means that we can handle these cases correctly, while leaving our business logic mostly intact (and in some cases, even simpler, as we don't need to filter by cube iri and component iri anymore, but instead simply use component id).

This combination of iris is done on the server side and sent to the client, which doesn't need to know about this fact, but simply keep the current logic (chart config migrations are the only exception, as we need to introduce unversioned cube iris to relevant parts of the config dynamically to make sure old charts work).

By proxy, it was necessary to make the migrations async, so we can fetch unversioned cube iri when needed – as immer doesn't support / recommend asynchronous operations, I removed it.

How to test

🚨 Preferably, the implementation should be tested holistically, as essentially every part of Visualize was affected in one or another way.

  1. Go to this link.
  2. Click on Add dataset.
  3. Add Market figures milk and dairy products - Monthly producer prices dataset.
  4. Open Vertical axis.
  5. ✅ See that it's possible to toggle between two Price dimensions that have the same iris and names, but come from different cubes.
  6. Change chart type to Table.
  7. ✅ See that there are duplicated dimensions visible in the Table (that have the same iris and names, but come from different cubes).

How to reproduce

Repeat the above steps on PROD environment and see that ✅ points are broken ❌.


  • Update server-side filters to use component id naming convention
  • Add docs to feature page in Notion
  • Add tests

Copy link

vercel bot commented Nov 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 2:39pm

@bprusinowski bprusinowski changed the title feat: Make dimension iris **unique** (merging of cubes improvements) feat: Introduce component ids Nov 14, 2024
@bprusinowski bprusinowski force-pushed the feat/finalize-merging-of-cubes-2 branch from 610fc50 to bcf7644 Compare November 15, 2024 14:19
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.

Technical clean up of merging of cubes feature
1 participant