AdyRock / com.ady.button_plus

GNU General Public License v3.0
2 stars 3 forks source link

Empty display label gets reset when adding new item #73

Closed Joolee closed 8 months ago

Joolee commented 8 months ago

Homey

Describe the bug When adding a new item in the 'Display configurations' page, any item with an empty label field gets it's label filled with the capability name.

To Reproduce Steps to reproduce the behaviour:

  1. Go to app settings > Display Configuration
  2. Add a display item with a Homey device and capability
  3. Make the 'Label' field empty and save
  4. Refresh or do anything you want, label stays empty
  5. Add a new display item
  6. See the label of the first display item filled in with the capability name

Expected behaviour Label should stay as-is, it works through refreshes and seems to be the correct behaviour

Additional context Using the settings page on Firefox in https://tools.developer.homey.app/tools/app-settings

Workaround Using a space as the label, the Javascript doesn't use 'trim' but somewhere in the communication to the Button+, the space does get trimmed :)

AdyRock commented 8 months ago

Hmm, I couldn't think of a reason to have a blank label, so the auto fill of an empty field was supposed to be a convenience. I will rethink that.

Joolee commented 8 months ago

The default (non-homey) configuration of the Button+ has a temperature display item without a label so I thought it would be an expected and supported feature.

Speaking of no-label, the webinterface of the button also has a small display problem when not using a label: image The display itself shows them properly lined up.

Note: I'm using a space as the label name as a workaround for this screenshot. The label entry field on the webinterface of the button also shows the space in the field so that does get communicated correctly.

AdyRock commented 8 months ago

The web interface is Roberts domain. I will do something about the label issue.

Torch1969 commented 8 months ago

Hmm, I couldn't think of a reason to have a blank label, so the auto fill of an empty field was supposed to be a convenience. I will rethink that.

Could be handy with text capabilities where text is self explaining, for instance weather forecast. But only if the field takes up less space on the screen when label is empty, which isn’t the case I suppose. Could be a nice feature for Ronald to implement on the device…..😀