Menu toggle for different reply modes

I started work on this one, quite excited about it:

As it’s using select-kit, it will also be very easy for plugins to add options in this menu.

15 Likes

Getting almost there, I have to tweak a little bit some actions but it’s working:

(link to a not flickering source: Cheesecake are awesome until they fall on the ground - Site Feedback - Discourse.webm - Google Drive)

7 Likes

This is now deployed as of:

https://github.com/discourse/discourse/commit/9923829402997c7af3e25121d6d3a345536f3884

Please let me know what you think.

@erlend_sh I didnt implement the “reply to selected post” feature as it’s not clear to me how it works/and what it brings. Could you elaborate please ?

14 Likes

Going to put this out as public feedback as well cause we have a lot of whispers here that are discussing it and I wanted to have something public.

The menu here needs to change from being “mixed toggle / mixed action” to 100% toggles.

It is mega surprising to have this post directly from that menu, my expectation is that a “blue” button will cause a post and having a context menu sub item post stuff is mega surprising.

All the thing there should do is toggle modes.

“Reply as new topic” toggles you current response into “new topic” mode.

And so on…

It also needs to remember previous context so you have “easy undo”

For example:

Reply to post #10
Click: reply as new topic
Click: reply to topic
Click: reply to post by @sam

We are back to replying to post #10

If the “blue” reply button had a downward triangle on it, I would expect it to post right away after you click the little triangle and select something, but I don’t feel we want that kind of UI.

6 Likes

Was talking of this with @erlend I get your point and will do it this way. Just explaining my initial position: this was a power feature mode so I wanted everything to be the fastest and not perfectly intuitive. Doing this it will be a mix of intuitive and fast which is fine to me.

7 Likes

Agree with all the feedback so far – one way you could make it faster (on keyboard at least) would be to have some shortcut to open the menu, or tab index after the compose text area. Then if you want fast:
Compose reply,
shortcut to open and focus reply type
downenter (select reply type)
ctrlenter (post)

2 Likes

One big pain though with keyboard shortcuts in the composer is that they require a lot of keyboard mushing eg ctrl alt f, it just ends up being so much work that I usually just reach for the mouse :cold_sweat:

If you choose something easy odds are super high it clashes.

3 Likes

Fair point. That’s why the alternative suggestion was tab indexing. Similar workflow as before but:
Compose,
Tab to focus reply type
Arrows + enter to select reply type
Ctrl enter to post.

Not sure if that would complicate screen readers, but it’s a way around the hand cramping shortcuts.

1 Like

One small thing: would anyone be opposed to making this stand out slightly more as a button?

This (closer to our default button style)

instead of

:heart_eyes_cat: love this feature, btw

9 Likes

@david concerning a bug mentioned by @awesomerobot in whispers:

I linked it to the presence plugin which is I think not expecting we could create a new topic when we are browsing a topic. And will then subscribe to a null channel to messageBus in this case here : https://github.com/discourse/discourse/blob/master/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6#L79

I think we shouldn’t try to subscribe to anything if action is not reply or edit. What do you think ?

1 Like

That sounds reasonable, there’s no need for any presence features on new topics.

The code has changed a lot since I wrote it, so I couldn’t say offhand where that change would need to be made. Longer term it would definitely be good to move a lot of this presence logic into message-bus as @sam mentioned a while ago

I think it should be quite subtle, so I prefer the current design. This is an extreme power user feature, not something we want to call a lot of extra attention to.

1 Like

I just pushed a commit which should largely improve the situation. Let me know what you think @sam

7 Likes

Looks so much better!

2 Likes

“Toggle whisper” is missing in the dropdown when I click the topic’s reply button. It’s only visible after clicking a post’s reply button. Is that intentional?

3 Likes

Should be fixed thanks!

5 Likes

Love the improvements!

BTW, here’s a PR for the suggestions on tab indexing (here implemented as index 8, after the ‘cancel’ focus) and adding :focus styling – Something like this would suit my needs as a keyboard user.

https://github.com/discourse/discourse/pull/5575

5 Likes

That was my first reaction.

I disagree. Replying privately to a public message seems like a fairly useful thing to do (but maybe we don’t want to encourage private conversation?), and the only way that I know to do that is with the :black_flag:.

And when I was teaching with Discourse, reply-as-linked-topic was very useful for people to start a new topic with their solution to the exercise.

3 Likes

Correct, we don’t want to do that.

1 Like