igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

[igx-grid] Toolbar height for displayDensity = 'compact' is the same as the one for displayDensity = 'cosy'.

Open tkiryu opened this issue 7 years ago • 11 comments

Description

Toolbar height for displayDensity = 'compact' is the same as the one for displayDensity = 'cosy'.

  • igniteui-angular version: 7.3.3
  • browser: N/A

Steps to reproduce

  1. Go to https://stackblitz.com/edit/igx-grid-button-height-issue-in-toolbar

Result

Toolbar height for displayDensity = 'compact' is the same as the one for displayDensity = 'cosy'.

Compact : NG

image

Cosy : OK

image

Comforable : OK

image

Expected result

Toolbar height for displayDensity = 'compact' should be smaller than the one for displayDensity = 'cosy'.

Attachments

None.

tkiryu avatar Jun 06 '19 07:06 tkiryu

It seems that the compact toolbar height is same as the cosy one. It may be one of the causes.

tkiryu avatar Jun 06 '19 07:06 tkiryu

@tkiryu , the igxButtons that are used in the toolbar have a displayDensity property as well and it is bound to the displayDensity of the grid. This means that the button itself (even when it is used as just a button outside the grid) becomes smaller (with smaller height) when changing the displayDensity to 'compact'.

tachojelev avatar Jun 06 '19 14:06 tachojelev

@tachojelev , thank you for explaining.

the igxButtons that are used in the toolbar have a displayDensity property as well and it is bound to the displayDensity of the grid.

Yes, I understand that this is the reason that button height in the toolbar gets smaller.

As I said yesterday,

It seems that the compact toolbar height is same as the cosy one. It may be one of the causes.

This issue might be not about button height but toolbar height. Maybe, I should change the issue title like this.

Toolbar height doesn't get smaller when displayDensity is 'compact'

What do you think about it?

tkiryu avatar Jun 07 '19 08:06 tkiryu

@tkiryu Yes, I believe this would be more relevant. The height of the toolbar is indeed the same for both compact and cosy - 48px. It is 56px for comfortable. (This is how they are set in styles) I guess @desig9stein and @simeonoff should have a better idea if this is by-design or should be changed.

tachojelev avatar Jun 07 '19 13:06 tachojelev

@tachojelev thank you for your opinion. I changed the title.

Toolbar height for displayDensity = 'compact' is the same as the one for displayDensity = 'cosy'.

tkiryu avatar Jun 09 '19 13:06 tkiryu

@StefanIvanov @DaniMarinov Do you think that we need to change the height of the toolbar also? If yes, what should be the height for all density types?

desig9stein avatar Jun 10 '19 06:06 desig9stein

Since the actions (buttons) respect the display density and they are the most common content for the toolbar, I feel that we should reduce the toolbar height to 40px for the compact display density. I also think that 48px for cosy and 56px for comfortable are good and should stay as they currently are. Thank you @tkiryu for pointing this out.

StefanIvanov avatar Jun 10 '19 08:06 StefanIvanov

In addition to what @StefanIvanov mentioned - display density should affect not only height but also left/right paddings.

DaniMarinov avatar Jun 10 '19 11:06 DaniMarinov

@tkiryu @StefanIvanov @tachojelev @desig9stein You can check the updated Specification of the Toolbar https://github.com/IgniteUI/igniteui-angular/wiki/Grid-Toolbar-Specification#user-interface

DaniMarinov avatar Jun 12 '19 10:06 DaniMarinov

@DaniMarinov Please update the first screenshot with the buttons to show the right padding of the toolbar.

desig9stein avatar Jun 12 '19 10:06 desig9stein

@desig9stein Check it now, I've updated it

DaniMarinov avatar Jun 12 '19 11:06 DaniMarinov