w3c / w3c-website

W3C Website feedback and bug reports
https://www.w3.org/
240 stars 80 forks source link

Remove 'Ecosystem' fields from Ecosystem entry and use slug as shortname instead #42

Open JuliaSang opened 2 years ago

JuliaSang commented 2 years ago

@vivienlacourba

I think the ecosystem slug and shortname should match (I don't see a case where they would need to differ, and if we have to rename an ecosystem then we would need for this to be reflected both in the URI and in the shortname anyway). So I suggest we remove the redundant "Ecosystem" field

JuliaSang commented 2 years ago

@vivienlacourba @koalie

I checked in with @maries24 on this one, in case the change would have any effect on content entry. Marie replied:

There is no risk of losing any entered content. It will change one detail (we’ll need to make sure the slug is right) but there are so few ecosystems that even if we have to readjust them all, it won’t take long.

I hope that answered your question, but if I misunderstood anything please do reply and copy in Marie.

vivienlacourba commented 2 years ago

(trying to rephrase my request)

@maries24, can we get rid of the redundant "Ecosystem" field in the ecosystems entry (which I circled in red in the first screenshot below) as the link between an ecosystem entry and the corresponding ecosystem category is already there as we want to have an exact match between the ecosystem entry slug and the ecosystem category slug (which I highlighted in blue in both screenshots).

ecosystem-content-entry-with-unneeded-ecosystem-field

ecosystem-category

maries24 commented 2 years ago

This is more complicated than expected.

This Ecosystem taxonomy field is used to:

There are two routes to removing this redundant 'Ecosystems taxonomy' field to Ecosystem entries.

  1. We get rid of the ecosystem taxonomy field in the Ecosystem entry only. But then we have to review all our queries to pull related content from the CMS. The Craft GraphQL implementation only allows pulling content based on a taxonomy term ID (as opposed to its slug). So we'd have to convert the Ecosystem entry slug into the corresponding taxonomy ID to get that related content... which is risky at this stage and will make the queries complex.
  2. We get rid of the ecosystem taxonomy field everywhere it is in use. We replace it with a field to pick Ecosystem entries (as opposed to taxonomy terms) for blog posts, testimonials, events, etc. This then requires to make a fair few CMS changes on top of still needing to review the queries, and having to manually re-enter Ecosystems in the CMS where they were already assigned to blog posts, events, etc.

@jean-gui Is there any simpler solution that you can think of and that I'm missing?