Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Unified Create from Template Experience #901

Closed
ntotten opened this issue Jan 25, 2019 · 4 comments
Closed

Unified Create from Template Experience #901

ntotten opened this issue Jan 25, 2019 · 4 comments
Labels

Comments

@ntotten
Copy link
Contributor

ntotten commented Jan 25, 2019

Today, we provide individual commands for creating each different kind of template as well as right click menu items for every create experience. This has started to become unwieldy for several reasons:

  1. The right click menu is growing long
  2. The SFDX command list is growing long
  3. The right-click menu cannot be filtered by folder type so you end up with things like SFDX: Create Visual Force Page on every folder in the entire project.

image

image

The proposed solution is to simplify the creation of any source into a single command that provides options. The command would be SFDX: Create From Template. It would be exposed in the command pallet and the right-click menu on all folders in a project.

When a user runs the command by right-clicking a folder, we should have a context as to where that command originated. As such we will present a list of templates to the user based on the folder selected. We will use the default folder locations of metadata to filter that list. So for example, if they run the command from the classes folder they would be presented with a list of apex class templates to create.

The UI to pick classes would initially be the built-in visual studio picker UI, but could eventually evolve into a more advanced custom template UI.

From an implementation standpoint this would also mean that each salesforce extension would no longer expose its own create commands. We would have a single create command exposed from the core extension. Thus ensuring a completely consistent experience no matter which type of source is created.

@vazexqi
Copy link
Contributor

vazexqi commented Jan 25, 2019

We will use the default folder locations of metadata to filter that list. So for example, if they run the command from the classes folder they would be presented with a list of apex class templates to create.

Minor

  1. What do you do when the user doesn't follow the names, which is allowed for some types since we use the file extension? Do we just fall back and present all of it?
  2. What do you do when you are on an Aura, LWC, or components that support subfolders? The name of the component can be arbitrary and have no mapping. Do we just fall back and present all of it?

I think we were asking for an VS Code API to at least get the full path to the resource but that was nevered. The full path might be able to help us here.

@ntotten
Copy link
Contributor Author

ntotten commented Jan 25, 2019

What do you do when the user doesn't follow the names, which is allowed for some types since we use the file extension? Do we just fall back and present all of it?

We wouldn't show anything. The assumption here is that if a user is using custom names (which is technically allowed, but really doesnt work that well in VS Code) they are an advanced user and will use the command+p menu item which will show all the template and then ask them where they want to create it.

What do you do when you are on an Aura, LWC, or components that support subfolders? The name of the component can be arbitrary and have no mapping. Do we just fall back and present all of it?

I think we can show the aura components on any subfolder.

I think we were asking for an VS Code API to at least get the full path to the resource but that was nevered. The full path might be able to help us here.

yes, this is the solution to that nevered issue which they wont do. That issue would allow us to filter when a command is shown in the tree, but that isnt needed anymore with this solution. The command would be a single command and always the same, but once the command is run we do know the path so we can filter the templates that are shown based on that path context.

@ntotten
Copy link
Contributor Author

ntotten commented Aug 6, 2019

@smaddox-sf smaddox-sf added type:feedback Feedback for new features and removed type:feature labels Oct 19, 2021
@diyer diyer added ui/ux type:enhancements Feedback to take into account for existing features and removed type:enhancements Feedback to take into account for existing features labels Aug 14, 2024
@svc-idee-bot
Copy link
Collaborator

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming session. We prioritize feature requests with more upvotes and comments.

@forcedotcom forcedotcom locked and limited conversation to collaborators Aug 23, 2024
@diyer diyer converted this issue into discussion #5738 Aug 23, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

5 participants