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

feat(js): wrap item action buttons in container #434

Merged
merged 1 commit into from
Feb 8, 2021

Conversation

francoischalifour
Copy link
Member

Description

This adds a container that wraps the item action button. It enables designs with multiple actions.

Preview

Using a dummy additional icon for Query Suggestions:

Screenshot 2021-02-08 at 13 35 02

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 8, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9e20533:

Sandbox Source
@algolia/js-example Configuration
@algolia/react-renderer-example Configuration

@Haroenv
Copy link
Contributor

Haroenv commented Feb 8, 2021

in theory you could also do this using flexbox without the wrappers https://codepen.io/Haroenv/pen/YzpWqWp

@francoischalifour
Copy link
Member Author

@Haroenv Yep, but we want to make it easy to design themes, and to have clear visual sections to separate elements in the UI when creating layouts.

@francoischalifour
Copy link
Member Author

FWIW here's another example with an "Add to cart" button that sends a conversion event:

image

@francoischalifour francoischalifour merged commit 0032f38 into next Feb 8, 2021
@francoischalifour francoischalifour deleted the feat/item-actions-container branch February 8, 2021 13:40
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

LGTM! Just wondering, it seems that we use singular for every class names, shouldn't we use aa-ItemAction instead?

@Haroenv
Copy link
Contributor

Haroenv commented Feb 8, 2021

it's plural, since there can be multiple, it's more ItemActionContainer (but that's too long)

@shortcuts
Copy link
Member

shortcuts commented Feb 8, 2021

Considering the existing classes, I felt like we were mostly naming what the container is rather than what the content could be. Like aa-ItemContent, even though there could be multiple in it. Not sure if it make sense 🤔

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.

None yet

3 participants