Allow one or more format to be used#2182
Conversation
e40fc6d to
327d47e
Compare
I fount that we can have |
|
@MaxVerevkin any thoughts on this approach to allow one or more format (either as how formats are currently configured, or as a list of format configs)? |
327d47e to
8cffbdd
Compare
|
@ammgws, any concerns with this approach? I only added support to the time block, but it could be added to other blocks. For blocks that already support |
8cffbdd to
1a9b169
Compare
|
On phone now but just to double check before going further, are the examples in your parent comment still the same? |
|
@ammgws , yes the example config works as before (well except the last time block, which fails on purpose) The change I made the other day was to keep the behavior that the first format keeps the Your question did raise an issue for me, what if a block does specify a default for |
1a9b169 to
00e1d7b
Compare
|
I've added support in two other blocks as examples: |
00e1d7b to
325e9b4
Compare
|
Sorry I keep forgetting to come back to this except when out on phone I think this is fine though |
c19924a to
71af3f4
Compare
|
Verify MaybeMultiConfig is not given an empty list of configs while deserializing The Implemented for the following blocks:
|
e51c0bf to
70b953e
Compare
Verify MaybeMultiConfig is not given an empty list of configs while deserializing The `toggle_format` action has been deprecated in favor of `next_format` and `prev_format` Implemented for the following blocks: * `amd_gpu` * `cpu` * `disk_space` * `memory` * `music` * Note: `prev_format` action is not tied to a button by default as right clicking is already assigned to `next_player`. * `net` * `privacy` * `sound` * Note: `prev_format` action is not tied to a button by default as right clicking is already assigned to `toggle_mute`. * `temperature` * `time` * Note: neither `next_format` nor `prev_format` are tied to buttons by default as left and right clicking are already assigned to `next_timezone` and `prev_timezone` respectively. * `weather`
70b953e to
e2d3aec
Compare
Currently this has only been applied to the time block, but any block that doesn't have formats for specific states/conditions could use this do allow one or more format, while still being able to continue using
formatandformat_alt. (This could work as a fix to #2163)One drawback about this is that I was unable to figure out how to be able to keep the
deny_unknown_fieldson theConfigThis will allow configs to be specified in any of these ways: