platformsh / platformsh-docs

Platform.sh documentation. Templates available at https://github.com/platformsh-templates/
https://docs.platform.sh/
Creative Commons Attribution Share Alike 4.0 International
102 stars 330 forks source link

Update logic for search input element ID #4061

Closed gilzow closed 3 months ago

gilzow commented 3 months ago

Where on docs.platform.sh should be changed?

https://docs.platform.sh/search.html https://upsun.com/search.html https://github.com/platformsh/platformsh-docs/blob/main/sites/platform/static/scripts/xss/src/containers/Search.js https://github.com/platformsh/platformsh-docs/blob/main/sites/upsun/static/scripts/xss/src/containers/Search.js

What exactly should be updated?

The input element that is used for search has a static ID, but the element is placed in the /search.html page twice, with the same ID for both elements. Refactor logic in the react controller to assign different IDs based on where the element is used.

Additional context

In anticipation of adding more automated testing we need unique IDs so we can target them correctly.