cakephp / app

CakePHP application template
370 stars 392 forks source link

RFC - Bootstrap vs Foundation #476

Closed andretefras closed 7 years ago

andretefras commented 7 years ago

This RFC is open to discuss about the adoption of Bootstrap over Foundation.

The discussion reference was opened in #475

Nowadays there is a market preference for Bootstrap.

Particularly I think the mostly users would like this change.

Even the CakePHP project main websites are walking this direction.

What do you think?

antograssiot commented 7 years ago

I think that a php framework shouldn't care... More seriously, it easy also easy enough to create your own template for bake. Then you can use whatever you want in your app.

So long story short, I'm not totally against the idea but won't push it nor spend time working on this.

ADmad commented 7 years ago

As long as people don't expect the HTML generated by the core helpers to be geared towards bootstrap I don't mind. It should stay css framework agnostic like it is currently.

josegonzalez commented 7 years ago

@andtxr what issues are there with the friendsofcake/bootstrap-ui plugin? I'd be in favor of making that (or something like it) the default in 4.x, and moving our current "defaults" that like Foundation into a plugin as well. That way people can switch between the two at will.

andretefras commented 7 years ago

Following the reference, now we have two frameworks in the base code of the CakePHP app.

Taking into consideration the effort to standardize everything that already exists, it is easier to adapt the new Home template to use Foundation, right?

I do not remember, but the CSS of the baked templates depends on Foundation?

josegonzalez commented 7 years ago

Yeah, baked templates currently support Foundation afaik.

andretefras commented 7 years ago

@josegonzalez no issues, I actually love it. 😄

The discussion is up due the referenced PR.

josegonzalez commented 7 years ago

Yeah, I guess we should refactor it to use Foundation since thats what we already depend upon.

lorenzo commented 7 years ago

The reason we used foundation is because it required no code changes in php in any of the helpers, back we we were doing 3.0; whereas bootstrap required big changes that would only work with bootstrap.

josegonzalez commented 7 years ago

Note: it's not just the cakephp/app repo that needs to be "updated". We also have to make helper changes - where we produce html output - as well as bake. This is highly invasive.

While I love bootstrap, we should take care to not break any existing functionality for users. For instance, I might have an older cakephp/app installation with new bake for creating a simple Crud admin for something. Moving to bootstrap would break that unnecessarily, causing a bad experience for our users.

@lorenzo has that situation changed since Cake3 was released? If it has - or will in Bootstrap4 - then moving will be a bit more feasible. Otherwise, I vote that we wait until Cake4.

ADmad commented 7 years ago

has that situation changed since Cake3 was released? If it has - or will in Bootstrap4 - then moving will be a bit more feasible. Otherwise, I vote that we wait until Cake4.

I don't think the situation has changed. Bootstrap is bloat and requires adding lot of extra classes to get it's default styling.

lorenzo commented 7 years ago

@josegonzalez as you well pointed out, it is still a massive change. I used foundation just for the reason that it saved time, no code changes were needed and it looked very solid. Additionally, the use of a more agnostic html, allowed us to refine the extension mechanisms to create other ui libraries, like the one for bootstrap.

inoas commented 7 years ago

IMHO there are two main reasons to use a css library over just pure css:

Future / 4.x

I suspect for 4.0 display: flex or display: grid can be used for the grid.

As for default styles of form controls, headers etc., we can use something like Marx https://github.com/mblode/marx (demo) which does not require any changes to markup or classes, e.g. our app skeleton and bake would become agnoistic.

That leaves total control to the app developer and we don't force anything down their throat. Per app the developer can adopt to bootstrap-, ionic-, foundation or framework7-mixins or patch their layout to use twbs et al. div/class-soup.

Current State / 3.x

I am strongly 👎 for changing anything regarding the layout / default / bake output / css during the 3.0 life cycle. It does little and may hurt (some devs) a lot.

andretefras commented 7 years ago

I also think that flexbox or css-grid is a good option for the future. Actually the best agnostic option. Default styling for buttons, lists, etc, is not a so hard task.

We have reached some conclusions:

The base PR for this RFC was already finished and fixed, so I think we are done. 🕺

dereuromark commented 7 years ago

I agree - closing with PR https://github.com/cakephp/app/pull/478

bravo-kernel commented 7 years ago

👍🏼

dereuromark commented 7 years ago

@bravo-kernel Those emoji are not readable by most people and browsers

//EDIT, OK not most, but a few. Especially with not up to date emoji fonts. Would be good to either use the github "icons", or at least attach some textual part to it to be safe :)

ADmad commented 7 years ago

@bravo-kernel Just use the emoji codes like :+1: supported by GH and everyone's happy :smile:

bravo-kernel commented 7 years ago