roundcube / elastic

Responsive theme for Roundcube Webmail
77 stars 29 forks source link

Do we really need Bootstrap? #21

Closed alecpl closed 7 years ago

alecpl commented 7 years ago

We should really think about that. There are some fair reasons to not use Bootstrap:

  1. We don't want to change much Roundcube code, so e.g. I'd like to not rewrite any code that creates forms. Especially forms structure and inputs would require change from table- to div-based structure and with a lot of additional classes.
  2. We will use a really small subset of Bootstrap functionality: buttons, alerts, popovers (?), forms (?), tabs, dropdowns (maybe), normalize.
    • for popover we still need to write a lot of code, so it may make sense to use custom solution (#17),
    • for forms see point 1) above
    • do you know more Bootstrap components that might be of use for us?
  3. We'd like to use something new, but Bootstrap4 is in alpha.
  4. We'd need to use custom build to make it smaller. Full pack is ~220KB.

There are pros too, of course:

  1. Established framework, skinnable (not sure how much work it would be to use this on Roundcube).
  2. Components are prettier than in micro-frameworks like pure.css.
  3. Provides nice components for plugin authors, but to make it possible we'd need to use full pack.

But, maybe using https://purecss.io would be enough? Looks like using it we would not miss much of the required feature set.

marclaporte commented 7 years ago

I believe strongly Bootstrap is the way to go.

1- We have access to the huge mind share and ecosystem of Bootstrap and we are 100% certain that it always will be supported.

https://www.openhub.net/p/bootstrap-from-twitter https://www.openhub.net/p/bootstrap-from-twitter/contributors/summary

Here: https://trends.builtwith.com/docinfo/design-framework , we see that Bootstrap is used on 12.5 million sites. One of the sites being https://kolab.org/css/bootstrap.min.css :-)

With that volume of sites, a bus could hit the current top Bootstrap developers and some others would necessarily emerge.

2- For folks desiring to integrate with other apps, it makes it easier for us to make a consistent UX / look and feel throughout the apps, and it makes it easy to customize the theme. And with plenty of ready-made themes like at https://bootswatch.com/

3- Access to tons of goodies like http://bootstraptour.com/

Please see: http://www.bootstraphero.com/the-big-badass-list-of-twitter-bootstrap-resources

4- Bootstrap can deal with edge cases that the Roundcube community wouldn't have the expertise or energy to take care of. They even tell the browsers what they need to fix! http://getbootstrap.com/browser-bugs/

5- "We don't want to change much Roundcube code, so e.g. I'd like to not rewrite any code that creates forms." That makes sense for 1.3 as "Elastic" will just be one theme among others and you don't want to break the other themes. But let's think of this on a longer term perspective. Roundcube 1.4 or 2.0 could be a good time for a more important rewrite to take more advantage of Bootstrap (and Bootstrap would be used for the default theme). "change from table- to div-based structure" -> This is the right thing to do to evolve with the web. It should be done sooner or later.

In Tiki (A huge PHP project started in 2002), we converted hundreds and hundreds of templates to Bootstrap. I can't see that this list is scary :-) https://github.com/roundcube/roundcubemail/tree/master/skins/classic/templates

Best regards,

M ;-)

alecpl commented 7 years ago

We already converted template files, but forms are generated in PHP code. We don't want to rewrite much because it's 1.x work. The rewrite was planned for Roundcube Next. I don't really want to do a rewrite of current code base (and force plugin authors to do the same).

luciash commented 7 years ago

IMHO adding Bootstrap classes to forms would not force the current plugins' authors to change anything, would it?

alecpl commented 7 years ago

That's something to check, I'm not sure if just adding Bootstrap classes to table-based form would work and how though.

alecpl commented 7 years ago

I'm closing this as most problems have been solved and Bootstrap 4 also improved in meantime.

marclaporte commented 7 years ago

Super!!!