thaw-ui / thaw

An easy to use leptos component library
https://thawui.vercel.app
MIT License
206 stars 21 forks source link

Thaw/fluent demo fixes #211

Closed kandrelczyk closed 1 day ago

kandrelczyk commented 3 days ago

Fixed the search.

Light/dark theme selection is now stored in local storage. It looks like it was supposed to be stored in the URL but it wasn't fully implemented.

Added discord button.

Fixed issue with message bar markdown.

Removed options param from auto complete.

I didn't add keyboard functionality to the auto complete. I did some testing and it can be done using AutoCompleteInjection as a proxy between AutoComplete and children but I'm not sure if it's the right way to do it.

luoxiaozero commented 2 days ago

I didn't add keyboard functionality to the auto complete. I did some testing and it can be done using AutoCompleteInjection as a proxy between AutoComplete and children but I'm not sure if it's the right way to do it.

We can investigate how FluentUI does it.

kandrelczyk commented 2 days ago

https://github.com/microsoft/autocomplete-search-box - that's all I found, I don't see auto complete component on the react.fluentui.dev

So they pass options as a list and use optional custom renderers. What's the purpose of changing this to accept children? What additional features would this allow us to add?

luoxiaozero commented 2 days ago
  1. Refer to the Combobox component.
  2. Every time a new field is added to the previous AutoComplete structure, it is destructive.
kandrelczyk commented 1 day ago

https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/ComboBox/ComboBox.tsx - no idea how it works. I see the components receiving 'props.options' but I don't know how the

kandrelczyk commented 1 day ago

Ok, I added "attr:style" to the table generated from markdown but this branch is still using leptos 0.6 so I can't see the effect. I've seen the fluent branch with leptos 0.7 so I'm assuming it will work there and leave it for now.

luoxiaozero commented 1 day ago

no idea how it works. I see the components receiving 'props.options' but I don't know how the children are transformed into an array or IComboBoxOption type.

We can discuss this in Discord.

luoxiaozero commented 1 day ago

Thank you for working on this.