Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help command] Utilize copy to clipboard #6244

Open
wants to merge 3 commits into
base: V3/develop
Choose a base branch
from

Conversation

TrustyJAID
Copy link
Member

Description of the changes

This reorganizes the display of help to allow users to more easily click the copy to clipboard on code blocks to copy the command input. Basically this just moves the "Syntax:" outside of the code block leaving most things the same. I also moved aliases outside of the base command for convenience but it's now inside its own code block.

Have the changes in this PR been tested?

Yes

@github-actions github-actions bot added the Category: Core - Help This is related to our help command and/or HelpFormatter API. label Aug 31, 2023
@TrustyJAID
Copy link
Member Author

Here's some examples of how this looks now.
image
image
image
On desktop you can click the code block to copy the contents of the code block. Users will still need to remove parts of command arguments to work properly. But this still makes it easier to copy/paste command input.

@Kreusada Kreusada self-assigned this Feb 13, 2024
@Kreusada Kreusada added the Type: Enhancement Something meant to enhance existing Red features. label Feb 13, 2024
@Kreusada Kreusada added this to the 3.5.6 milestone Feb 29, 2024
@Jackenmen
Copy link
Member

I like the idea though I feel like it falls apart when most commands have some arguments you need to pass. Ctrl+Backspace doesn't work too badly but I'm not entirely convinced to be honest.

I would be interested in learning whether anyone tried using this feature for a while and if they actually ended up using the ability to copy the command or if it was just a gimmick.

Also, I would welcome more feedback on whether this way of showing command syntax and aliases is perhaps considered by the users to look better on its own. If so, then the copy-paste benefit is just a bonus and the question of the usefulness of this feature isn't too important since we can just make the UI look better and be more functional at the same time.


Btw, if we wanted to optimize for mobile more, we could put the command name with the prefix without anything else in one of the embed areas (author name, description, field name/value, footer) since you can tap and hold to copy any part of the embed on mobile 😄 I don't think there's necessarily a suitable place for this anywhere in the embed for it to not look off but I am pretty sure this would be a bigger usability win than the ability to copy the command on desktop.

@Jackenmen Jackenmen modified the milestones: 3.5.6, 3.5.7 Mar 18, 2024
@BenCos17
Copy link

I would be interested in learning whether anyone tried using this feature for a while and if they actually ended up using the ability to copy the command or

I use it quite a bit on my bot
It's pretty handy on longer commands tbh

@Jackenmen Jackenmen modified the milestones: 3.5.9, 3.5.10 Apr 20, 2024
Copy link
Member

@Kreusada Kreusada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested these changes and they work great. I'd be interested to hear about your stance on Jack's suggestions before approving and merging this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - Help This is related to our help command and/or HelpFormatter API. Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants