Ability to add a custom section of links to the sidebar

We want to allow users to add a custom section of links to their sidebar.

In a first pass for this feature, we plan to build upon the existing sidebar preferences page, and allow a user to add a single custom section for these links.

We think it can work something like this:

  1. checkbox for “Show Custom Section”.
    If checked Custom Section appears above Categories Section and values must have valid Name and at least one valid Link to “Save Changes”
  2. textbox for Name of the custom section (default: My Links, cannot be blank)
  3. button to “Add link”. when clicked, show dialog to add link
  4. Added links show button to remove it

Add link dialog

  1. Add link dialog has two text boxes: Name, URL
  2. Name cannot be blank, may include emoji (which should be rendered in the sidebar)
  3. URL must be a link to within the same Discourse site*
  4. Save adds link, Cancel discards it

When a valid custom section is configured and saved, the sidebar will show that section above “Categories”.

* Why?

  1. We’d like to be able to “highlight”/'bold" the link in the sidebar when you’re on the corresponding page.
  2. We’d like to store the “path” part, so site renames work as expected.

We think that adding links today will be valuable because it will allow folks to easily access things like “Open sidebar bugs” and enable us to take advantage of any future improvements for topic lists like improved topic list filters. As long as things have a URL, people can add them to their sidebar.

We think users will want to be able to add multiple sections and reorder them, but we will keep that out of scope initially.

8 Likes

One question on this, @mcwumbly. This looks like a strategy to allow a user to add personal links to the sidebar. Would this approach allow site owners to add links that all users would see?

Spoiler - I think it should. :slight_smile:

3 Likes

Yeah, I think it could certainly be expanded to do something like that, and I see how that’d be a more useful feature for some sites than the user one.

5 Likes

I really like this idea. :+1:

Just a few questions:

  1. Will there be a limit to the number of custom links a user would be allowed to add ?

  2. Will the end of links (in the sidebar) be truncated like on the following mock-up? (I’d be fine with it).
    And if they will, will the user be able to read their text in full length in a tooltip (if the mouse cursor hovers the links)?

Good question. We probably need some limits in place, but it’s not something we’ve discussed in detail. What kind of limits are you hoping to see (or avoid)?

1 Like

At first, I thought that 10 links could be enough but I guess other forum members will want more. Maybe 20. That’s why, I would try with 20 and wait for users’ feedback and see if they request more (but I think that 20 is already a good number).

1 Like

To extend the “user-friendliness” of this feature, it would be pretty cool to let the user drag and drop links (any link from the current Discourse page) directly to the sidebar.

A pointer (between links that were previously added to the “My Links” DIV) would indicate where the link would be placed.

Mock-up (right-click > “open image in new tab” to see the animation in full size):

anim01

Perhaps, the following page could help implement drag and drop?

4 Likes

I’d love to be able to set default links for my site, which users could dismiss. That would make this strictly better than the custom header links I’m using now, as I see it.

3 Likes