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

✓ "Created with visualize.admin.ch" missing from dashboards #1813

Closed
sosiology opened this issue Nov 5, 2024 · 9 comments
Closed

✓ "Created with visualize.admin.ch" missing from dashboards #1813

sosiology opened this issue Nov 5, 2024 · 9 comments
Assignees

Comments

@sosiology
Copy link
Contributor

Description
The note that a chart was created with visualize.admin.ch is missing when multiple charts are published using the layout options: Tab layout, dashboard)

Steps to Reproduce

  1. Go to: https://visualize.admin.ch/v/TVNwmsKWrtx5?dataSource=Prod
  2. See that at the bottom of the chart, the hint "Erstellt mit: visualize.admin.ch" is missing
  3. Copy and Edit the Chart
  4. Select a dashboard layout (any)
  5. See that in editing mode, but also in the published chart the note "Erstellt mit visualize.admin.ch" is missing.

Screenshots and Examples
Tab Layout | https://visualize.admin.ch/v/TVNwmsKWrtx5?dataSource=Prod
Image

Dashboard Layout | https://visualize.admin.ch/v/4yHJ0msuFuY2?dataSource=Prod
Image

Expected Result
The note is shown below each chart in the tab layout, or at least once at the bottom of a dashboard.
See example here (single chart): https://visualize.admin.ch/v/7PyLLMXyF4PW?dataSource=Prod

Image

@noahonyejese
Copy link
Contributor

@bprusinowski and @sosiology this is an issue I've worked on the past the idea was to move the "Created with" part onto the bottom when creating Dashboards with multiple Charts. (I now fixed the missing "Created with" on the single Chart). However how should it be on the Dashboard Charts with multiple Charts during Edit mode should it be for every Chart or just once like it is in published mode?

@bprusinowski
Copy link
Collaborator

Hi @noahonyejese, I am not sure if this is a behavior we all have in mind, but I think the labels should be there in single charts and tab layout, and in case of dashboards, we should only have one entry at the bottom and not include the labels in individual charts. @KerstinFaye maybe we have a design for this? 🤔

@sosiology
Copy link
Contributor Author

@noahonyejese the goal is to have a solution for dashboards - where, as @bprusinowski said, it is shown in one place (not per chart). The single chart types should already have the "Created with" ....so i am not 100% sure what you fixed?

@noahonyejese
Copy link
Contributor

Hi @noahonyejese, I am not sure if this is a behavior we all have in mind, but I think the labels should be there in single charts and tab layout, and in case of dashboards, we should only have one entry at the bottom and not include the labels in individual charts. @KerstinFaye maybe we have a design for this? 🤔

Is this also during the preview for dashboard layout charts only at the bottom or is it there for each one

@noahonyejese
Copy link
Contributor

@noahonyejese the goal is to have a solution for dashboards - where, as @bprusinowski said, it is shown in one place (not per chart). The single chart types should already have the "Created with" ....so i am not 100% sure what you fixed?

No I noticed it was missing everywhere because I forgot to add a variable that I introduced to disabled it on Charts if needed. However therefore the only thing missing now is the dashboard having a link at the bottom of the page correct? If so should this be always the cased or only when published?

@noahonyejese
Copy link
Contributor

noahonyejese commented Nov 6, 2024

@bprusinowski Also the turnary here https://github.com/visualize-admin/visualization-tool/pull/1745/files#diff-34eba95302f579aaec7d8e6d0efc9dc2eab6b955bc8d96ea395c7273743e73ec isn't quite right we have to do

 state.layout.type !== "dashboard" ||
                (state.layout.type === "dashboard" &&
                  state.chartConfigs.length === 1)

instead of

                state.layout.type !== "dashboard" &&
                  state.chartConfigs.length === 1

To make sure that dashboards with only 1 Chart still have the Link like the other versions

@bprusinowski
Copy link
Collaborator

@noahonyejese I think we don't show it during editing, only when a chart is published 👀

@noahonyejese
Copy link
Contributor

@bprusinowski it was only meant for the embed mode I made it now also for the published mode

@sosiology
Copy link
Contributor Author

LGTM thank you @noahonyejese

@sosiology sosiology changed the title "Created with visualize.admin.ch" missing from dashboards ✅ "Created with visualize.admin.ch" missing from dashboards Nov 12, 2024
@sosiology sosiology changed the title ✅ "Created with visualize.admin.ch" missing from dashboards ✓ "Created with visualize.admin.ch" missing from dashboards Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants