Skip to content
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

(Mostly) Form Fixes #894

Merged
merged 18 commits into from
Jun 5, 2018
Merged

(Mostly) Form Fixes #894

merged 18 commits into from
Jun 5, 2018

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Jun 1, 2018

1. Fixed line-height of h4’s in text

2. Updated Sketch zip version

3. Fixed switch background in case it’s been placed on a gray background

screen shot 2018-06-01 at 09 35 56 am

4. Form control layout icon fixes

  • Lessened spacing between icons
  • Using focus ring on buttons instead of changing color
  • Created a mixin for helping create the padding necessary depending on number or icons
  • Lightening fill color of icons when input is disabled
  • Making caret on disabled comboboxes disabled

5. Fix for Kibana overwriting :focus state on input that doesn’t start with .eui

This is what it was looking like in Kibana:
screen shot 2018-05-31 at 17 26 00 pm

6. Fixed responsive widths of EuiDescribedFormGroup

Now:
screen shot 2018-06-01 at 11 05 23 am

7. Align contents in form rows that don’t have a label and aren’t normally 40px tall

Now:
screen shot 2018-06-01 at 11 11 57 am

8. Added resize prop to EuiTextArea

...and defaults to ‘vertical’ (only height)

9. Ensure the descenders don't get cut off in selects

10. Added some more form variables

...and shifting readOnly inputs to not have left padding unless it has an icon

In implementation it would look like this:
screen shot 2018-05-31 at 17 25 55 pm

Now it looks like this:
screen shot 2018-06-01 at 15 04 28 pm

11. Fixed Safari's rendering of search inputs


  • IE tested
  • Changelog

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

The disabled icon prop for combo box is a great catch!

JS changes LGTM; nothing stands out to me in the SCSS but I'll definitely defer to @snide for those.


&:focus, &:hover {
background-color: $euiColorPrimary;
&:focus {
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing the blue for the focus state is fine, but do you think we can at least provide a hover state for these? Even just a slightly darker gray would be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the reason I took out the :hover part here was to emulate the default behavior from the type="search"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to leave the no hover state until/unless we decide to replace the stock search clear with our own.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep. Your reasoning makes sense to me.

// as inputs will align to the vertical center
min-height: $euiSizeXXL;
padding-bottom: 0;
justify-content: center;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a dope solution. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🌮 🌮

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Spent a bunch of time testing in browser, and did some tests in the compressed stuff as well. It looks good. Left some super small comments, but this looks good for merge. Nice work.

// Textareas have their own sizing
height: auto !important;
&, &--compressed {
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks fine here and is perfectly readable cuz its so small, but can we agree not to use a plain & on something larger? It makes the scss harder to troubleshoot. Where is this height coming from? It's not on the selector!...etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was just trying to save on duplication. Would adding a line-break between the two selectors help?

Copy link
Contributor

Choose a reason for hiding this comment

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

That will help.

@include euiFormControlIsLoading($isNextToIcon: true);

padding-right: $euiSizeXXL; /* 1 */
appearance: none;
line-height: $euiFormControlHeight; /* 2 */
Copy link
Contributor

Choose a reason for hiding this comment

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

TY for fixing this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🌮 🌮

@cchaos
Copy link
Contributor Author

cchaos commented Jun 4, 2018

I just now need to wait for #898 to get merged or else we'll have a conflict.

cchaos added 15 commits June 5, 2018 09:55
in case it’s been placed on a gray background
- Lessened spacing between icons
- Using focus ring on buttons instead of changing color
- Created a mixin for helping create the padding necessary depending on number or icons
:focus state on input that doesn’t start with `.eui`
And defaults to ‘vertical’ (only height)
and shifting readOnly inputs to not have left padding unless it has an icon
cchaos added 3 commits June 5, 2018 10:27
…lastic#898)"

This reverts commit b78e76d.

# Conflicts:
#	CHANGELOG.md
#	src/components/form/file_picker/_file_picker.scss
#	src/components/form/form_control_layout/_mixins.scss
@cchaos cchaos merged commit c4f7fd8 into elastic:master Jun 5, 2018
@cchaos cchaos deleted the fixes branch June 5, 2018 15:55
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.

3 participants