Add Custom elements to Experimental Sidebar

Hey!

I noticed this cool sidebar thing within Discourse and I would like to know if there is some hacky way to add some custom elements to the sidebar.

Now also comes the question, can I somehow sort or arrange or even customize the default elements myself?

I would love to grab that Admin link and make it a button instead, so I have easy access to admin tools for example.

7 Likes

OMG. It was only after you mentioned the admin link that I was able to find it. Thanks for that.

It’s been 3 days without an answer, so I’ll give you my best guess as someone who has zero control or knowledge, but has been watching stuff here for 6 or more years.

The sidebar is still under fairly active development (It’s still called “experimental” after all!–and they aren’t even taking feature requests), so though you probably can customize it, whatever you do to customize it will very likely be broken very soon, so for now, you should just live with it as it is; if you’re that kind of person, you can upgrade every day or watch the github commits.

I’m unclear how having it be a button rather than a link would change anything? Would the button do something other than open the admin page as the link does now?

6 Likes

We’re planning to add a single “custom section” feature in the not-too-distant future, which would allow you to add arbitrary named links to things within your own site. Not sure yet when we’ll get to it, but in the initial iteration it’ll be pretty simple, but we think also pretty valuable.

This isn’t something we’re planning on at this point. If you want to dive deeper into this, can you start a new topic?

12 Likes

Looking forward to this!

I would immediately use this to create a “Feedback” section. This would have sub sections like “Contact Admin”, “Make a suggestion”, “Report a bug” etc. I wonder if this functionality is common/useful enough that it warrents being a default rather than customer element?

4 Likes

I like this idea.

My largest site uses custom header links that would likely make as much or more sense in a sidebar custom section in the long run. Of our three links there, one is to a sibling site (mastodon node) and two are internal to the discourse site itself. Not needing custom header links for that would I think be visually cleaner, keeping related information together.

2 Likes

We currently use the Custom Hamburger Menu Links theme component.

Currently just using that to add a link to the open source license for the project, because that’s important to us. We previously had some legal/compliance information there but we were directed to move that to the site footer. (Another plugin!)

We’re also doing some custom CSS styling, which I expect will still be possible.

3 Likes