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): rename class names #351

Merged
merged 5 commits into from
Nov 4, 2020
Merged

Conversation

francoischalifour
Copy link
Member

This renames the class names to better reflect the structure of the DOM.

Feel free to suggest any changes.

This renames the class names to better reflect the structure of the DOM.

Feel free to suggest any changes.

BREAKING CHANGE
Copy link
Contributor

@Shipow Shipow left a comment

Choose a reason for hiding this comment

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

much better

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 29, 2020

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 73285f5:

Sandbox Source
@algolia/js-example Configuration

@@ -109,7 +109,7 @@ describe('autocomplete-js', () => {
</div>
</form>
<div
class="aa-Dropdown"
class="aa-ListContainer"
Copy link
Member Author

Choose a reason for hiding this comment

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

Any better alternative to this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think dropdown is really a bad name

Copy link
Contributor

Choose a reason for hiding this comment

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

It's going to have ul, right? Then.. I guess ListContainer is good.

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 something with "results" could also work

Copy link
Member Author

@francoischalifour francoischalifour Oct 29, 2020

Choose a reason for hiding this comment

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

@Haroenv "dropdown" loses its sense in the context of modal searches like DocSearch v3, so I'm unsure.

Copy link
Contributor

Choose a reason for hiding this comment

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

panel maybe?

Copy link
Contributor

Choose a reason for hiding this comment

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

ListsContainer or ResultsContainer seems best to me. Maybe also something like Suggestions, Collections or Sources, since you renamed that?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's important to note that this term will also replace the main getDropdownProps API:

https://github.com/algolia/autocomplete.js/blob/a916aea48743eaa3e97e1e421aa1ac6986fa0e83/packages/autocomplete-core/src/createAutocomplete.ts#L81

Perhaps "Panel" makes sense?

Copy link
Contributor

@Shipow Shipow Oct 30, 2020

Choose a reason for hiding this comment

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

Panel came back several times, Menu isn't a bad name neither. Except you won't have to wait to get your order served :p

Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed "ListContainer" to "Panel" in a600ed2. That's good enough for now.

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

I guess some things can still change, but good enough for now indeed

@francoischalifour francoischalifour merged commit 8c53d2d into next Nov 4, 2020
@francoischalifour francoischalifour deleted the feat/js-class-names-1 branch November 4, 2020 11:23
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