equinor / energyvision

Home of the equinor.com website
https://www.equinor.com
MIT License
34 stars 8 forks source link

Remove isStatic in link component #986

Closed wenche closed 2 years ago

wenche commented 2 years ago

During migration we added a switch for isStatic in the link selector component. The idea was to use this in combination with the url for some static content to be able to create a Next link (since it's internal content from the clients point of view). However, this feature is not much used, and could probably be removed from the code base as it adds some complexity both in the Sanity and in the web.

TODO

EDIT: This is actually used for linking to some of the old news articles. Should we find a clever way to solve this issue in particular?

fernandolucchesi commented 2 years ago

Possible solution: figure out all places where isStatic is being used -> refactor to external links -> remove isStatic

(isStatic was intended for old AEM topic pages)

padms commented 2 years ago

Below are the links which has text block with static links ( linking to archived news )

  1. https://www.equinor.com/where-we-are/germany
  2. https://www.equinor.com/investors/the-equinor-share
  3. https://www.equinor.com/energy/hydrogen
  4. https://www.equinor.com/no/energi/hydrogen
  5. https://www.equinor.com/energy/mariner
  6. https://www.equinor.com/energy/hywind-tampen
  7. https://www.equinor.com/no/energi/hywind-tampen
  8. https://www.equinor.com/where-we-are/european-union
  9. https://www.equinor.com/investors/our-dividend
  10. https://www.equinor.com/energy/electrification-of-platforms
  11. https://www.equinor.com/no/energi/elektrifisering-av-plattformer
  12. https://www.equinor.com/energy/shipping
  13. https://www.equinor.com/no/energi/shipping
  14. https://www.equinor.com/energy/h2h-saltend
  15. https://www.equinor.com/energy/northern-lights
  16. https://www.equinor.com/no/energi/northern-lights
  17. https://www.equinor.com/investors/annual-reports
  18. https://www.equinor.com/energy/sorlige-nordsjo-2
  19. https://www.equinor.com/no/energi/sorlige-nordsjo-2
  20. https://www.equinor.com/energy/offshore-wind
  21. https://www.equinor.com/energy/volve-data-sharing
  22. https://www.equinor.com/where-we-are/south-korea
  23. https://www.equinor.com/sustainability/our-approach-to-human-rights
  24. https://www.equinor.com/no/baerekraft/var-tilnaerming-til-menneskerettigheter
  25. https://www.equinor.com/energy/data-sharing
  26. https://www.equinor.com/energy/utsira-nord
  27. https://www.equinor.com/no/energi/utsira-nord
padms commented 2 years ago

Pages with Promotiles having static links https://www.equinor.com/no/energi/elektrifisering-av-plattformer https://www.equinor.com/energy/electrification-of-platforms

padms commented 2 years ago

@meols Above are the links to pages that have static links to archived pages. Do we need these links to archived pages?

padms commented 2 years ago

@meols Please take a look at the comments above.

padms commented 2 years ago

@meols @jorgol I checked the links again and all these pages have static links pointing to archived news. image.png

ghost commented 2 years ago

Thanks. I'll review all the pages manually and correct/remove where needed. Not that many :)

ghost commented 2 years ago

@padms I've now gone through all of the listed pages and replaced the static links. Can you do another crawl to be sure? If there are no hits, I believe we're ready to remove the static links feature.

padms commented 2 years ago

@jorgol Only this page is left ( which is missing in the above list ) https://www.equinor.com/investors/quarterly-results

ghost commented 2 years ago

Thanks, @padms. I've gone through this page and re-published now. As there were many links, could you re-check just to be sure?

padms commented 2 years ago

@jorgol All the Q4 press release links are not updated. 5 of them

ghost commented 2 years ago

@padms You're right. Fixed. Please check again now.

padms commented 2 years ago

Added feature flag in the query. Will clean up web after acceptance.

fernandolucchesi commented 2 years ago

LGTM

padms commented 2 years ago

@meols Option to add static urls is removed from call to actions in textblock, footer, menu, table and promotiles components. This can be tested in dev.

meols commented 2 years ago

Great! Thanks @padms