Bug 167641 - Web Inspector: Placeholder text is clipped in the 'Enter Class Name' field at the bottom of Rules style sidebar in some localizations
Summary: Web Inspector: Placeholder text is clipped in the 'Enter Class Name' field at...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-01-31 07:18 PST by BJ Burg
Modified: 2017-04-10 11:12 PDT (History)
8 users (show)

See Also:


Attachments
The issue (201.53 KB, image/png)
2017-01-31 07:18 PST, BJ Burg
no flags Details
Patch (4.51 KB, patch)
2017-04-09 20:25 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
[Image] Before/After (33.03 KB, image/png)
2017-04-09 20:41 PDT, Nikita Vasilyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2017-01-31 07:18:01 PST
Created attachment 300217 [details]
The issue

The layout here is very narrow and hard to read in a lot of languages. I attached one example. We could try making the box wider. I think in the long-term, the class toggle/adder UI should go alongside forced pseudoclasses at the top, not at the bottom.

This affects over half of our localizations for Safari.
Comment 1 BJ Burg 2017-01-31 07:18:09 PST
<rdar://problem/26541953>
Comment 2 Matt Baker 2017-01-31 11:59:12 PST
(In reply to comment #0)
> Created attachment 300217 [details]
> The issue
> 
> The layout here is very narrow and hard to read in a lot of languages. I
> attached one example. We could try making the box wider. I think in the
> long-term, the class toggle/adder UI should go alongside forced
> pseudoclasses at the top, not at the bottom.

Agree.
Comment 3 Devin Rousso 2017-01-31 12:09:25 PST
(In reply to comment #0)
> The layout here is very narrow and hard to read in a lot of languages. I
> attached one example. We could try making the box wider. I think in the
> long-term, the class toggle/adder UI should go alongside forced
> pseudoclasses at the top, not at the bottom.

Do you imagine it being always shown, but only revealed on scroll (similar to how the pseudo-classes are right now)?  If so, would this be above or below the pseudo-classes?  If not, should there still be a button somewhere to enable the listing of classes?
Comment 4 BJ Burg 2017-02-10 17:16:36 PST
(In reply to comment #3)
> (In reply to comment #0)
> > The layout here is very narrow and hard to read in a lot of languages. I
> > attached one example. We could try making the box wider. I think in the
> > long-term, the class toggle/adder UI should go alongside forced
> > pseudoclasses at the top, not at the bottom.
> 
> Do you imagine it being always shown, but only revealed on scroll (similar
> to how the pseudo-classes are right now)?  If so, would this be above or
> below the pseudo-classes?  If not, should there still be a button somewhere
> to enable the listing of classes?

I imagine a section called Element Overrides with a scope bar-type thing that just shows two options that can be multiply selected. When the appropriate bar item is selected we show the pseudo overrides or the class toggle section below.

Element Overrides [:pseudo] [.class]
------------------------------------
[ ] :hover         [ ] :active
...
------------------------------------
[ Add new class ]
[ ] class1 [ ] class2 ....
------------------------------------

... rest of the rules ...

This is fairly similar to what Chrome does except our filters always go on the bottom, and it's possible to see both override sections expanded at the same time.
Comment 5 Nikita Vasilyev 2017-04-06 13:21:42 PDT
I think the add new class input field should span the entire width of the sidebar. Not only it creates issues with localization, it's just too small for many class names.
Comment 6 Nikita Vasilyev 2017-04-09 20:25:37 PDT
Created attachment 306645 [details]
Patch
Comment 7 Nikita Vasilyev 2017-04-09 20:41:12 PDT
Created attachment 306646 [details]
[Image] Before/After
Comment 8 Joseph Pecoraro 2017-04-10 11:09:36 PDT
Comment on attachment 306645 [details]
Patch

Nice! r=me
Comment 9 WebKit Commit Bot 2017-04-10 11:12:07 PDT
Comment on attachment 306645 [details]
Patch

Clearing flags on attachment: 306645

Committed r215192: <http://trac.webkit.org/changeset/215192>
Comment 10 WebKit Commit Bot 2017-04-10 11:12:09 PDT
All reviewed patches have been landed.  Closing bug.