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

Favourite Alias is not visible after long command #1033

Open
Tracked by #1034
DanielOL1 opened this issue Jun 19, 2024 · 1 comment
Open
Tracked by #1034

Favourite Alias is not visible after long command #1033

DanielOL1 opened this issue Jun 19, 2024 · 1 comment

Comments

@DanielOL1
Copy link

Describe the bug
Overall: The alias functionality for favourites does not work, when using long maven execution commands: if the command is long, the defined alias does not appear in the UI.

Detail: I have several long, similar maven executions in a project. In the favourites list I cannot easily see which is which. It would be very useful to have a defined Alias for each, with a shorter, simplified descriptor, so that they could easily be distinguished from one another. However, the "alias" is pushed off screen, not visible in the UI, because of the length of the "command".

Suggestion: revert the changes in this commit (cdf6f7b) to the file: src/explorer/model/FavoriteCommand.ts
Justification: In order for Alias to have a purpose it must be visible in the case of long execution commands. It is easier for a user to reduce the length of the alias, than it is to reduce the length of the command. If the user prefers to see the command first, then they can completely omit the alias since the other changes in this commit appear to have made the alias an option parameter.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'vscode > settings.json'
  2. Add any number of favourites objects with alias (string), command (string) and debug (boolean) as per the docs
  3. include a command which is long (eg. longer than 200 or 300 characters), such as by including file / directory paths in arguments.
  4. Save the settings file
  5. View the new favourites in the list of saved favourites, in the extension menu / maven explorer - the alias is not visible when the command is very long.

Expected behavior
User can decide to define shorthand a shorthand alias to refer to their favourite execute, in order to simplify the favourites menu.

Environments (please complete the following information as much as possible):
I do not believe environment is a factor

@gavin-lb
Copy link

gavin-lb commented Jul 9, 2024

This is quite annoying. Indeed, the obvious solution is simply to have the alias take precedence over the command when set, ie. it should be displayed as ${alias)} ${command} rather than ${command} ${alias}. Clearly the alias will be more meaningful than the command (that is the entire purpose of setting an alias), hence it should be displayed first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants