Is your feature request related to a problem? Please describe.
Today the FM gets from current selected branch. The idea is to auto create a new branch when something is edited, but based on a placeholder/ask for user giving a few options.
Our standard is have a branch called feat/<your-change-subject>. User cannot push to main, so the return is always an error.
The same problems applies to commits: we have a standard one that asks for type and scope, so since it's a edition on a doc, will be a feat(docs). But since I can add a suffix, but not a prefix, I can't do that.
Describe the solution you'd like
Have a global option to create a branch and use a branch name based on filename or giving user the option to explain the changes, add this explanation to the <your-change-subject> on feat/<your-change-subject>.
Describe alternatives you've considered
Additional context
**Is your feature request related to a problem? Please describe.**
Today the FM gets from current selected branch. The idea is to auto create a new branch when something is edited, but based on a placeholder/ask for user giving a few options.
Our standard is have a branch called `feat/<your-change-subject>`. User cannot push to main, so the return is always an error.
The same problems applies to commits: we have a standard one that asks for type and scope, so since it's a edition on a doc, will be a `feat(docs)`. But since I can add a suffix, but not a prefix, I can't do that.
**Describe the solution you'd like**
Have a global option to create a branch and use a branch name based on filename or giving user the option to explain the changes, add this explanation to the `<your-change-subject>` on `feat/<your-change-subject>`.
**Describe alternatives you've considered**
-
**Additional context**
-
<!-- github-sync-id:1813955955 -->
To start on the implementation, I am checking the best approach that would also serve other needs.
To enable branching support, I am considering adding the following setting: frontMatter.git.disableOnBranch. This setting would be an array of branch names to which users cannot sync their changes. Instead, they would see this in the UI:
If the user checked out another branch not on the list, they can sync without providing a new branch name. This allows the users to sync changes.
Another new setting would be the frontMatter.git.showCommitMessage, which will show a new input to set the commit message.
If not provided, the default message from the frontMatter.git.commitMessage setting is used.
The last new setting would be the frontMatter.git.newBranchPrefix. This setting would be used to define the prefix for your branching strategy. Like in your example: feat/.
Would the following changes be enough to fit your needs?
Thanks @AdrianoCahete for this suggestion.
To start on the implementation, I am checking the best approach that would also serve other needs.
To enable `branching` support, I am considering adding the following setting: `frontMatter.git.disableOnBranch`. This setting would be an array of branch names to which users cannot sync their changes. Instead, they would see this in the UI:
<img width="511" alt="Xnapper-2023-09-18-12 02 26" src="https://github.com/estruyf/vscode-front-matter/assets/2900833/bcd4ace1-668e-42b5-8d92-7a6c9f0d2bf5">
> If the user checked out another branch not on the list, they can sync without providing a new branch name. This allows the users to sync changes.
Another new setting would be the `frontMatter.git.showCommitMessage`, which will show a new input to set the commit message.
<img width="515" alt="Xnapper-2023-09-18-12 04 13" src="https://github.com/estruyf/vscode-front-matter/assets/2900833/32328cc6-2380-4a9f-87ee-8ed83fc3986d">
> If not provided, the default message from the `frontMatter.git.commitMessage` setting is used.
The last new setting would be the `frontMatter.git.newBranchPrefix`. This setting would be used to define the prefix for your branching strategy. Like in your example: `feat/`.
Would the following changes be enough to fit your needs?
<!-- github-comment-id:1723108358 -->
To enable branching support, I am considering adding the following setting: frontMatter.git.disableOnBranch. This setting would be an array of branch names to which users cannot sync their changes. Instead, they would see this in the UI:
The last new setting would be the frontMatter.git.newBranchPrefix. This setting would be used to define the prefix for your branching strategy. Like in your example: feat/.
I think that this setting will work for us, but the UI can have the select before the branch name, so user will choose from a dropdown all the options (and their descriptions) that we provide on config, like the "feat", "chore", "release", and adding the branch name after, internally creating a feat/branch-name.
I can do the Figma/visual idea later, but is something like:
Define branch to sync
[Prefix-Dropdown] [input to name branch]
it will be awesome if in this input we can add some rules that will warn or automatically applies, like no uppercase character, no space and other custom rules.
The idea is to make so simple that user will use only the Ui to sync all the content, view, edit and everything.
> To enable branching support, I am considering adding the following setting: frontMatter.git.disableOnBranch. This setting would be an array of branch names to which users cannot sync their changes. Instead, they would see this in the UI:
> The last new setting would be the frontMatter.git.newBranchPrefix. This setting would be used to define the prefix for your branching strategy. Like in your example: feat/.
I think that this setting will work for us, but the UI can have the select before the branch name, so user will choose from a dropdown all the options (and their descriptions) that we provide on config, like the "feat", "chore", "release", and adding the branch name after, internally creating a `feat/branch-name`.
I can do the Figma/visual idea later, but is something like:
```
Define branch to sync
[Prefix-Dropdown] [input to name branch]
```
it will be awesome if in this input we can add some rules that will warn or automatically applies, like no uppercase character, no space and other custom rules.
The idea is to make so simple that user will use only the Ui to sync all the content, view, edit and everything.
<!-- github-comment-id:1723394006 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Is your feature request related to a problem? Please describe.
Today the FM gets from current selected branch. The idea is to auto create a new branch when something is edited, but based on a placeholder/ask for user giving a few options.
Our standard is have a branch called
feat/<your-change-subject>. User cannot push to main, so the return is always an error.The same problems applies to commits: we have a standard one that asks for type and scope, so since it's a edition on a doc, will be a
feat(docs). But since I can add a suffix, but not a prefix, I can't do that.Describe the solution you'd like
Have a global option to create a branch and use a branch name based on filename or giving user the option to explain the changes, add this explanation to the
<your-change-subject>onfeat/<your-change-subject>.Describe alternatives you've considered
Additional context
Thanks @AdrianoCahete for this suggestion.
To start on the implementation, I am checking the best approach that would also serve other needs.
To enable
branchingsupport, I am considering adding the following setting:frontMatter.git.disableOnBranch. This setting would be an array of branch names to which users cannot sync their changes. Instead, they would see this in the UI:Another new setting would be the
frontMatter.git.showCommitMessage, which will show a new input to set the commit message.The last new setting would be the
frontMatter.git.newBranchPrefix. This setting would be used to define the prefix for your branching strategy. Like in your example:feat/.Would the following changes be enough to fit your needs?
I think that this setting will work for us, but the UI can have the select before the branch name, so user will choose from a dropdown all the options (and their descriptions) that we provide on config, like the "feat", "chore", "release", and adding the branch name after, internally creating a
feat/branch-name.I can do the Figma/visual idea later, but is something like:
it will be awesome if in this input we can add some rules that will warn or automatically applies, like no uppercase character, no space and other custom rules.
The idea is to make so simple that user will use only the Ui to sync all the content, view, edit and everything.
That would be great @AdrianoCahete 🙏
Related to #454
@AdrianoCahete have you had time to work on the Figma visual?
Not yet, I'm not in my home this week and the next.