Closed wenche closed 2 years ago
Should have a meeting for this before we start to make sure that everybody knows what to do
Connected to #308
Discuss with Mette about prepending dates
The preview for news should probably work in the same way as with the rest of the pages: If there's no slug, preview by id instead. Currently the preview will show a message: "The product (!) needs a slug before it can be previewed." We should fix this, since actually adding the slug should not be the first thing to do.
I think we are able to preview by both id and slug, even if everything is in one document? If not, let's consider to just preview by ids all the time. This might also actually be easier, since the id has language information attached for the translations b2f7b874-7b05-4a4f-8033-f4b26841894e__i18n_nb_NO
@adneforslund to document why we want to change the news slug, benefits vs drawbacks
Add generate button, but not add routes, dont add dates with generate
@fernandolucchesi I have updated the UX for creating slugs in Figma here
Moved the generate button, removed the field for the generated slug to just a write out of the slug and changed the help text.
This is ready for review, could you take a look @wenche?
Sanity:
The design will be improved according to the sketches by #308
This is a HUGE change so it's not that easy to test 100%. It looks good at first glance, but we just have to keep our eyes open to see if something is missing or isn't correct :thumbsup:
Background
The news article was the first template we created in this project. Because news is published at regular intervals and not revisited like the topic pages, we took a different approach and decided to keep news outside of the Route concept. Bacause of that decision we have the slug field added directly in the news template.
However, we improved the way we handled the slugs when we worked on the topic pages. We wanted to have the complete URL in the slugs field (or the part after the lang part) https://equinor.com/no`/karriere/min-karriere`. The upside is that Sanity is the single source of truth and we avoid messy logic in the web. I also make it easy to have the dynamic catch-all slug approach. We should update the news template to use this approach as well, and this will probably make things less complicated for the satellite pages as well. Win - win.
TODO
Related: #308 to improve the mechanism for slugs fields
Acceptance criteria
What we do about the environment/Hva vi gjør for miljøet
)/sustainability/what-we-do-about-the-environment
|/barekraft/hva-vi-gjor-for-miljoet
slug