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

Added the file/newFile menu including menu entries #12819

Merged
merged 6 commits into from
Aug 21, 2023

Conversation

jonah-iden
Copy link
Contributor

@jonah-iden jonah-iden commented Aug 9, 2023

What it does

Fixes #12755

this adds the new file/newFile independent submenu which is used by extensions to contribute creation of new files with specific types.
The Menu is then used by the new File->New File... menu entry

Buttons to change keybindngs for the contributed new file commands are currently missing.
Out of some reason i couldn't find the commands in the keybindings

How to test

Best to test is probably with the Python extension

  1. install Python extension
  2. go to File->New File...
  3. A quickpick should open with different file types
  4. Select New Python File and see a new untitled .py file is created

Review checklist

Reminder for reviewers

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

VSCode displays things a bit differently:

image

Looking at the registered command, it seems they are using the shortTitle of the command as the label of the quick pick item:

{
  "title": "%python.command.python.createNewFile.title%", <-- "New Python File"
  "shortTitle": "%python.menu.createNewFile.title%", <-- "Python File"
  "category": "Python",
  "command": "python.createNewFile"
},

Also, the item seemed to be grouped by a group attribute of the registered menu entry. See here.

I think we should align to their design, which is a bit more focused on the actual file types than on the names of the commands.

On another note, I believe that the playwright tests need to be changed a bit.

@jonah-iden
Copy link
Contributor Author

yup have seen the playwright tests.
Regarding short title and group, there seemed to be some problems regarding getting those on frontend side. But i can look again tomorrow if i overlooked something

@jonah-iden
Copy link
Contributor Author

it seems like there is currently no support in theia for both the groupand the shortTile attribute. Maybe we should create a new issue for that

@msujew
Copy link
Member

msujew commented Aug 11, 2023

@jonah-iden Can you create an issue for that and add the link to the showNewFilePicker method as a @todo? Afterwards I think this should be good to go 👍

@jonah-iden
Copy link
Contributor Author

here is the issue #12824

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Alright, with #12824 in mind, this looks good to me 👍

@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility menus issues related to the menu labels Aug 18, 2023
Signed-off-by: Jonah Iden <[email protected]>
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@msujew msujew merged commit de2e7e1 into eclipse-theia:master Aug 21, 2023
6 checks passed
@vince-fugnitto vince-fugnitto added this to the 1.41.0 milestone Aug 31, 2023
kittaakos pushed a commit to arduino/arduino-ide that referenced this pull request Sep 12, 2023
kittaakos pushed a commit to arduino/arduino-ide that referenced this pull request Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
menus issues related to the menu vscode issues related to VSCode compatibility
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

vscode: implement support for file/newFile menu contributions
3 participants