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
Allow hide theme for email and page constructors Mautic 5 #13539
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I really like this feature. For me, there's no need for a toggle – this simple trick works perfectly. I would suggest using the parameter hide = 1 or true when we need it, instead of isVisibleInGUI. It's much more common.
I also recommend adding icons with titles to the theme list to clearly indicate which themes are hidden. Similarly, these themes should be hidden, for instance, in the theme selector in forms.
or fa-eye-slash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice little feature - works as described. Also, the little Icon is nice and suited very well.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 5.x #13539 +/- ##
============================================
- Coverage 61.30% 61.04% -0.27%
+ Complexity 34002 33941 -61
============================================
Files 2238 2237 -1
Lines 101646 101457 -189
============================================
- Hits 62312 61932 -380
- Misses 39334 39525 +191
|
@kuzmany issues are resolved and your change requests are done, could you please check it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked as described when tested 👍
Just adding the UX team for review - please make a PR for the documentation which explains what the icon means and how/why to set it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for this improvement!
I’d like to point something to make this enhancement even better:
We could have an option, inside the dropdown, to allow administrators or roles with theme management permission being able to set a theme hidden or not…
Bc the way this functionality is being implemented right now, only technical people will benefit from it
Is there a possibility to add this link for an automatic toggle?
I’d also suggest to use the icon ri-eye-off-line (new icon pack)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @andersonjeccel; having an action or toggle button to hide will make more sense than updating the info file.
Currently, we don't have an entity to hold the theme meta information, just like the |
@shinde-rahul I recommend not using a toggle in this scenario. Even though it's possible to add one, it would require a significant amount of code and involve saving changes to the config.json file for each theme, among other things. @escopecz what do you think? |
@kuzmany, I am not suggesting the theme files update. It should mimic how the Campaign/Email/Plugins Published (Enabled) toggle button uses the theme as an entity to hold the data.
That way, administrators can control what themes to list and what not for the editors. This is good to discuss with others, too, so tagging @RCheesley @escopecz @oltmanns-leuchtfeuer |
@shinde-rahul I understand, but that's a lot of work (test coverage), and I bet the original author cannot spend on it, @Syrgak-Alan can it? Then we should discuss about real options (merge, or not merge it) |
Thanks for tagging me. It reminded me a PR that we have in Campaign Studio for the same feature. I quickly pushed it here: #13723 Please review which is better. |
Close favor to #13723 |
Description:
Allow Themes to be hidden in the theme-Selection when creating an email or page
Idea:
Steps to test this PR:
cd themes/<name_of_theme> && nano config.json
after add "hide" and set to it true value)Manually add