Skip to content

Set larger label-filter default input click targets #1216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2017

Conversation

sg00dwin
Copy link
Member

@sg00dwin sg00dwin commented Feb 2, 2017

Set reasonable widths on the default input

screen shot 2017-02-02 at 5 23 08 pm

screen shot 2017-02-02 at 5 18 40 pm

screen shot 2017-02-02 at 5 17 34 pm

@jwforres
Copy link
Member

jwforres commented Feb 2, 2017

what happens after you have filled out the first box? it goes back to only the width it needs?

@sg00dwin
Copy link
Member Author

sg00dwin commented Feb 3, 2017

Yes. It only targets the initial default state .label-filter-key .selectize-input.not-full for the label key because not-full is removed and replaced with full.

screen shot 2017-02-02 at 9 52 48 pm

.label-filter-key .selectize-input.not-full {
// Increase default input click target
width: 220px;
@media (min-width: @screen-xs) and (max-width: @screen-sm-max) { width: (@screen-xs - 100)} // 380px
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need the max-width here since you have a rule just below that sets the width for screen-md and larger

// Increase default input click target
width: 220px;
@media (min-width: @screen-xs) and (max-width: @screen-sm-max) { width: (@screen-xs - 100)} // 380px
@media (min-width: @screen-md) { width: (@screen-xs + 20)} // 500px
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how the width relates to screen-xs here. You set max-width: 600px; of the entire control above, so I'd think you would make width relative to that.

@sg00dwin sg00dwin force-pushed the default-filter-width branch from 8bdb6a7 to e1242b2 Compare February 6, 2017 15:07
@sg00dwin
Copy link
Member Author

sg00dwin commented Feb 6, 2017

@spadgett Updated pr
At the standard media queries I set the input width to fill the data-toolbar-filter.
Since the data-toolbar-filter max-width:600px was initially an arbitrarily created width. I decided to make data-toolbar-filter width match that of its container at the 992 media query break point.
832 - 60 = 772; container - (left + right margin)

screen shot 2017-02-05 at 9 33 46 pm

screen shot 2017-02-05 at 9 26 20 pm

screen shot 2017-02-06 at 9 59 12 am

screen shot 2017-02-05 at 8 20 45 pm

screen shot 2017-02-05 at 8 20 23 pm

@sg00dwin
Copy link
Member Author

sg00dwin commented Feb 6, 2017

[test]

@@ -1,6 +1,12 @@
/* Data toolbar
- Includes customizations for label filter input and active filter
---------------------------------------------------------------------------- */
@data-toolbar-filter-max-width: 772px; // 832 - 60; container - (left + right margin) at 992px viewport width
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making these variables.

Unclear where the 832 comes from. Would be better to calculate from variables like @grid-gutter-width and @screen-md etc where possible.

Same comment for some of the magic numbers below.

width: @label-filter-default-input-xs;
@media (min-width: @screen-xs) { width: @label-filter-default-input-sm;}
@media (min-width: @screen-sm) { width: @label-filter-default-input-md;}
@media (min-width: @screen-md) { width: @label-filter-default-input-lg;}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these media queries use @screen-xs-min, @screen-sm-min and @screen-md-min ?

@sg00dwin sg00dwin force-pushed the default-filter-width branch 3 times, most recently from 876fad6 to 3a36dec Compare February 6, 2017 17:53
@sg00dwin
Copy link
Member Author

sg00dwin commented Feb 6, 2017

@spadgett Yep, updated the media query min variable. And for the data-toolbar-filter set it max width using the following.
@screen-md-min - (sidebar-left + left margin + right margin); 992 - (145 + 30 + 30) = 787

screen shot 2017-02-06 at 12 22 40 pm

@sg00dwin sg00dwin force-pushed the default-filter-width branch from 3a36dec to 4054777 Compare February 6, 2017 21:15
@sg00dwin
Copy link
Member Author

sg00dwin commented Feb 6, 2017

@spadgett did a clean install and updated pr

@sg00dwin sg00dwin force-pushed the default-filter-width branch from 4054777 to 1bfa993 Compare February 9, 2017 14:24
@spadgett spadgett self-assigned this Feb 10, 2017
@spadgett spadgett added this to the 1.6.0 milestone Feb 10, 2017
@data-toolbar-filter-max-width: (@screen-md-min - (@sidebar-left-width-md + @middle-content-container-padding-lg + @middle-content-container-padding-lg));
@label-filter-default-input-lg: (@label-filter-default-input-md + 190); // 730px
@label-filter-default-input-md: (@label-filter-default-input-sm + 140); // 540px
@label-filter-default-input-sm: (@label-filter-default-input-xs + 160); // 400px
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sg00dwin I don't think adding arbitrary amounts to the previous width variables here adds much value. I'd rather just set pixel sizes for each.

@label-filter-default-input-xs: 240px;
@label-filter-default-input-sm: 400px;
@label-filter-default-input-md: 540px;
@label-filter-default-input-lg: 730px;

Or even inline the values if they're only used once.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you keep the variables names, maybe use label-filter-input-width-*? -width should be in there somewhere.

@sg00dwin sg00dwin force-pushed the default-filter-width branch from 1bfa993 to 01b07f9 Compare February 23, 2017 20:42
@sg00dwin
Copy link
Member Author

@spadgett updated pr with rebase and clean/install

@sg00dwin sg00dwin force-pushed the default-filter-width branch from 01b07f9 to bcfdce1 Compare February 24, 2017 15:19
@openshift-bot
Copy link

Evaluated for origin web console test up to bcfdce1

@sg00dwin
Copy link
Member Author

@spadgett PTAL vendor.js diff is removed

@spadgett
Copy link
Member

[merge]

@openshift-bot
Copy link

Evaluated for origin web console merge up to bcfdce1

@openshift-bot
Copy link

openshift-bot commented Feb 24, 2017

Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/1108/) (Base Commit: 3af61e9)

@openshift-bot
Copy link

Origin Web Console Test Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/1107/) (Base Commit: 3af61e9)

@openshift-bot openshift-bot merged commit 7195b40 into openshift:master Feb 24, 2017
@sg00dwin sg00dwin deleted the default-filter-width branch February 24, 2017 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants