yiisoft / yii2-debug

Debug Extension for Yii 2
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
201 stars 149 forks source link

Allow to configure toolbar position #430

Closed sasha-x closed 6 months ago

sasha-x commented 4 years ago
Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Tests pass? ✔️

Add Module::$toolbarPosition option. It allows to configure toolbar position css class except of hardcode it to 'bottom' like

$config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
        'toolbarPosition' => 'top',
    ];
sasha-x commented 4 years ago

Done.

I also noticed .yii-debug-toolbar_position_top css name seems not perfect as it place toolbar below page footer. May be rename somehow (.yii-debug-toolbar_position_footer)?

samdark commented 4 years ago

Whatever works.

⚠️ Note to myself: actually check it in the browser before merging.

samdark commented 4 years ago

Checked it, needs extra work:

  1. There's no ready to use position values you can configure. top doesn't make sense now.
  2. Collapsing toolbar doesn't work well with non-default value.
sasha-x commented 4 years ago
1. There's no ready to use position values you can configure. `top` doesn't make sense now.

What's wrong with top value?

2. Collapsing toolbar doesn't work well with non-default value.

How can I check it?

samdark commented 4 years ago

What's wrong with top value?

It results in toolbar being rendered at the bottom under content and not fixed.

How can I check it?

Set value to top. Try collapsing the toolbar.

samdark commented 4 years ago

@sasha-x do you want to finish it?

sasha-x commented 4 years ago

Yes, I need 2-3 days, please.

sasha-x commented 3 years ago

Hello, sorry for delay.

What's wrong with top value? It results in toolbar being rendered at the bottom under content and not fixed.

It was exactly what I need in my project (to free right-bottom fixed position of viewport for other ui elements). Current name of that slyle (top) is wrong. I suggest to rename it. For example name it as footer. Is that ok?

Collapsing toolbar doesn't work well with non-default value.

Yes, I see. I can try to fix that.

samdark commented 3 years ago

It was exactly what I need in my project (to free right-bottom fixed position of viewport for other ui elements).

I wonder if that's a common need. Not sure it will be need for anyone else.

sasha-x commented 3 years ago

This style was made sometime and currently unused anywhere.

If no, what additional style will be useful? May be left-bottom-fixed position?

samdark commented 3 years ago

Top-fixed position should be useful.

sasha-x commented 3 years ago

Do you mean overlapping of navbar line?

samdark commented 3 years ago

Fixed one. Yes.

sasha-x commented 3 years ago

Css for top-right-fixed toolbar position added. I name it with upper postfix (top is already in use). Review it, pls.

samdark commented 6 months ago

Thank you!