Sidebar Menu Reorder

Hi Lilly, perhaps you can ask about it or take a breath? Your replies felt some kind of rude to me and I just asking something to you with respect.

NAVBAR TITLE
subscribe

NAVBAR TITLE
suscribe

Both point to different links and one needs to be shown to subscribers users, the other to everyone else.

I think I was clear on my first request and if it was not, that completes the picture. I’m using both theme components you named (thanks!) and I saw here their names for reordering are their slugs so that did not worked out the box in my specific use-case.

That was not a critique but an eventual point to improve. Like arranging them from their IDs or something you know very much better than me, as a dev.

I’m not asking you nothing more here, anyways. Have a good day.

so you come into my component topic and gaslight me and call me rude because i don’t understand your posts? maybe read the documentation.

welcome to my ignore list.

Quick note on the tone question - I didn’t read Lilly’s replies as rude, just brief answers to a question that wasn’t fully clear yet from the outside and a hint that the aspect of links not working for everyone might be unrelated to her component.

On the actual problem: having two sections share the same slug isn’t an issue by itself - they can coexist fine in the sidebar.
This component positions sections via data-section-name in CSS, and that’s the only stable hook exposed in the rendered DOM. There’s no separate ID for a section beyond its slug, so two sections with an identical name can’t be assigned different order values - the component can’t tell them apart, and neither could any other CSS-based approach, since the DOM simply doesn’t expose anything more granular to select on.
So this isn’t a matter of a small improvement, as you suggested with the ID idea - it would require the DOM to expose something Discourse currently doesn’t or a fundamentally different approach.

I am still not entirely sure what your problem is with the reorder component regarding it using slugs. In your example both sections are next to each other - this would work fine with this component. Maybe you can still help to clarify what exactly your problem was with reordering your sections.

3 Likes