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

U4-10537 - Enable editor to skip Macro Selection step, when there is only one macro, and it has parameters #2241

Merged
merged 2 commits into from Jul 25, 2018

Conversation

marcemarc
Copy link
Contributor

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.

…nly one Macro and it has parameters (is this a controller still used? )
@marcemarc
Copy link
Contributor Author

discussed with @nul800sebastiaan and @hartvig at the UK Hackathon, and we think this is a good thing, but just too late in the day to merge into the hackathon release

@nul800sebastiaan
Copy link
Member

Thanks @marcemarc - makes total sense and works as expected! 👍

@nul800sebastiaan nul800sebastiaan merged commit b39b724 into umbraco:dev-v7 Jul 25, 2018
@marcemarc
Copy link
Contributor Author

@nul800sebastiaan w00t

@hartvig
Copy link
Contributor

hartvig commented Jul 30, 2018

Awesome to see this part of Umbraco getting some TLC.

I understand the use-case and appreciate the improvement, but my only concern is that this means the UX becomes inconsistent. Ie. in one scenario this would open the select macro option and in another it would open options for a specific macro.

The ideal solution would be to allow special insert-specific-macro buttons to be added to the RTE.

@marcemarc
Copy link
Contributor Author

@hartvig it sort of doesn't make the UX inconsistent, to an editor who only uses a site that happens to have one macro, which has parameters eg there is nowhere else they can see the alternative... but then there is a mismatch with the name eg 'macro'

So I love the suggestion that you could easily configure a custom tiny mce button to fire a particular macro...

It's kinda what we ended up doing for the client in the end: (because they also wanted to pop open an image picker):

https://youtu.be/BunOlQ1xzHg

but it was quite tricky to get working, let's make macros great again!

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

Successfully merging this pull request may close these issues.

None yet

3 participants