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

debug toolbar depends to bootstrap for a correct view. #974

Closed
gimox opened this issue Oct 14, 2013 · 21 comments
Closed

debug toolbar depends to bootstrap for a correct view. #974

gimox opened this issue Oct 14, 2013 · 21 comments

Comments

@gimox
Copy link
Contributor

gimox commented Oct 14, 2013

i disable bootstrap because i'm using a jquery mobile project.
But debug toolbar need Bootstrap for a good view.
So i think is not good add a css framework dependence to debug toolbar.

@qiangxue
Copy link
Member

The debugger is a separate module which doesn't affect what css framework the main app is using.
The debug toolbar (the toolbar on the bottom) doesn't use any css/js framework.

@gimox
Copy link
Contributor Author

gimox commented Oct 14, 2013

This is not true.
Try this:
Disable bootstrap dependance in appasset and try the toolbar
Or for strong result disable bootstrap and enable foundation or jq mobile and take a look at some debugger page.

@qiangxue
Copy link
Member

The debugger uses its own layout view. It doesn't use AppAsset (it has no knowledge about it at all). How will changing AppAsset affect the rendering of the debugger pages? Did you make any other changes that would cause change of debugger views?

@gimox
Copy link
Contributor Author

gimox commented Oct 15, 2013

no other change this is my appAsset

namespace frontend\config;

use yii\web\AssetBundle;

class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = array(

        'jqmobile/jquery.mobile-1.4.0-beta.1.min.css',
        'jqmobile/jquery.mobile.theme-1.4.0-beta.1.css',
        'jqmobile/jquery.mobile.inline-svg-1.4.0-beta.1.css',
        'jqmobile/jquery.mobile.structure-1.4.0-beta.1.min.css',
        'css/site.css',

    );
    public $js = array(
         'jqmobile/jquery.mobile-1.4.0-beta.1.min.js',
         'js/modernizr.js',
         'js/starter.js',
    );
    public $depends = array(
        'yii\web\YiiAsset',
    //  'yii\bootstrap\BootstrapAsset',
    );
}

i commented the bootstrap asset and added Jquery Mobile.
Now the debug scrren use Jquery Mobile Css and asset.

@klimov-paul
Copy link
Member

Unable to reproduce.
Disabling bootstrap over entire application does not affect toolbar appearance or debug module appearance.
no-bootstrap

@gimox
Copy link
Contributor Author

gimox commented Oct 15, 2013

ok. the toolbar at the bottom, look good but with font i embedded in my main layout. The content is rendered with jquery mobile. ( the problem is not the toolbar itself but the content)

debug

debug2

@samdark
Copy link
Member

samdark commented Oct 15, 2013

So the issue is that in debugger view you custom packages are applied. Correct?

@gimox
Copy link
Contributor Author

gimox commented Oct 15, 2013

yes, it's not a big problem but i think is good that debuger is indipendent. Now with jquery mobile is not so horrible and i can read everythink but i think that other people can use foundation or other framework and the debug can be unreadeable.
For example symfony as a debug toolbar that is completly indipendet to the page asset. I think this is the best.

@samdark samdark reopened this Oct 15, 2013
@samdark
Copy link
Member

samdark commented Oct 15, 2013

OK. Overall when running debug module we should remove all app assets.

@gimox
Copy link
Contributor Author

gimox commented Oct 15, 2013

or add bootstrap only for debug view.
Boostrap is in yii2.

@cebe
Copy link
Member

cebe commented Oct 15, 2013

Where are you registering your assetbundle? This should be done in the main layout file so that gii can use its own layout and have own asset bundle registered.

@gimox
Copy link
Contributor Author

gimox commented Oct 15, 2013

I register my project bundle in main layout.
Gii work perfect.
Debug use bundle layout

@qiangxue
Copy link
Member

Does the HTML code of the debug view contain any js/css files that should be registered by AppAsset? Please do a global search for AppAsset to make sure it is only registered within your main app.

@gimox
Copy link
Contributor Author

gimox commented Oct 15, 2013

I m sure. I register the asset in man only.
It s very simple reproduce the problem

@qiangxue
Copy link
Member

Use the "basic" app as an example. The HTML source of the debug view doesn't contain the "site.css" file in AppAsset. So I'm wondering how AppAsset would affect the debug view.

@cebe
Copy link
Member

cebe commented Oct 15, 2013

I am also unable to reproduce the problem. Can you try reporoduce it on a fresh basic app?

@alarcl
Copy link

alarcl commented Oct 16, 2013

Cant reproduce it too. Comment all assets in sample app and make simple first page without asset register, make error in php code - all ok with yii error page.

@qiangxue
Copy link
Member

Closed unless further information about how to reproduce the issue is provided.

@gimox
Copy link
Contributor Author

gimox commented Oct 16, 2013

I m very busy tomorrow i send dome info about it

@thelfensdrfer
Copy link

I am having the same issue and it is very simple why. I disable bootstrap in my config because i compile it with a custom theme:

'assetManager' => [
    'bundles' => [
        'yii\bootstrap\BootstrapAsset' => [
             'css' => [],
        ],
    ],
],

This is the reason the toolbar looks "ugly". Not a big problem for me either, but would be nice to create a workaround.

@qiangxue
Copy link
Member

@thelfensdrfer This is caused by #1263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants