-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Create (bootstrap)-independent version #390
Conversation
Great to see you working on gii as well! Some feedback (I know it's work in progress but still). Based on demo:
|
fixed modal js changed hint rendering (use popovers)
@simialbi ideally yes. That would ease the installation a lot when we'll apply your changes to Yii 3.0 modules (if you'd do it after this pull request that would be superb). |
…nd ellipsis to sticky values
…s is an array instead of a string) fixed order of method calls of `Code Template` field to be sure label options are set by hint method when rendering label
I don't think this is needed, the frontend of Gii can use jquery without conflicting with other code. |
fixed variable name of types
I think it's ready for a review now. I removed typeahead.js beacause of the discussion of jquery dependance. I replaced it with native datalists. It's supported in the most modern major browsers: https://caniuse.com/#search=datalist. I looked for an alternative and e.g. Awesomeplete is a lightweight one. As soon as you reviewed I'm going to clean up the code if you agree (globally apply yii2 code style, add phpdoc etc.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code itself looks good to me.
Sorry, I may have asked this before, but why are all scss bootstrap files included in the source? |
It's bootstrap independent, not bootstrap free. Bootstrap is bundled to solve problems like this: |
The issue linked above won't be a problem with I don't like the idea of bundling a whole CSS framework with a module, although I see that there has to be some style. And for Yii 2.x this might be the way to go. But we should think about this for https://github.com/yiisoft/yii-gii/ |
I know it's not the best solution, but the only alternative I see is to build a dependency free (as far as possible) lightweight yii css framework for cases like this or yiisoft/yii2-debug. |
It's fine for Yii 2.x and is close to what we need in Yii 3.0. |
@samdark You want to bundle Bootstrap 4 for Yii 3.x for gii, debug and for yii-bootstrap4? So it would be included 3 times in probably three different versions? |
@schmunk42 you have to consider the following: gii and debug are development modules you don't need in production. So mabye it's not as tragic as it seems |
@schmunk42 we may do it. As @simialbi said, there's nothing wrong with it. Still, ideally we'd do our own simplistic CSS. |
While I agree for debug, I had use-cases with gii, where I wanted to generate code on a website, ie. think about an online extension generator. But as said, this PR is perfectly fine for 2.x.
I totally agree for Yii 2.x, but we should consider the use-case in general, that you want to install two different version of a CSS framework; if you have something like AdminLTE you might also be tied to certain JS libs. For 3.x we should try to use minimal custom CSS and don't try to find workarounds (in core modules) from the beginning. |
Gii was never meant for embedding so even if there are use cases like that, these are extremely rare and I don't think these should be considered. |
@simialbi I've made 2.0.8 release now we're ready to assemble 2.1.0. Would you please add changelog lines for this pull request? Thanks. |
@samdark Done |
Merged. Thank you very much! |
Like yiisoft/yii2-debug#340 for yii2-debug the same for yii2-gii.
Work in progress demo: http://demo.karlen.li/web/gii
For model generation: Table
yii_user
exists