minvws / nl-kat-coordination

Repo nl-kat-coordination for minvws
European Union Public License 1.2
121 stars 54 forks source link

Request for discussion: using hierarchy instead of id for sidemenu selection #3167

Open HeleenSG opened 6 days ago

HeleenSG commented 6 days ago

Feedback from @underdarknl on sidemenu js: "Using ID's limits us to only having 1 sidemenu on a page. Could we use hierarchy to select these elements? Eg, document.getElementById("page-header") could be : document.querySelector('body > header')"

On pr: https://github.com/minvws/nl-kat-coordination/pull/2821/files

underdarknl commented 6 days ago

Lets do the basics first. Is it logical to have more than one sidemenu on a page, and still have this 'locked / sliding' behaviour?

Ifso, could we bind the sidemenu not to the content which is next to it, and use that contents height/position to contain the scroll/sliding behavior? That would remove the need to look up headers/footers, and would make things less 'hard' coded.