Right now, the only options for menu item visibility is via forUserType and the options are relatively limiting.
I would like the ability to write code that returns a boolean value that would control whether a menu item was visible. This could allow conditional display based on subreddit settings, whether the item is a top level comment or not, or even based on something like user flair (e.g. if you had a "trusted users" concept who could do pseudo-moderation).
I am aware that this could have downsides - if the code in the function wasn't extremely fast it could degrade the user experience.
Right now, the only options for menu item visibility is via
forUserType
and the options are relatively limiting.I would like the ability to write code that returns a boolean value that would control whether a menu item was visible. This could allow conditional display based on subreddit settings, whether the item is a top level comment or not, or even based on something like user flair (e.g. if you had a "trusted users" concept who could do pseudo-moderation).
I am aware that this could have downsides - if the code in the function wasn't extremely fast it could degrade the user experience.