RocketChat / feature-requests

This repository is used to track Rocket.Chat feature requests and discussions. Click here to open a new feature request.
21 stars 9 forks source link

Add /collapse and /expand commands #782

Open miscs opened 8 years ago

miscs commented 8 years ago

Hi all,

slack provides very useful slash-commands (https://get.slack.help/hc/en-us/articles/201259356-Using-slash-commands). would be very cool if rocket supports them also :) To us the most important commands are:

/collapse Collapse all inline images and video in the current channel (opposite of /expand) /expand Expand all inline images and video in the current channel (opposite of /collapse)

Because some users use links, hubot gif me, videos, images, ... a lot and others just don't want to see them.

What do you think? Best regards Steve

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

marceloschmidt commented 8 years ago

We already support a few commands, such as /invite, /join and /leave. I'll update this issue title to reflect the request for /collapse and /expand.

miscs commented 8 years ago

thank you!

engelgabriel commented 8 years ago

see https://github.com/RocketChat/Rocket.Chat/issues/1187

geekgonecrazy commented 8 years ago

The ability to hide media was added in: RocketChat/Rocket.Chat#2763 so this would just be a matter of hooking that up to a slash command

achen04 commented 7 years ago

Hi all, I've been trying to work on this and I was able to get /collapse to set "Collapse embedded media by default" to true in the preferences. But it seems like we will need to refresh in the chat page to reflect this change. Any advise for implementing the refresh aspect?

marceloschmidt commented 6 years ago

This should be a per user, per channel setting stored on the subscription.

lorek123 commented 6 years ago

I think most users don't want to do collapse or expand all messages via slash command. Could you also add something like /collapselast, which would collapse last collapsable message? Maybe we could see how it works in Slack/other apps?

cybtachyon commented 6 years ago

@lorek123 Slack and other apps collapse all.

"I think most users don't want to do collapse or expand all messages via slash command."

...Seems anecdotal. A user study/survey or parity with other competing products would bring a more compelling case IMHO.

aditya-mitra commented 3 years ago

Hello, I want to work on this issue if it is accepting PRs.

I have thought of my implementation details like this (currently only for the client side):

  1. User executes the slash command (/collapse). So, a new slashcommands-collapse has to be added.
  2. Now, in the ChatRoom client model, I will set a value collapsed:false for that roomId document.
  3. When the update is performed, I will change the state of collapse in the attachments.
  4. A similar implementation can be followed for /expand.
edilsonborges commented 3 years ago

@aditya-mitra i was just looking for that until find this issue. Will it possible to extend for hiperlinks? (e.g. spotify songs that loads the album cover)

aditya-mitra commented 3 years ago

Yes, I would love to work on that too @edilsonborges . I would start working on this as soon as one of members from Rocket.Chat team can approve or suggest some changes in my idea.