edisonywh / backoffice

Admin tool built with the PETAL stack
MIT License
217 stars 15 forks source link

Add new filtering UI #41

Closed edisonywh closed 3 years ago

edisonywh commented 3 years ago

I think the end result looks pretty good, though I'm not really satisfied with the code quality. I think there are a lot of room for improvement here..

For example, I think there's a lot of duplication. Rendering a field now is spread across multiple parts, we need to repeat the type logic in FilterComponent and also in Field, can we tidy that up?

Another thing is, right now the FilterComponent "updates" the params by navigating it to a new page - should we do that, or should we have FilterComponent send_update to the parent, and let the parent do the navigation?

image

https://user-images.githubusercontent.com/20277437/115443834-0f058e00-a214-11eb-8350-be23195ecc99.mp4