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

Add EuiFacetButton #1167

Merged
merged 15 commits into from
Sep 11, 2018
Merged

Add EuiFacetButton #1167

merged 15 commits into from
Sep 11, 2018

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Sep 6, 2018

This adds the EuiButtonFacet component seen in this mockup.

The documentation also explains how to lay them out.

cc @bevacqua

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Looked through it all, learned alot, played around with it locally... it's all great 👍

}, {
id: 'facet5',
label: 'Just here to show truncation of really long labels',
iconColor: VISUALIZATION_COLORS[5],
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's useful to include quantity on the truncated example, otherwise it looks like the text pushes the quantity display away.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, I'll add


expect(component)
.toMatchSnapshot();
});
Copy link
Contributor

Choose a reason for hiding this comment

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

please add tests for the various states, similar to features displayed in the docs (disabled, loading, with color or avatar, 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.

ahh yeah... ha...

children,
className,
icon,
isDisabled,
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember we discussed isFoo vs. foo, but don't remember where we ended up?

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 carried this over from the other buttons (specifically empty button). Figured we should at least be consistent there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Between types of buttons, that is.

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense to me!

@chandlerprall
Copy link
Contributor

Can you update the mockup to show some facets in the selected state? Playing with them in the docs I'm not sure the selected state is communicative enough.

@cchaos
Copy link
Contributor Author

cchaos commented Sep 6, 2018

I don't want to update that particular mock up screen, but here is one that where I finalized the selected state.

screen shot 2018-09-06 at 13 25 01 pm

- Updated tests
- Allowing `0` as a quantity
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.

LGTM! pulled & played with the docs

@chandlerprall
Copy link
Contributor

thanks for the additional mock!

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.

Code looks good. Documentation is clever. Visuals looks clean.

I might include a more basic example showing them in their default states. Might also be good to lay them out in a horizontal version just so people have a copy/paste example. Then your current doc example exists as the... ok, now here's all the stuff you can do to configure them.

Not necessary for this PR, just a thought so we follow our existing doc patterns.

@cchaos cchaos changed the title Add EuiButtonFacet Add EuiFacetButton Sep 10, 2018
@cchaos
Copy link
Contributor Author

cchaos commented Sep 10, 2018

Ok EuiButtonFacet is now EuiFacetButton which lives in components/facet along with EuiFacetGroup for layout purposes.

Can I get a quick re-check?

Sorry, and thanks in advance!

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.

Loaded again locally. Looks good. Thanks for switching up the docs.

@cchaos cchaos merged commit ca4e952 into elastic:master Sep 11, 2018
@cchaos cchaos deleted the facet-button branch September 11, 2018 15:54
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