devdeck icon indicating copy to clipboard operation
devdeck copied to clipboard

Buttons render incorrectly when controls out of order

Open joshbenner opened this issue 3 years ago • 1 comments

Buttons occasionally render incorrectly, showing the wrong content as well as render artifacts. This seems to be related to listing the controls out of order, as the behavior can be prevented by ordering the keys in the configuration.

devdeck-artifacts

Configuration producing this behavior:

decks:
- name: devdeck.decks.single_page_deck_controller.SinglePageDeckController
  serial_number: redacted
  settings:
    controls:
    - key: 0
      name: devdeck_slack.slack_deck.SlackDeck
      settings:
        api_key: 'redacted'
        actions:
          - action: online
            key: 0
          - action: away
            key: 1
          - action: status
            key: 2
            text: BRB
            emoji: ':stopwatch:'
    - key: 7
      name: devdeck.controls.clock_control.ClockControl
    - key: 1
      name: devdeck.controls.timer_control.TimerControl

joshbenner avatar Jun 27 '21 15:06 joshbenner

Hi @joshbenner

Thanks for reporting the issue. I've seen this before myself, I'm not 100% convinced the issue is to do with key ordering, as my config has the keys in order and I have still seen the problem. However, 1.0.11 has now been released which will render the keys in order, regardless of how they appear in the config. So this should allow us to rule this out as a factor.

jamesridgway avatar Jul 03 '21 11:07 jamesridgway