-
Notifications
You must be signed in to change notification settings - Fork 541
Naming of Widgets #219
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
Comments
We already chat about that one, it seems Google disagree and says "search box" is better.
Same; but we decided to go for Index because:
I think I like this one. 👍
I wouldn't got for those ones, we need to keep names than explain what the widget is about; not really which action will be performed. |
|
I also really think |
tl;dr;I would keep the current names, maybe change More: Nice to have so much discussion about widget and naming, we already did have a lot of them at the beginning also. Much have been said, I will give some context
@redox answered that, also when instantiating a search bar one would expect it to expand automatically to the max width (=bar). That's not what we want, this is up to the user or theme. We could have
This one is tricky. It was originally named Right now I would like to call it Every widget will require some index/algolia configuration and that's completely OK if we do state this well in the documentation (see #156).
Not sure again, because what you are dealing with are the Yes we could name it results. Dunno if that's really better.
We already spend a lot of time finding
The fact that internally we are DRY does not mean that the underlying widget API menu, hierarchicalMenu, refinementList should be merged. If you are a user looking at a way to "create a menu out of categories" then you will look for a "menu" widget I think.
Nope, it's implementation bubbling up to the API. I am looking for a toggle, I will search toggle.
Careful thought, we need to map the exact API names into the documentation. So we will not speak about
💯
Can you precise how you would like them to change? |
tl;dr I'd rather have several high-level widgets, even if they are internally just using the same components with different attributes. more: This issue is important to me at the moment because I'm working on the theming of widgets and I would like every widget to have its own set of CSS classes, so we can style them independently. At the moment, a lot of widgets are actually I think widgets should be high level, exposed to the users (keep in mind that instantsearch.js is geared toward non tech-savvy users), while we can still share some code internally (like re-using the same React components). I'd rather we have 10 different top-level widgets, for each possible combination of options of the underlying React components, than one do-it-all top level one.
Then, what seems the real hard part, will be naming the widgets that acts as refinementLists. Here is a proposal:
|
I am not sure to understand the issue of widgets naming for theming/default css classes. The widget are separated in menu, hierachicalMenu, toggle, refinementList. So the theming can just use those names to reflect the differences and provide the user the ability to have different styling. There's little chance you will want to style a menu the same way you will style a refinementList (links vs checkboxes). Can you elaborate with css code on what's the issue? |
I think the BEM root name (ais-refinement-list) should be defined at the widget level, not the component level. Components are just internal implementation, the user should not care about it. Indeed if I am using the menu widget and get ais-refinementList, I will be surprised. This will solve your question here I guess. |
I totally agree with you. CSS classes definition should stay in the widgets, and components are just internals. That's why I suggest we create new widgets on top of refinementList, so they can have their own classes (and explicit name) instead of using |
What are the different things we use the
I do not feel those are very different things, it's always a list of checkbox by default. As for the theming, there's no need to provide a different theme for those 3 use cases, this is just a list of checkboxes. There's no need to add/remove classes internally based on the options since the rendering is the same. The user has already all he needs to specify a custom class or even his own We talked a lot at the begining if we needed things like "singleRefinementList" "multipleRefinementList" and agreed that in the end, a simple If we really discover that this is a pain for our users then we can just move on and split etc.. That's not a problem. |
What is exactly Also, in the issue you linked, we're saying that So do we still have a I'm also not convinced we always want to display those elements using checkboxes. I've created a separate issue for that, because the discussion here is getting hard to follow. |
Yes, but menu is really sugar that people will look for if they want to create a "menu". We can get rid of singleRefine for sure, but then people will have to use a menu widget, provide a checkbox template.
I would say yes. If we get an issue or more people are using menu + checkboxes then we can remove it. |
We are good here I think |
I don't think so :) ( Let's close that one for now. |
Hey!
I'd love the name of the widgets to be more self-explaining for the users that won't code on the project.
I tried a different naming for most of them. I also propose a different organisation of the filter-related widgets.
Wdyt?
SearchBox => SearchBar
Most of the search solutions use the naming Search Bar, I agree.
IndexSelector => SortBySelector
If you want to change an index, you're either doing a SortBy, or doing a multi-index search.
If you're doing a muti-index search, search parameters won't be the same, so you'll need different instances of instantsearch.js.
-> Changing the index is only useful if you're doing a SortBy (very rare exceptions IMO)
Hits => Results
Seems more simple to understand to someone that doesn't know the Algolia API.
RefinementList + Menu => FilterList
The main Facet widget, contains options to select
To me, it doesn't make sense to have separate widgets when 95% of the behavior/markup/usage is identical. I'd rather have a parameter.
Toggle => BooleanFilter
Trying a different naming. Not sure about this one.
HierarchicalMenu => HierarchicalFilter
RangeSlider, Stats, Pagination, URLSynchronisation
These ones seem good to me.
The text was updated successfully, but these errors were encountered: