RocketChat / Rocket.Chat.Electron

Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat
https://rocket.chat/
MIT License
1.57k stars 694 forks source link

Console launch flags for rocketchat-desktop #2651

Open makhnanov opened 1 year ago

makhnanov commented 1 year ago

Hello! Can you make some flags for open rocketchat-desktop from terminal? E.g. rocketchat-desktop --chat=username or rocketchat-desktop --help for show use cases.

preeesha commented 6 months ago

Hello @makhnanov, thanks for suggesting the feature.

preeesha commented 6 months ago

Hey @jeanfbrito I am really excited to work on this feature as integrating command line arguments one of my favourite and strongest topic but I can't do it alone. As far as I reviewed the code of the codebase, there're literally many options (including the suggestion made by @makhnanov) that can be added to the application to enhance it's user experience (or shell experience).

I need your sheer guidance on this topic. For background I have explored the startup process of the application and its state management mechanism using redux and various reducers. I believe we can read CLI arguments & leverage this system to pass the data to the application's state.

For the specific suggestion of this issue, we can read CLI argument and initialize the server pane's webview with the provided URI as an state.

Please let me know what are your views on my approach. Am I in a right direction? I am eagerly waiting for your reply.

preeesha commented 5 months ago

Heyy @jeanfbrito, can we start working on this one?

jeanfbrito commented 5 months ago

Yes, you can do it. But remember that we need to keep security in mind and this must be interesting to the users at all. I can't promise that we will accept and merge this. But you can always make a POC if you want.

On Thu, Feb 8, 2024 at 10:22 AM Prisha Gupta @.***> wrote:

Heyy @jeanfbrito https://github.com/jeanfbrito, can we start working on this one?

— Reply to this email directly, view it on GitHub https://github.com/RocketChat/Rocket.Chat.Electron/issues/2651#issuecomment-1934115392, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI7PCRE3M7X47PR64VY3X3YSTGQBAVCNFSM6AAAAAAXIPQ3DGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGEYTKMZZGI . You are receiving this because you were mentioned.Message ID: @.***>

-- Atenciosamente, Jean Brito.

preeesha commented 5 months ago

@jeanfbrito, according to me we should proceed by adding basic functionality such as:

  1. --server: Defines the URL of the server that gets opened very initially
  2. --config: Defines the configuration file path.
  3. --no-push-notifications: Switch to disable notifications (desktop's push notifications only)
  4. settings: Ability to modify the settings which are listed under the Settings UI of the app. It can has various arguments such as --font, --flash-frame=true/false, --tray-icon=true/false etc.

Let me know your views on these. I believe these options are far from harming the security as we are only customizing the behaviour using settings (but from CLI).

Thanks for your time Prisha Gupta