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

Implement bootstrap extension #20

Closed
qiangxue opened this issue Mar 25, 2013 · 53 comments
Closed

Implement bootstrap extension #20

qiangxue opened this issue Mar 25, 2013 · 53 comments
Assignees
Labels
status:under development Someone is working on a pull request. type:feature
Milestone

Comments

@qiangxue
Copy link
Member

The extension contains a set of widgets implementing various features provided by Twitter Bootstrap.

@allanfreitas
Copy link

@qiangxue @samdark I think the ideia of "yiiext.github.com" it's awesome, with "official" extensions, and not include many things on the CORE of Yii. The actual version (1.1.13) is already about 19Mb of size, when decompressed.
What do you think about? (it's only my opinion, I want to know yours).

@qiangxue
Copy link
Member Author

First, this is an extension, meaning optional in downloading. So you shouldn't worry about download size.
Second, we want to officially maintain some commonly used extensions so that developers can have ready-to-use and high-quality tools they need without the worry of code breaks or discontinued support.

@allanfreitas
Copy link

@qiangxue Thanks for explain it. It's good to know that will exist official extensions, this three qualities (ready-to-use|high-quality|continued support) on Yii tools are awesome features.

@schmunk42
Copy link
Contributor

Will you separate this extension into an own repository?

@samdark
Copy link
Member

samdark commented Mar 25, 2013

Not this one, I guess.

@schmunk42
Copy link
Contributor

Please consider it, we also had this discussion about the zii widgets, it's minimal overhead to include it as a package, but would greatly enhance the modularity of the framework.

E.g. if someone wouldn't use bootstrap at all he would not require this package and get a slimmer core. This applies also to any package which depends on other code, eg. zii-widgets depend on jQuery.

@tonydspaniard
Copy link
Contributor

@qiangxue @samdark "officially maintain some commonly used extensions so that developers can have ready-to-use and high-quality tools they need without the worry of code breaks or discontinued support"

Bootstrap is an external source, what would happen if bootstrap is in the future replaced in use by, for example, the zurb foundation? I do not think that it should be officially supported but Yii should provide the right standards to avoid the creation of bad and buggy extensions and let developers do the rest.

@samdark
Copy link
Member

samdark commented Mar 25, 2013

@tonydspaniard we'll support one of these bootstrapping frameworks. Most probably it will be Twitter's since Foundation dropped support of IEs except the very latest too soon.

@schmunk42
Copy link
Contributor

Yii2 should provide support for any CSS/UI framework and no framework or components should be tied to the core.

@samdark
Copy link
Member

samdark commented Mar 25, 2013

It will not be tied. It will be bundled.

@tonydspaniard
Copy link
Contributor

Chris and I have nearly finished Yiistrap and Yiiwheels. We joined forces to improve its last library and also to stand up over YiiBooster, library that I no longer support, adding Yiiwheels to extend Yiistrap so to keep one and only library from Twitter Bootstrap's.

@samdark @qiangxue maybe would you consider adding both as one library to Yii2?

@qiangxue
Copy link
Member Author

qiangxue commented May 5, 2013

@tonydspaniard We can certainly consider adding them to Yii 2, provided that you are willing to modify the license terms to follow that of the existing Yii 2 code. Having said that, I think if we decide to move along this way, we need to agree on the design of the base classes first, and then modify the more concrete class implementations. Actually it will be almost like a rewrite. The main difference is that you have much more experience with these bootstrap widgets and probably have better idea than us on how to make them even better. Do you think this is fine with you? We may discuss further details in emails.

@tonydspaniard
Copy link
Contributor

@qiangxue I would love to participate actively with them. My only concern is that I worked with Chris and what we did is a rewrite of his Yii-bootstrap and he asked me to keep the copyright. Nevertheless, Yiistrap is a library built for Yii 1.1.+ and I do not see any issue in building a new that will comply with Yii2 expectations.

I will ask Chris, as my ethics force me to do so, if he wishes to work with me in order to integrate Yiistrap + Yiiwheels into Yii2. Whatever his answer is, please count me in.

@crisu83
Copy link

crisu83 commented May 6, 2013

Hello, I'm joining in a bit late but I just wanted to say that I'm open for discussion about developing similar functionality as Yiistrap for Yii2. I would love to participate.

@ghost ghost assigned tonydspaniard May 9, 2013
tonydspaniard added a commit to tonydspaniard/yii2 that referenced this issue May 12, 2013
tonydspaniard added a commit to tonydspaniard/yii2 that referenced this issue May 21, 2013
* upstream:
  Fixes issue yiisoft#320: Module::createController() will fail with a route with trailing slash.
  Fixed test break about AssetController.
  requirements css.php twitter bootstrap update to 2.3.2
  Twitter bootstrap updated to 2.3.2
  Modified the IAssetConvert interface.
  hashing the key for registerCss and registerJs.
  Update AccessRule.php
  refactored code after feedback
  Fixed framework path.
  Added support for View::POS_READY.
  new proposed structure
  remove from master (update track)
  made some changes, fix some pitfalls, remove PHP_EOL
  yiisoft#20 proposed architecture for bootstrap

Conflicts:
	yii/helpers/base/Inflector.php
@marsuboss
Copy link
Contributor

You use what version of Bootstrap ? v2.x or v3.x ?

@schmunk42
Copy link
Contributor

Shouldn't the bootstrap code go into https://github.com/yiisoft/yii2/tree/master/extensions? Same with jui.
Otherwise it's in the core and it will be harder for developers the develop with other CSS frameworks.

@samdark
Copy link
Member

samdark commented Jun 6, 2013

I think it should.

@qiangxue
Copy link
Member Author

qiangxue commented Jun 6, 2013

What's the drawback of keeping bootstrap in the core?

@samdark
Copy link
Member

samdark commented Jun 6, 2013

There are no drawbacks keeping it as official extension.

@qiangxue
Copy link
Member Author

qiangxue commented Jun 6, 2013

There is:

  • The debug toolbar (will be in the core) will use bootstrap;
  • It's possible some future core modules will depend on bootstrap.

@samdark
Copy link
Member

samdark commented Jun 6, 2013

  1. What if you prefer foundation? Both bootstrap and foundation will be loaded at the same time?
  2. Gii?

@qiangxue
Copy link
Member Author

qiangxue commented Jun 6, 2013

What if you prefer foundation? Both bootstrap and foundation will be loaded at the same time?

Nope. The debug toolbar itself won't use any CSS framework. It is the debug module that will display standalone debug pages which will use bootstrap.

Gii could be in either core or official extension. If it will be in the core, then that's another positive argument.

Basically my argument is that if we have some core code that depends on a CSS framework to work well, then we should keep this CSS framework in the core.

@samdark
Copy link
Member

samdark commented Jun 6, 2013

It's OK for me to keep bootstrap in the core as long as it's used for standalone modules only i.e. not conflicting with any user JS/CSS.

As for jui, I think it worth moving into separate official package.

@qiangxue
Copy link
Member Author

qiangxue commented Jun 6, 2013

I agree moving jui to extensions. We only need one such framework to use for GUI-related core code (with the assumption that it won't interfere with application code).

Regarding core vs. official extensions: the only advantage of using official extensions is that it makes the size of the core code smaller. Our situation is different from ZF2/SF2 since our extensions are not designed to be reused in other frameworks.

@schmunk42
Copy link
Contributor

The debug toolbar (will be in the core) will use bootstrap;

In the toolbar composer.json: require: { "yiisoft/yii2-bootstrap": "1.x"}

It's possible some future core modules will depend on bootstrap.

Then they should be also released as separate extensions and require yii2-bootstrap.

That would be much cleaner, IMHO. And if you want to release a complete archive the build process should take care of this.

@qiangxue
Copy link
Member Author

qiangxue commented Jun 6, 2013

Why should we turn the debug toolbar into an extension? This will be used by almost all applications. Turning it into an extension means extra dependency for every application, and the only benefit is that it makes the size of the core code smaller.

@samdark
Copy link
Member

samdark commented Jun 6, 2013

No need to decouple toolbar. It will be used in 99% developer's environments, I think.

@creocoder
Copy link
Contributor

But Yii has another workflow.

All fine with workflow here. See:

https://github.com/yiisoft/yii2/tree/master/extensions

Maybe @qiangxue just forget to move bootstrap to extensions.

@Ragazzo
Copy link
Contributor

Ragazzo commented Jul 28, 2013

@creocoder is right definitely must be extension and not in the core.

@crisu83
Copy link

crisu83 commented Jul 28, 2013

I'm actually starting to lean towards moving it to the official extensions. I haven't looked that much as Yii2 yet so I'm still getting to know the whole structure.

@samdark
Copy link
Member

samdark commented Aug 2, 2013

@tonydspaniard what's left on this one except the decision to move it to an extension or not?

@doliver3
Copy link

Could support for Bootstrap 3 be added?
Bootstrap 3 has been officially released for 2 months now.

@cebe
Copy link
Member

cebe commented Oct 22, 2013

@doliver3 we have bootstrap 3 already ;)

@sensorario
Copy link
Contributor

<3

2013/10/22 Carsten Brandt notifications@github.com

@doliver3 https://github.com/doliver3 we have bootstrap 3 already ;)


Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-26783002
.

@samdark
Copy link
Member

samdark commented Nov 24, 2013

Bootstrap support implemented.

@samdark samdark closed this as completed Nov 24, 2013
qiansen1386 pushed a commit to qiansen1386/yii2 that referenced this issue Jul 25, 2014
caching-http.md translated. [skip ci]
wangjun083 pushed a commit to wangjun083/yii2 that referenced this issue Oct 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:under development Someone is working on a pull request. type:feature
Projects
None yet
Development

No branches or pull requests