Custom sidebar sections being tested on meta

I note that this is live (but experimental of course)! Brilliant! The OP could be updated to note this.

Also, it might be worth stating that it has the nice little globe only for @staff:
image
I discovered that only after I’d managed to hide it with CSS thinking that it would look silly for our regular users!

5 Likes

How does this work? Is it visible and editable by all staff? (Can it be restricted to admins only?)

2 Likes

Are there any restrictions to the type of links that that can be added? For example:

  • external links
  • /my/activity/bookmarks
  • /latest?order=activity&state=watching
2 Likes

Is it possible in settings to disable users from customizing the sidebar sections?

4 Likes

Currently it is visible to all, and editable by @staff. It can’t be restricted to admins only, but that would be a very helpful option.

Currently (whilst experimental at least) you can select who can see (and edit) custom links but it isn’t granular regarding editing global links.

image

Only /my links aren’t ok from those three. However, there seems to be a deliberate whitelist. I note that paths added by plugins are also not included (i.e. with the Custom Wizard Plugin /w)

You can muck about with this on Meta - it behaves exactly the same as for personal links.

7 Likes

Thanks a lot for confirming that. The /my/* links are a fairly important limitation for what I would need. I’m currently use a variation on this code to add custom links to the sidebar:

The above custom code is still a bit janky (custom links disappear if the browser is resized from narrow to wide again), so I’d prefer to use the official Discourse solution. But I wonder if maybe I could use that code as a stopgap to add the /my/* links to the official Discourse custom menu?

3 Likes

It seems strange that /my links are blocked because you can link to /u/{username} versions, at least for all the ones I tried.

EDIT: Screenshot added, and apologies to Falco, I just borrowed his username to show this because it was the first valid username I could think of :slight_smile:

4 Likes

We do plan on adding support for /my/* links in the not too distant future.

9 Likes

Dear team — you are (hopefully) allowing /my urls at some point. I would like to request one thing more: /safe-mode

It would help use of DiscourseHub a little bit when things goes sideways because there is close to impossible change url. And if I and we can do an admin section where is quicklink to safe mode among other shotcuts it would be… nice. Sure — there is always an option to use browser, but it needs more clicks :wink:

6 Likes

@nathankershaw, @ClawdiaWolf, @Jagster, @rahim123

Thank you for reporting those bugs about /my and /safe-mode links.

Both were fixed with this PR :slight_smile:

13 Likes

Has this been implemented fully yet? I can create a global section, but it is only visible to group members with modify permissions defined in enable_custom_sidebar_sections, and not as read only section for all users (‘Make this section public and visible to everyone’ is checked on the custom section).

2 Likes

Those links (i.e. /my/…) stays in black, that’s an improvement :wink: But nothing happends when clicked. Not here, not at my instance.

Did I misunderstand something?

3 Likes

You are right, both user custom sections and global custom sections are available only for users in groups specified in enable_custom_sidebar_sections site setting. There are no separate settings for global and user custom sections. You can enable the feature for everyone by adding all trust_level groups.

Sorry, there was a bug on touch screen devices like mobile phones and tablets. It should be fixed, could you please give it another try?

7 Likes

iPad loves Discourse again, aka. touching works just fine now.

Thanks!

6 Likes

Many thanks for making the /my/* links work. Is there any way to prevent them from opening in a new browser tab?

3 Likes

Yes, /my links are treated as external because full-reload is required for them. Therefore, new tab behavior can be controlled in Discourse Meta - The Official Support Forum for Discourse with Open all external links in a new tab setting.
After changing your setting, probably you will need to reload the page.

3 Likes

Ah, interesting, thanks for the explanation. Although I do want actual external links to be opened in a new tab by default for all users, so that’s less than ideal.

I wonder if there’s a way to add some kind of a placeholder like $USER or something and then make Javascript resolve it to the active user’s /u/username ?

4 Likes

Ah, I understand. You can change default behaviour in SiteSetting → User Preferences → default other external links in new tab.

Users still can overwrite default in their profile. Does it solve the issue?

4 Likes

Right, but most users prefer external links to be opened in a new tab. The reload issue with the /my/* links sounds a bit tricky to deal with, but maybe in the future something could be done with JS and a placeholder variable for the custom menu so that we can link to /u/username/* directly in custom menus.

3 Likes

Do they? Not to be snarky, but… Is there research on this?

Personaly, I find it annoying when a site senda links to a new tab. If I want a new tab, browsers have easy ways to do that — but generally no easy way to say “same tab, ignore the sites”.

And absent strong objective evidence, I have to assume my personal preferences are universal, right?

2 Likes