fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.36k stars 343 forks source link

client: make spectrum respect changed the current color #1269

Closed jtojnar closed 3 years ago

jtojnar commented 3 years ago

For some reason, the initial value is no longer taken from the background colour (if it ever was). Let’s pass the colour to spectrum to have it selected instead of the terrible hardcoded colour.

The downside is that changing a colour (and closing the popover) will cause the spectrum instance to be torn down and re-created. But the other simple alternative of caching the initial colour using React.useState would prevent updating the selected value from tag synchronization API response.