U4-10537 - Enable editor to skip Macro Selection step, when there is only one macro, and it has parameters #2241
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: http://issues.umbraco.org/issue/U4-10537
This PR means that when an editor clicks the Insert Macro Button inside a rich text area or grid, if the site only has One Macro, they will skip straight to the enter parameters stage, instead of having to pick the Macro when it's the only option available.
If the Single Macro doesn't have parameters, I've left it so that they still need to pick the single Macro, otherwise the immediate insertion of the Macro, is a bit un-nerving.
If there is more than one Macro then everything is the same.
I've put in two separate commits, as I'm not sure to what extent the InsertMacroController is still being used?
It is the MacroPickerController that is used in Rich Text Area and Grid.