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

🔨 remove default layer from chart configs / TAS-675 #4103

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Nov 1, 2024

Removes the default layer from the full config of charts.

This is the smaller version that removes the default layer from the full configs of all charts but keeps using it in the admin. If I find the time this week, I also want to remove the admin's dependence on the default config, but even if I don't find the time, I think this PR is okay to be merged as is since keeping the default config up-to-date is zero effort (we have a GitHub action that infers the default config from the schema and automatically commits it).

I tested this by comparing the previously baked Grapher configs with the now-baked Grapher configs. The diff was empty for most configs. There were a few that used to have map.colorScale set to an empty object (not sure why) that is missing now, but that makes no difference to Grapher.

The SVG tester differences are due to a parent PR.

@owidbot
Copy link
Contributor

owidbot commented Nov 1, 2024

Quick links (staging server):

Site Admin Wizard Docs

Login: ssh owid@staging-site-remove-default-layer

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-11-11 17:17:25 UTC
Execution time: 1.24 seconds

@sophiamersmann sophiamersmann force-pushed the remove-default-layer branch 5 times, most recently from 00ca4a3 to 520d3e6 Compare November 4, 2024 14:38
@sophiamersmann sophiamersmann changed the base branch from master to line-chart-yaxis-min-viz November 4, 2024 14:38
@sophiamersmann sophiamersmann force-pushed the line-chart-yaxis-min-viz branch from d057b20 to d3b015d Compare November 4, 2024 16:38
@sophiamersmann sophiamersmann force-pushed the line-chart-yaxis-min-viz branch from d3b015d to a680591 Compare November 6, 2024 10:47
@sophiamersmann sophiamersmann force-pushed the line-chart-yaxis-min-viz branch from a680591 to 8438f8a Compare November 6, 2024 11:23
@sophiamersmann sophiamersmann marked this pull request as ready for review November 6, 2024 12:48
@sophiamersmann sophiamersmann force-pushed the line-chart-yaxis-min-viz branch from 8438f8a to 9bf41a6 Compare November 6, 2024 12:59
@sophiamersmann sophiamersmann force-pushed the line-chart-yaxis-min-viz branch from 9bf41a6 to 5da7000 Compare November 6, 2024 15:46
Copy link
Contributor

@danyx23 danyx23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this! I have found one issue though and I'm not sure if this is because the admin does things differently now or if this is just a little bug or if I misunderstand how this is supposed to work.

Here is what I did:

  • take a line chart (like this one) that does not currently have inheritance
  • create a parent admin layer chart
  • set a property to a non-default value (e.g. y column max) and save
  • in the original standalone chart, refresh and check that the parent is now set
  • go to the customize tab and click "bind to data" under y column max

I would expect the parent value to be in effect now but it is the default value. Am I wrong or is this a bug?

@sophiamersmann
Copy link
Member Author

"Bind to data" means the y-column max is inferred from data, it essentially sets yAxis.max to "auto". I haven't tried but the behaviour sounds correct to me.

@sophiamersmann
Copy link
Member Author

The label is maybe a bit confusing – maybe "Unset" would be clearer?

Base automatically changed from line-chart-yaxis-min-viz to master November 8, 2024 10:18
@sophiamersmann sophiamersmann changed the title 🔨 remove default layer from chart configs 🔨 remove default layer from chart configs / TAS-675 Nov 11, 2024
Copy link

@sophiamersmann
Copy link
Member Author

@danyx23 do you think you have time to finish this review in the next week or so? I think it would be good if my changes and especially Marcel‘s work on narrative views builds on this.

@danyx23
Copy link
Contributor

danyx23 commented Nov 15, 2024

Hey @sophiamersmann, thanks for the ping! (btw please ping me earlier next time, I don't get a notification if you reply here without mentioning me :)). I played with it and it looks good! The only thing that would need to be changed now is that Martin has merged his work to add chart_config entries for Mdim views and they would also need to be stripped of the defaults for completeness. I think it shouldn't be much work and it would be good to include this in this PR but if you think this is too much work now then it's also fine to merge this as is and do the mdim work in cooldown.

@sophiamersmann
Copy link
Member Author

Thanks! Yes, I'll rebase & update the PR

@sophiamersmann
Copy link
Member Author

@danyx23, as far as I can see, the defaults haven't been merged into the mdim view configs. Am I missing something?

@danyx23
Copy link
Contributor

danyx23 commented Nov 18, 2024

@sophiamersmann Ah interesting - that was sort of a bug in that work then that now is a feature :). Yes, then there is nothing left to do in that regard and this can go. :shipit:

@sophiamersmann sophiamersmann merged commit 88e3efb into master Nov 19, 2024
22 checks passed
@sophiamersmann sophiamersmann deleted the remove-default-layer branch November 19, 2024 15:50
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.

3 participants