etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

Interested in a new default theme?

Open mrflos opened this issue 8 years ago • 71 comments

Hello, our non-profit organisation members, especially @seballot worked on a new theme for etherpad.

screenshot

It's visible on https://pad.colibris-outilslibres.org and the code is available here : https://framagit.org/colibris/etherpad-custom-colibris

It's a bit tricky and could be more generic, so just let me know if it would make sense to add it to the core.

Best regards

mrflos avatar Aug 07 '18 10:08 mrflos

Hi @mrflos, the theme is really neat, I personally like the aesthetics of https://pad.colibris-outilslibres.org more than a default Etherpad installation.

I think that making it the default theme is a change that requires at least consensus from the community members and a clear deprecation plan, so it is worth a bigger discussion.

In the meantime, I have two quick questions:

  • would be the theme compatible with a plain Etherpad install? I see a long list of plugins at https://framagit.org/colibris/etherpad-custom-colibris#pr%C3%A9requis. Probably they are aimed at replicating your whole UX, but an explicit confirmation would be comforting
  • what's the licensing situation for the fonts? From a quick search it seems that Geomanist is free only for regular and italic

muxator avatar Aug 07 '18 21:08 muxator

Hi @muxator ! Thank you for your quick reply.
I'm aware that we need a lot of discussions and a lot of small changes in order to get this theme generic enought to be accepted as default.

To answer your 2 first questions:

  • the plugin list is indeed the exact configuration to obtain the whole UX, if you install it without them, it would this be OK and look like this : https://pad.coop.tools/p/YkZw5nw1GI
  • you are right, the license of this Geomanist font seems not to allow redistribution, but we could change it for example with Montserrat, which is quite similar and under compatible licence

Other things that we would have to discuss:

  • the home background image (it contains a specific logo): i could ask to remove the logo
  • the titles colors (the green may be too specific)
  • what to do with the extra plugin styling ...

If the etherpad community sees an interrest on working on doing something more generic, we would be happy to contribute!

Best regards

mrflos avatar Aug 08 '18 05:08 mrflos

@mrflos I really like the new theme design, it give me more a feel like in google docs, and this would be even from my team mates make it more suitable to use. Thanks for sharing, I want to use it, but how to change the font manually?

petrk94 avatar Aug 10 '18 20:08 petrk94

HI @petrk94 AND @muxator ,
I have updated https://framagit.org/colibris/etherpad-custom-colibris in order to use a free licence.
I translated the readme in english and clarified licence. I also gave basic instructions to change fonts and other customs.

mrflos avatar Aug 11 '18 06:08 mrflos

Hi, @mrflos, thanks for the changes.

We could start agreeing on some guidelines and sketching a plan for inclusion. Tell me what you think about this preliminary notes (I plan to rewrite them organically if we start):

  1. an UI switch is a major change. Etherpad has been around long enough to have to care about this;
  2. as such, it cannot happen abruptly: we could make the theme optional for a while, measure the reactions from users, do a few tweak releases, and finally switch to the new theme, keeping the old as an option;
  3. I would be happy of shipping 2.0 with the new theme as default;
  4. mobile experience should be first class.

If you agree on keeping committed to this plan, here's some practical items for us to check:

  1. Etherpad: find if there is a way of activating a new theme via settings.json, without having to copy files around (mandatory)
  2. Etherpad: find if there is a way of activating a new theme without having to restart Etherpad (nice to have)
  3. Colibris: preliminary tasks before inclusion
    • [X] use free fonts
    • [X] license: I am no expert, buth I think that Apache 2 license (Etherpad) is not compatible with GPLv3 (Colibris).
    • [ ] has to work across browsers
    • [ ] has to work on mobile
    • [ ] has to pass front end tests
    • [ ] no big binary blobs: when it will be integrated, the repository has to stay as small as possible (nice to have)
  4. When it's ready, integrate the new theme in Etherpad repository and make it optional (let's say in 1.8?). From that moment the development of the theme takes place in the main repo.

For what concerns my work of today, I have created a new-theme category for grouping the work there.

muxator avatar Aug 11 '18 09:08 muxator

Hi everyone, I'm Sebastian, I've been working on this new theme. I'm happy to see that your are also enthusiastic about changing etherpad default theme :)

@muxator, your plan seems good to me ! And as I commented in a dedicated ticket, this theme was a quick first shot, only applying css rules on top of etherpad code. if I can change a bit the core etherpad code, I would be able to increase much more the user experience.

I'll be happy to participate improving this great tool ! See ya !

seballot avatar Aug 11 '18 09:08 seballot

It would be nice if it also looked good with ep_mypads. That would be important to me. Many Thanks.

ukcb avatar Aug 12 '18 16:08 ukcb

Ok, i changed the licence to apache 2 to solve this first issue. I think that we must work with @seballot on a branch based on the dev branch of etherpad, in order to test in the best conditions, solve frontend tests and tune design for mobile phones.

If we add a setting to enable the theme, maybe we should discuss what would be the optimal directory structure, for example (we should discuss this to find the best plan, this is just a draft in my mind) :

  • the themes should be in one folder in static/themes/<mytheme> containing the css and js (as i can understand, the templates are global and cannot be customised in a theme).
  • if the setting parameter theme_folder exists and the folder exists, the value is saved in the settings, otherwise it's saved as an empty string
  • in the templates, all js and css paths are changed to include the file in the theme directory (if the setting is on and if the file exists), or fallback to the default old etherpad theme file otherwise

This solution may be messy if the default theme is in the root of static while other themes are in subfolders, maybe it would be better to have the default theme in static/themes/default folder.

What would you think of this plan?

mrflos avatar Aug 13 '18 08:08 mrflos

1.

the themes should be in one folder in static/themes/ containing the css and js (as i can understand, the templates are global and cannot be customised in a theme).

I agree that the default theme should become just another theme named default. What would remain under static?

2.

if the setting parameter theme_folder exists and the folder exists, the value is saved in the settings, otherwise it's saved as an empty string

OK

3.

in the templates, all js and css paths are changed to include the file in the theme directory (if the setting is on and if the file exists), or fallback to the default old etherpad theme file otherwise

Could we use the existing ejs mechanism for doing this?

muxator avatar Aug 16 '18 15:08 muxator

I agree that the default theme should become just another theme named default. What would remain under static?

There would still be favicon.ico, robots, test.html and the fonts folder.
As for the custom folder, it could also be kept there, but it may be confusing as it would be more logical to do a new theme for doing some custom changes... I have no problems to keep it for backward compatibility, just we should add somewhere a documentation that explains that anything in custom will be used in priority...

Could we use the existing ejs mechanism for doing this?

Sure! I haven't studied the etherpad core's code now, but better not to re-invent the wheel!

mrflos avatar Aug 16 '18 16:08 mrflos

Hi, @mrflos, @seballot,

I have dug a bit more in the code and I am thinking about how to best implement the proposal.

The src/static/js directory contains a lot of application code, and it is not wise to make it part of a theme. The only js customization point currently provided is the customStart() function.

My proposal is based on what we said before, simplifying it a bit, given the current status of the code base (thus the name change theme -> skin).

  • in this initial phase, the skins will continue to have the same logical structure they currently have in the custom folder (limits included, @seballot: we can evolve after the integration)
  • all the skins will be put under src/static/skins
  • the custom directory (which is an empty example skin) will be moved under src/static/skins/no-skin, and will be the default one
  • the colibris skin will live inside src/static/skins/colibris
  • a new configuration setting skinName will be added. If the setting does not exist (i.e., old configuration files) a warning will be printed, and a default of no-skin will be assumed
  • the new optional theme will be announced as part of the new release

I have a POC of the modifications for the settings in place. In order implement them in a correct and secure way (directory name -> risk of directory traversal), I need to fix some bugs I found when doing the prototype.

I hope to have something in ~days, bye!

muxator avatar Aug 19 '18 01:08 muxator

Can the theme already be used or is there some copyright problem?

petrk94 avatar Aug 19 '18 12:08 petrk94

The copyright problem has been addressed already.

This work covers more the integration & future plans.

muxator avatar Aug 19 '18 14:08 muxator

@muxator : very good plan, i also started some POC, but its quite a chalenge to do themes without the templates, so skins is a better idea...
I will wait for your poc, or tell me if your prefer that I do something.

mrflos avatar Aug 21 '18 08:08 mrflos

I would like to bring my own pad on my server online for public with the new theme, what I have to replace, so there are no problems with copyright?

petrk94 avatar Aug 21 '18 16:08 petrk94

@petrk94 : you can find the code that respect free licence (published under the apache licence) here : https://framagit.org/colibris/etherpad-custom-colibris/
In the readme of this repository, there are some instructions how to install it (TL;DR: place the files in the src/static/custom folder).
If you are not in a hurry, I would suggest to wait for the official release of the skins, but we don't know when exactly this will be (i'm hoping for this to happen before 2019 but we don't know yet!)

mrflos avatar Aug 21 '18 17:08 mrflos

@mrflos well, I have it already running successfully ;) But I dont want to share it to the public people, if there are problems with the law. The license is in general nothing I care really, due I dont share the software or sell it. I just want to know, whether its legal to let people use it or whether there are legal things, which I should avoid, before I share it with another people. Thanks

petrk94 avatar Aug 21 '18 21:08 petrk94

Sorry for the delay, I had to work on #3466 before working on the skin.

Now that that part is done, I have moved on writing the spec for the preparatory work in #3471. I think it is complete, but comments are welcome.

I will asap open a PR that implements it.

muxator avatar Aug 23 '18 21:08 muxator

The PR is ready: #3475.

muxator avatar Aug 26 '18 01:08 muxator

Hi, @mrflos, @seballot, the modifications on Etherpad's part are done & pushed.

Please pull latest develop and base your work on that.

The most relevant modification is that the skin has to be put under static/skins/colibris, and you have to set a configuration parameter skinName: "colibris" (refer to settings.json.template).

I have also updated the documentation, mentioning that, starting from Etherpad 1.8, colibris is the new experimental skin, candidate to become the default in 2.0.

Once the other issues in https://github.com/ether/etherpad-lite/labels/new-skin are solved, we can merge the new skin directly into Etehrpad's codebase.

Thank you.

muxator avatar Aug 26 '18 19:08 muxator