matt8707 / ha-fusion

A modern, easy-to-use and performant custom Home Assistant dashboard
MIT License
2.06k stars 87 forks source link

Merging SideBarItemConfig with MainItemConfig #535

Open patrickacollier opened 1 month ago

patrickacollier commented 1 month ago

@matt8707 curious what your thoughts are, or how you thought about handling the components that are only available to sidebar. Do you think SidebarItemConfig and MainItemConfig should be refactored into 1? If separate, how would you imagine handling the content rendering?

I've created a PR (on my local) just to see what all it would take (this is keeping both Main and Sidebar config). I've only implemented "Bar" from sidebar but all objects are available and editable. But determining the best way to display the content as they are implemented differently.

Also this is my first svelte project, so just a few hours in. open for any suggestions. image *also, with this test you can't actually edit the component once its created likely due to the differences in sidebar/main implements.

matt8707 commented 1 month ago

Yeah, there will be small (or large) differences in how the component looks and behaves depending on whether it's in the sidebar or main section. To stay sane while prototyping, they're split up for now. However, the plan is to merge them further down the line.