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

Allow developers to avoid applying semantic-ui to public facing views #970

Merged
merged 42 commits into from Aug 18, 2020

Conversation

pnicolli
Copy link
Contributor

@pnicolli pnicolli commented Oct 29, 2019

Draft of the work to fix #842.

To test this, customize src/theme.js in your own volto-app and apply the changes suggested in the comment.
To add your own styles for public facing views, add them in your theme.js customization.

This is still experimental, still has Italian comments (sorry :P ), but I wanted to post this for anyone who wants to test this approach.

Disclaimer: the naming backend/frontend for cms views and public views is confusing and temporary and has to be replaced somehow. Suggestions on naming are accepted.

@pnicolli
Copy link
Contributor Author

pnicolli commented Oct 29, 2019

One thing I can already tell you I will work on is code splitting. I would love to load semantic-ui only for logged-in users, when using this approach.

@djay
Copy link
Member

djay commented Oct 30, 2019

@djay
Copy link
Member

djay commented Oct 31, 2019

@pnicolli One thing to keep in mind is that Plones in-line approach is the outlier and most CMS systems have an admin-ui and a theme and they aren't the same thing. Systems like django come with an admin-ui and no theme, they are essentially headless. So perhaps its about calling it themed vs non-themed admin UI? Or perhaps its closer to django where you have no public view so its a headless CMS with volto admin UI?

@pnicolli pnicolli requested a review from sneridagh Nov 13, 2019
@pnicolli
Copy link
Contributor Author

pnicolli commented Nov 13, 2019

Changed the naming from backend/frontend to cms-ui/public-ui

@pnicolli
Copy link
Contributor Author

pnicolli commented Nov 13, 2019

We have a first version of a volto theme using bootstrap for public views and pastanaga for the cms views here

It's really just a bunch of configurations at this time (notice especially razzle.config.js) and the import of our base scss styles inside src/theme.js.

@tisto
Copy link
Member

tisto commented Nov 13, 2019

@pnicolli awesome!

@sneridagh
Copy link
Member

sneridagh commented Nov 13, 2019

@pnicolli Woohooo! Questions, questions!

https://github.com/RedTurtle/design-volto-theme/blob/master/src/theme.js#L10 Did you managed to make it work with a local non-released @plone/volto repo using mrs.developer? I will try to document asap but for sure you are going to need it.

Another, how about code splitting? Did you already play with it?

@pnicolli
Copy link
Contributor Author

pnicolli commented Nov 13, 2019

@sneridagh mrs.developer wasn't involved at this time, we just used this PR branch split_styles in order to test it: https://github.com/RedTurtle/design-volto-theme/blob/master/package.json#L62
We will try to use mrs.developer or something similar (will actually probably try yarn link first, it's usually my preferred tool) asap in order to add lazy loading stuff. Actually, in order to do that, merging the main lazy-loading machinery would be awesome. So the second answer is no, we didn't try lazy loading stuff yet.

@nzambello nzambello requested review from tiberiuichim and avoinea Jul 17, 2020
@nzambello nzambello requested a review from tisto Jul 17, 2020
@tiberiuichim
Copy link
Contributor

tiberiuichim commented Jul 17, 2020

@nzambello @pnicolli With current Volto it's possible to load scss really easy, no need for the separate razzle loader declaration. I've done it like this: https://github.com/eea/volto-searchkit/blob/master/razzle.extend.js

This uses the https://www.npmjs.com/package/razzle-plugin-scss official plugin

@nzambello
Copy link
Member

nzambello commented Jul 19, 2020

@tiberiuichim nice, I'm testing it: RedTurtle/design-volto-theme#82

@nzambello
Copy link
Member

nzambello commented Jul 20, 2020

@tiberiuichim updated the docs for the sass loader

@tisto
Copy link
Member

tisto commented Jul 31, 2020

Notes from Volto early adopters meeting today:

  • Timo will review this PR over the weekend
  • we will discuss this PR on the next @plone/volto-team meeting next Tuesday

Copy link
Member

@avoinea avoinea left a comment

LGTM

tisto
tisto approved these changes Aug 4, 2020
@tisto
Copy link
Member

tisto commented Aug 4, 2020

Note @plone/volto-team meeting:

  • Minor release
  • No breaking is expected
  • The release will happen soon (today or tomorrow)

@tisto tisto added this to the 7.1.x milestone Aug 12, 2020
@tisto tisto merged commit 69a8dc9 into master Aug 18, 2020
8 checks passed
@tisto tisto deleted the split_styles branch Aug 18, 2020
@nzambello
Copy link
Member

nzambello commented Aug 18, 2020

Woah! Thank you @tisto
Months of work completed, hooray! 🎉

@tisto
Copy link
Member

tisto commented Aug 18, 2020

@nzambello thank you for working on this and contributing your work to Volto!!! Awesome work! Sorry, it took me so long to review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment