yii2-debug icon indicating copy to clipboard operation
yii2-debug copied to clipboard

Allow to configure toolbar position

Open sasha-x opened this issue 4 years ago • 14 comments

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 avatar May 06 '20 11:05 sasha-x

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)?

sasha-x avatar May 07 '20 17:05 sasha-x

Whatever works.

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

samdark avatar May 07 '20 17:05 samdark

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.

samdark avatar Aug 09 '20 19:08 samdark

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?

sasha-x avatar Aug 09 '20 20:08 sasha-x

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 avatar Aug 09 '20 22:08 samdark

@sasha-x do you want to finish it?

samdark avatar Sep 06 '20 13:09 samdark

Yes, I need 2-3 days, please.

sasha-x avatar Sep 06 '20 18:09 sasha-x

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.

sasha-x avatar Sep 23 '20 09:09 sasha-x

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.

samdark avatar Sep 23 '20 09:09 samdark

This style was made sometime and currently unused anywhere.

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

sasha-x avatar Sep 23 '20 10:09 sasha-x

Top-fixed position should be useful.

samdark avatar Sep 23 '20 10:09 samdark

Do you mean overlapping of navbar line?

sasha-x avatar Sep 23 '20 16:09 sasha-x

Fixed one. Yes.

samdark avatar Sep 23 '20 18:09 samdark

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

sasha-x avatar Sep 29 '20 10:09 sasha-x

Thank you!

samdark avatar Feb 20 '24 13:02 samdark