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
Why yii\grid\ActionColumn use TwitterBootstrap dependent markup #10712
Comments
What do you propose to use instead of it? |
I agree that it's not a good thing. |
@SilverFire OK but what do you propose to use for non-bootstrap buttons then? Also it would likely break existing apps. |
Anyway it's a BC breaking change that goes to 2.1. |
moving anything external out of the core software is always a good idea. Why not compare icons with the logic behind translations. |
Because in existing apps bootstrap buttons would be replaced with something else on update. |
it wouldnt if you make the icon mapping dependant on the version of TWBS |
How's that? |
you define:
|
OK. Two questions:
|
and then a folder: With ie. 2_0.php: return [ return [ |
How would Icon detect if twbs is installed? |
well, you provide a default path for the mapping file in Icon, like: If the file does not exist, nothing is rendered. You have to put a default somewhere, as you want to have a default theme anyways. |
So for all existing apps there will be a need to specify additional path else icons will disappear. That's what I call backwards compatibility break. |
If people update to 2.0.7, they just like now:
Nobody would have to get any issue. |
Yes, that would solve it. |
It's still BC breaking since the way of configuring it would change, right? |
whether you are a hardcoding it in the view with names like 'glyphicons' |
Right. |
I have a solution ready. Will create a PR next week. |
Won't be changed in 2.0. |
yii\grid\ActionColumn use TwitterBootstrap dependent markup by default.
It's not very good.
It turns out that you are not using the bootstrap, and the module uses ActionColumn, you have to take advantage of dependency injection for that would see the standard actions buttons.
https://github.com/yiisoft/yii2/blob/master/framework/grid/ActionColumn.php#L143
https://github.com/yiisoft/yii2/blob/master/framework/grid/ActionColumn.php#L153
https://github.com/yiisoft/yii2/blob/master/framework/grid/ActionColumn.php#L165
The text was updated successfully, but these errors were encountered: