New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 686905 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

MD Settings: Change .one-line/.two-line/.three-line min-height to use paddings instead

Project Member Reported by scottchen@chromium.org, Jan 30 2017

Issue description

(This is a tech-debt clean-up / localized style improvement bug)

Currently we have these min-height classes that determines how tall the settings rows should be, but in reality bettes@ defined those heights in order to make sure the text has exactly 16px space between text and the top/bottom of the container borders. 

The current approach of setting min-height is not flexible enough for localization. For example, we might have a .two-line class on some element, but in German the text actually spans 3 lines, leaving not enough padding as desired.

Proposed solution: 
Add padding-top/bottom: 12.5px to settings-box, and make sure:
1) everything still looks the same
2) UI doesn't flicker/jump in size due to lack of min-height (maybe sometimes the second-line of the two-line will only show up after a brief delay)

Note: 
12.5px comes from:
- we want 16 px between text and border
- font-size is 13px by default
- line-height is 20px by default

So, space that already exists around the text = (20-13)/2 = 3.5px on each side
16 - 3.5 = 12.5px
       



 

Comment 1 by dbeam@chromium.org, Feb 6 2017

Labels: Hotlist-MD-Settings-General
Owner: ----
Cc: proberge@chromium.org namratakannan@chromium.org
FYI, this maybe partially addressed by https://chromium-review.googlesource.com/c/chromium/src/+/1135554. It also matches what we discussed earlier in today's UX meeting.
 Issue 866641  has been merged into this issue.

Comment 5 Deleted

Owner: johntlee@chromium.org
Status: Started (was: Available)
hey John, were you able to try German or attach "before" screenshots that show the 3-line situation scottchen@ was describing?
Here are the before shots. Note how there isn't the expected padding between the line and where the text begins. It's noticeable both when the language causes the copy to be longer than the English version, and when the default font size is set to larger.
EvfcQzxLsa2.png
50.5 KB View Download
0LzAFNg9XAe.png
46.8 KB View Download

Comment 8 Deleted

Extensions details page's padding made more consistent with the other Settings pages:
Screenshot from 2018-12-04 14-25-09.png
52.4 KB View Download
Screenshot from 2018-12-04 14-25-40.png
83.3 KB View Download
Screenshot from 2018-12-04 14-31-57.png
76.4 KB View Download
Project Member

Comment 10 by bugdroid1@chromium.org, Dec 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5343a708b04b9f1d92328a1201e815f1a13dd05f

commit 5343a708b04b9f1d92328a1201e815f1a13dd05f
Author: John Lee <johntlee@chromium.org>
Date: Mon Dec 10 19:01:21 2018

WebUI: Add CSS variable for vertical-padding, move cr-link-row and the rest of the Extension details page to use padding

Screenshots: https://bugs.chromium.org/p/chromium/issues/detail?id=686905#c8

Bug: 686905
Change-Id: I48f756ca5ee1cbf3d4d581aeed7e6dd54b8cd1a1
Reviewed-on: https://chromium-review.googlesource.com/c/1358925
Commit-Queue: John Lee <johntlee@chromium.org>
Reviewed-by: Scott Chen <scottchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615191}
[modify] https://crrev.com/5343a708b04b9f1d92328a1201e815f1a13dd05f/chrome/browser/resources/md_extensions/detail_view.html
[modify] https://crrev.com/5343a708b04b9f1d92328a1201e815f1a13dd05f/ui/webui/resources/cr_elements/cr_link_row/cr_link_row.html
[modify] https://crrev.com/5343a708b04b9f1d92328a1201e815f1a13dd05f/ui/webui/resources/cr_elements/shared_vars_css.html

Padding added to all the rows in the People section.
Screenshot from 2018-12-11 10-52-35.png
39.9 KB View Download
Screenshot from 2018-12-11 10-46-20.png
64.4 KB View Download
Cc: jessejames@chromium.org elizabethchiu@chromium.org khorimoto@chromium.org shibasheikh@chromium.org
CC'ing the UX team for multi-device features. FYI, the padding of the "Connected Devices" section will be changed.
Project Member

Comment 14 by bugdroid1@chromium.org, Dec 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34552446556ef8a294948812d73eda090269c7ce

commit 34552446556ef8a294948812d73eda090269c7ce
Author: John Lee <johntlee@chromium.org>
Date: Thu Dec 13 23:16:10 2018

WebUI: Update Network, Bluetooth, Connected devices sections to include padding on all the text

Bug: 686905
Change-Id: I2b56fab6601efe2daa11c2efde85dd309a6255ea
Reviewed-on: https://chromium-review.googlesource.com/c/1374966
Reviewed-by: Scott Chen <scottchen@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616474}
[modify] https://crrev.com/34552446556ef8a294948812d73eda090269c7ce/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html
[modify] https://crrev.com/34552446556ef8a294948812d73eda090269c7ce/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.html
[modify] https://crrev.com/34552446556ef8a294948812d73eda090269c7ce/chrome/browser/resources/settings/internet_page/internet_detail_page.html
[modify] https://crrev.com/34552446556ef8a294948812d73eda090269c7ce/chrome/browser/resources/settings/internet_page/internet_known_networks_page.html
[modify] https://crrev.com/34552446556ef8a294948812d73eda090269c7ce/chrome/browser/resources/settings/internet_page/internet_page.html
[modify] https://crrev.com/34552446556ef8a294948812d73eda090269c7ce/chrome/browser/resources/settings/internet_page/internet_subpage.html
[modify] https://crrev.com/34552446556ef8a294948812d73eda090269c7ce/chrome/browser/resources/settings/internet_page/network_summary_item.html
[modify] https://crrev.com/34552446556ef8a294948812d73eda090269c7ce/chrome/browser/resources/settings/multidevice_page/multidevice_page.html

Added padding to cr-expand-buttons, aka rows that are expandable.
expand 2.png
33.5 KB View Download
expand.png
28.0 KB View Download
Project Member

Comment 17 by bugdroid1@chromium.org, Jan 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/90657fcb3170ee4cb3763fc748c63258f6a8869a

commit 90657fcb3170ee4cb3763fc748c63258f6a8869a
Author: John Lee <johntlee@chromium.org>
Date: Thu Jan 10 03:46:00 2019

WebUI: Correct the uses of cr-expand buttons and add padding to them

This updates cr-expand-button to be entirely clickable and be easily
customized with classes on the component itself, so that
we can actually use the <slots>s more easily, use buttons as entire
'settings-box' rows and remove some duplicated code

Bug:  880120 , 686905
Change-Id: I29fdc238b16ab00ee7666199a71939975604b399
Reviewed-on: https://chromium-review.googlesource.com/c/1396598
Commit-Queue: John Lee <johntlee@chromium.org>
Reviewed-by: Hector Carmona <hcarmona@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621447}
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/chrome/browser/resources/settings/a11y_page/tts_subpage.html
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.html
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/chrome/browser/resources/settings/internet_page/internet_detail_page.html
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/chrome/browser/resources/settings/internet_page/internet_detail_page.js
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/chrome/browser/resources/settings/internet_page/internet_page.html
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/chrome/browser/resources/settings/internet_page/internet_page.js
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/chrome/browser/resources/settings/languages_page/languages_page.html
[modify] https://crrev.com/90657fcb3170ee4cb3763fc748c63258f6a8869a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html

Sign in to add a comment