-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Enable theming backend/frontend UI differently #465
Comments
|
Really we want someone to be able to edit the site, see it as the public would see it (themed) but all the stuff that the public doesn't see should be unthemed. This is option 2.
|
@vangheem I'm going to see if there is some simple way do (2), ie a body tag called "plone_backend" on all pages which only an editor can see but aren't the main view |
@vangheem how would a themer disable overlays from items on the toolbar? |
something like this should work:
|
@bloodbare I notice in the documentation there no longer seems to be a "plonenoui" bundle that only includes what is needed for the toolbar without any of the patterns stuff (which you don't need if you separating frontend from backend) |
so far works ok using the rule
|
Nice! How does this approach work if you have a view that is guarded by a 'View' permission and you want it to be themed? I like approach 4.), since you can focus only on your theme and not worry about the backend. E.g. by default the backend would be styled using barceloneta, but you would have the option in the theming control panel to switch the backend theme or use the same theme as for the frontend. Though this approach is probably a bit less flexible than 2.) and 3.). Note that a PR was recently merged that allows theme switching: plone/plone.app.theming#61
I think the idea is to use one LESS and one requirejs file, which import/include all the other LESS files and js dependencies. And for the production mode you provide a single merged/minified css and js file, using your own build system. I'm still wrapping my head around how all this fits together with the registry etc. We definitely need to work on the docs and provide clear instructions on how to work with static resources - it should be obvious how to integrate a static HTML/CSS/JS theme you get e.g. on themeforest (that doesn't use LESS and requirejs). |
Yes, some views do their own specific security checks so that makes things more difficult. |
@vangheem history and workflow actions are both filtered by permissions I think but I still think it's a bug. One should still be authenticated to see it. I'll raise them as separate bugs and see what others think. |
@jcerjak Currently it themes it if the view is guarded by the view permission or no permission at all. |
@djay There wasn't a plonenonui bundle, it's been always a bundle with non-logged-in and logged-in with plone staff in it, that means patterns/mockup. Logged-in does not have tinymce for example, and Non-logged-in has livesearch for example. You can always redefine what you want on each bundle and if you want it loaded by default on your own theme profile registry.xml. In my case the effort to do the front-end and the back-end using the same theme is not a problem, right now with the actual mockup isolation it's quite easy to integrate all plone js on any diazo theme. We've been doing some only theming plone 5 sites with diazo on top of barceloneta and it's really a pleasure. Manifest allow you to define a development JS/CSS (that can be a require.js and a less files) and a production JS/CSS (that is supposed that you will compile offline using your preferred tool (grunt/gulp/...) By the way, I'm always open to review any PR. |
@bloodbare I forgot that I was the one making that bundle. Here was the old PR. #832 |
@bloodbare We aren't having the same luck. We are trying to build on a theme using its own jquery etc and having issues with the fact it doesn't use require js. This is clashing with plones insistance on using require.js. And the goal is to be able to import any theme with minimal tampering with it. |
@bloodbare I have a branch of barceloneta now that has a cut down version for just backend. You would include it in your theme like
The problem is that I can't use another themes bundle from my theme. Or I can't have multiple bundles within a single theme. If I had multiple bundlers, perhaps I can have that includes the barecelonata code. |
@vangheem @ebrehault @esteele Why is this labeled future? It's an incredibly easy fix which saves themers a large amount of time. Why wouldn't we want to make plone 5 the easy to theme release as well as easy to use? Here is a video of it working now (well except for the history view which has a bug #842) |
I mean I created a PLIP, submitted it, did the work, tried to get feedback from others. What did I do wrong? Is the process so opaque that not even I get anything into the core? is there some kind of secret code word? Is the idea of making theming easier somehow against plones roadmap? I'm frustrated no one seems to care about this |
I'm supporting the PLIP. We @ FHNW facing the same issue. What can/need we do to make this happen soon? |
@djay sorry, I missed this. I'm a bit confused on what is supposed to be reviewed/merged here? Is there a PR? We need branches to test and I probably just labeled it future because we're trying to release shortly. |
What needs to be reviewed? There's a WIP pull request referenced here, but otherwise only discussion. I'm happy to look at and merge code, but I'll need some pointers to the pulls related to this ticket. |
Sorry @esteele, I did a branch for the barceloneta changes but forgot to da a PR. Done in plone/plonetheme.barceloneta#40. The branches were referenced in https://github.com/plone/buildout.coredev/blob/5.0/plips/plip-20154-easy-backend-theming.cfg |
@pigeonflight do you want to have a go testing this out?
|
@djay we could split it out but then it becomes more complicated. I almost prefer repeating ourselves here for simplicity... |
Still needs
|
since the open tasks are already own issues I close this one |
User problem
A themer would like to visually separate
While still letting the editor be logged in and browse the site in frontend mode but also have the toolbar to quickly edit any page they are looking at.
The reasons they would want to do this is
(from UX hitlist )
see PLIP 20154 https://dev.plone.org/ticket/20154
Internal
Plone 5 makes this somewhat easier by use of better CSS classes but doesn't solve the problem.
Options
<drop attributes="class" css:content="#edit-bar a.pat-plone-modal" />
might workThe text was updated successfully, but these errors were encountered: