Hide 'New Topic' when no permission

Hi everyone,

Is it possible to hide this button when you can’t actually use it? Thought that the standard installation would include this, however, it does not. Seems like a no brainer. Doesn’t seem like that’s an option, so this is a feature suggestion.

Thanks.

1 Like

I use this CSS to hide the disabled button together with the tooltip:

.category-navigation button[disabled] {
    display: none;
    + span.fk-d-tooltip__trigger {
            display: none;
    }
}
4 Likes

Hi,

Great - that works! Thanks @thoka! Hopefully someone from Discourse can see this and possibly implement it, there’s no need for users to see that they can’t do something.

1 Like

Sometimes being able to see what they can’t do can help advertise the feature to them. For example, if they would be able to do it if they joined a group or paid a subscription or used the platform more so they had a higher trust level, then showing a disabled button (or link or whatnot) can help them become aware the feature exists.

But I agree that it’s not always helpful to show such things.

5 Likes

One thing to consider here is user experience. If they see the button disabled, it’s pretty clear that for some reason they can’t create a topic. However, if it’s hidden, they might spend a long time looking for it, thinking it must be somewhere else or that there’s some trick to it!

7 Likes

Great point Bryce,

You may be right, in terms of UX, it makes perfect sense. However, it’s just not executed in the best way, in my opinion. There should be an option to toggle whether the button is visible or not, and there should possibly be a padlock, instead of the ‘i’.

For example, I can’t post in the Meta announcements, and the button does tell me that. However, instead of the + next to ‘New Topic’, the padlock would be better as stated.

Image

In the image, you can see that the ‘i’ hover isn’t a part of the same button so it doesn’t look nice. What would be better, would be a hover-able ‘New Topic’ button, something like this:

Cool

It’s flush within the same element and just looks better, in normal conditions, it’s greyed out so users can still understand that they cannot post on it, and instead of hovering on the separate ‘i’, they can just hover on the main button as they would normally do.

2 Likes