Skip to content

feat(js): rename class names#351

Merged
francoischalifour merged 5 commits intonextfrom
feat/js-class-names-1
Nov 4, 2020
Merged

feat(js): rename class names#351
francoischalifour merged 5 commits intonextfrom
feat/js-class-names-1

Conversation

@francoischalifour
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown

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

Comment thread packages/website/docs/autocomplete-js.md Outdated
</form>
<div
class="aa-Dropdown"
class="aa-ListContainer"
Copy link
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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