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

Data pages: fix rendering and wording issues #2755

Closed
19 of 20 tasks
Tracked by #2733
danyx23 opened this issue Oct 12, 2023 · 3 comments
Closed
19 of 20 tasks
Tracked by #2733

Data pages: fix rendering and wording issues #2755

danyx23 opened this issue Oct 12, 2023 · 3 comments

Comments

@danyx23
Copy link
Contributor

danyx23 commented Oct 12, 2023

  • Following Ed's suggested (it seems we already decided about it at some other time in the past) scatter plots should not show population in the footer of the chart, but they should show population in the sources tab (in "Data published by").
  • The heading of the text section "What you should know about this data" should change to something less strong when showing something other than the description_key field and be hidden if we have no text.
  • Bullet points from description_key are not picked.
  • I have the text How the producer of this data - undefined - describe this data?
  • Collapse snapshot origins into a single one when they refer to the same data product.
  • The text in the full citation is faded too early (see screenshot in comments below)
  • Instead of mentioning Twitter (in "How to cite this data"), we should say "social media".
  • We should not say "OWID" anywhere (as it happens in "How to cite this data").
  • It seems like the link we provide in the full citation is the download link. I suppose it should instead be the main url of the source.
  • Also, should we include URLs? (e.g. What happens if it's very long and messy? How to ensure links won't break?)
  • We should show the date of next expected update. This should be based on dataset.update_period_days and the current date (if it's passed, increase it by a month).
  • Currently, the short and full citation seem to use the format "Producer 1; Producer 2" and "Producer, data product title; Producer 2, data product title 2". Maybe they should instead use the indicator's attribution_short and attribution.
  • Change the wording of "processed" or "adapated" by under the chart to "with minor/major processing by Our World In Data"
  • The slugify function that creates links from topic tags (so that clicking the topic tags in the top right links to the topic page) needs to be able to handle & and ' characters
  • If the time range for an indicator includes negative years (like our long run population data does), then show 10000 BCE to 2020 CE instead of -10000-2020
  • Last updated date should render as a formatted date instead of a raw date string
  • If there are multiple producers, use "[Main source] and other sources - Processed by Our World in Data"

The following issues will be fixed by switching to a new markdown engine

This work is tracked in #2758 and will fix these issues that were tracked here:

  • The processing description is not rendered properly (e.g. bullet points are put together without line breaks).
  • Jump lines and bullet points are not respected in the content of the same section (Note: this will need a new markdown renderer)

Other work

Another point that was tracked here is implementing the new designs for the "About this data" section below the chart. It was promoted to the tracking issuse #2733

  • Wait for new designs for the section below the chart that is more flexible for when descriptionShort and descriptionKey are missing, then implement them
@paarriagadap
Copy link

Found here owid/etl#1790:

  • When presentation.attribution_short is not defined, one section becomes How does the producer of this data - undefined - describe this data?. There should be fallbacks, like origins.producer
  • When using both presentation.title_variant and presentation.attribution_short with the same name they are shown repeated in the title of the data page, as in
image

@danyx23
Copy link
Contributor Author

danyx23 commented Oct 23, 2023

@paarriagadap On the first point of your comment: I don't think we can very well fall back to producer here - there may be several origins and it would be unclear where the text comes from. Maybe we could fall back to producer if there is only a single one? Should we fall back like this maybe? presentation.attribution_short -> origin.attribution_short -> origin.producer but the origin related ones only if it is a single origin?

On the second point - I can deduplicate this but I would argue that having the same text here is pretty weird. V-Dem should probably only be the attribution_short in this case and title_variant empty?

danyx23 added a commit that referenced this issue Oct 24, 2023
This PR introduces two different ways to iterate over the sources of a chart - a `columnsWithSourcesExtensive` and `columnsWithSourcesCondensed`. When rendering the sources at the bottom of the chart we want to only show the most relevant ones (i.e. hide stuff like population used for sizing a scatter) - for this we use the `Condensed` version. When showing the sources tab we use the Extensive so that all our sources are rendered there.

This is related to #2755 and fixes these points:
* [x] Following [Ed's suggested](https://owid.slack.com/archives/C0193RW5E2J/p1695720931545929?thread_ts=1695717004.876169&cid=C0193RW5E2J) (it seems we already decided about it at some other time in the past) scatter plots should not show population in the footer of the chart, but they should show population in the sources tab (in "Data published by").
danyx23 added a commit that referenced this issue Oct 24, 2023
This mini PR fixes a few issues of when and how certain heading texts were displayed

This is related to #2755 and fixes these points:
* [x] I have the text `How the producer of this data - undefined - describe this data?`
danyx23 added a commit that referenced this issue Oct 24, 2023
This Pr is a stop gap measure until we have the proper redesigns of the "indicator flashcard" section below the chart that better deals with missing texts. What happens here is that the descriptionShort is always shown if present, the descriptionKey is shown as a list and a bug with the "go to FAQ" button is fixed

This is related to #2755 and fixes these points:
* [x] The heading of the text section "What you should know about this data" should change to something less strong when showing something other than the description_key field and be hidden if we have no text.
* [x] Bullet points from description_key are not picked.
danyx23 added a commit that referenced this issue Oct 24, 2023
This PR improves the rendering of some dates and time ranges, updates the processing level (minor/major) text and fixes some minor wording issues.

This is related to #2755 and fixes these points:
* [x] Instead of mentioning Twitter (in "How to cite this data"), we should say "social media".
* [x] We should not say "OWID" anywhere (as it happens in "How to cite this data").
* [x] We should show the date of next expected update. This should be based on `dataset.update_period_days` and the current date (if it's passed, increase it by a month).
* [x] Change the wording of "processed" or "adapated" by under the chart to "with minor/major processing by Our World In Data"
* [x] If the time range for an indicator includes negative years (like our long run population data does), then show `10000 BC to 2020 AD` instead of `-10000-2020`
* [x] Last updated date should render as a formatted date instead of a raw date string
danyx23 added a commit that referenced this issue Oct 24, 2023
This PR overhauls how we do citations on datapages. Max and Joe came up with a new way for how to cite data pages themselves (the last thing in the citation section) that needs the citation information of the related topic page. 

There are also various minor improvements to the display of sources/origins.

This is related to #2755 and fixes these points:
* [x] Change the wording of "processed" or "adapated" by under the chart to "with minor/major processing by Our World In Data"
* [x] Switch to new data page citation format described by Max and Joe
@paarriagadap
Copy link

Hi @danyx23, sorry for replying late. Yes, that sequence makes sense.

Regarding the second point, it was only a migration/conversion confusion from json, so there's nothing to change there. Thanks!

@danyx23 danyx23 closed this as completed Nov 27, 2023
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

2 participants