-
-
Notifications
You must be signed in to change notification settings - Fork 399
[Site] new facet menu demo WIP #3234
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
base: 2.x
Are you sure you want to change the base?
Conversation
779a153 to
7afca0e
Compare
94noni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some review passing by
I think its a good addition as you mentioned in the PR doc :)
| ) { | ||
| } | ||
|
|
||
| #[LiveListener('facetSetted')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #[LiveListener('facetSetted')] | |
| #[LiveListener('Animalz.FacetMenu.facetSetted')] |
as per above suggestion if accepted
| public function emitChange(): void | ||
| { | ||
| $this->nullTheProps(); | ||
| $this->emit('facetSetted', $this->convertPropertiesToAssociativeArray()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $this->emit('facetSetted', $this->convertPropertiesToAssociativeArray()); | |
| $this->emit('Animalz.FacetMenu.facetSetted', $this->convertPropertiesToAssociativeArray()); |
perhaps be more precise to locate/listen particular event ?
ac93e52 to
4ada80c
Compare
- Use PascalCase for enum values (Normal instead of NORMAL) - Use named arguments in Animalz constructor - Cache this.results in template variable to avoid double call
4ada80c to
257b970
Compare
|
@Nayte91 i'm not sure how to do this now... should i push the changes I made directly there ? (disclosure: we discussed this PR on Slack for some time with Nayte and I started the other day some changes / moving things around) TL;DR; some code clean, simplification, pushed your design a bit in the spirit of what we have already, and anticipate the fact this demo would benefit from alternative choices... Facet search, "grid of products" is probably what I'm asked the most, about Symfony UX... And I can say there is no "one-for-all" solution. I really do like your demo and we will happily publish it. (but you know how I'm really not able to say right now if "after that" is in two days or two years...) |
WHAT
New demo where we use Live Components to address a common web use case: a facet menu to filter articles, and another Live Component-powered results section where articles are filtered in real time. Bonus: the URL is also updated in real time when facet filters change, ensuring a correct shareable link for the user.
WHY
I believe this is a common use case, and using Live Components for it is relevant. Providing real solutions for real problems on the website offers a lot of value.
DRAFT
Still to do: