US-GHG-Center / veda-config-ghg

Veda config for GHG
https://ghg-demo.netlify.app
Other
3 stars 15 forks source link

Change order of stories - via publication date? #181

Closed j08lue closed 8 months ago

j08lue commented 11 months ago

Stories ("Data Insights") are currently sorted alphabetically, resulting in this order:

image

Since we have one story per thematic area plus one intro story, it would be great to sort the stories in this order instead:

  1. U.S. Methane Sources [Anthropogenic]
  2. Tracking Greenhouse Gas Cycles [Natural]
  3. Discovering Large Methane Emission Events with Remote Measurement [Methane emissions]
  4. Intro to the US GHG Center

While the app currently does not support arbitrary ordering, could we

  1. Sort by date by default (most recent first)
  2. Set the publication dates on the stories such that they come in the right order?

Acceptance criteria

sandrahoang686 commented 10 months ago

@j08lue just to be clear - currently the Stories page has the sorting by publication date ascending and descending. Default is sorting by Name though. This ticket wants to switch the default sorting to publication date with most recent coming first correct?

And then i'm not too sure what you mean by #2? - can you clarify? Set the publication dates on the stories such that they come in the right order?

j08lue commented 10 months ago

This ticket wants to switch the default sorting to publication date with most recent coming first correct?

Yes! @danielfdsilva agreed that this would be a sensible default and we can just make that stick across all instances (i.e. not configurable but in veda-ui).

can you clarify "Set the publication dates on the stories such that they come in the right order"

Sure! We would like the currently existing four stories to show in this order:

  1. U.S. Methane Sources [Anthropogenic]
  2. Tracking Greenhouse Gas Cycles [Natural]
  3. Discovering Large Methane Emission Events with Remote Measurement [Methane emissions]
  4. Intro to the US GHG Center

Their publication date is somewhat arbitrary, so we can just change that for all the four stories so that they by default (ordered by recency) show up in this order.

https://github.com/NASA-IMPACT/veda-config-ghg/blob/00b242e8473e95781d44b75b6c83cae72e6089fb/stories/discovering-large-methane-emissions.stories.mdx#L10

Hope this was helpful?

sandrahoang686 commented 10 months ago

PR to VEDA UI to update default sorting

sandrahoang686 commented 10 months ago

PR to veda-config-ghg to update sorting of stories based on this issue