CSSTUDIO-2964 Alarm Tree application: Add indicators for the existence of disabled leaves#3310
CSSTUDIO-2964 Alarm Tree application: Add indicators for the existence of disabled leaves#3310abrahamwolk merged 15 commits intomasterfrom
Conversation
…parent instead of removing it when there exist disabled leaves.
1ce88cf to
9970970
Compare
| if (leaf.getEnabled().enabled_date != null) { | ||
| LocalDateTime enabledDate = leaf.getEnabled().enabled_date; | ||
| String stringToAppend = padWithLeadingZero(enabledDate.getHour()) + ":" + padWithLeadingZero(enabledDate.getMinute()) + ":" + padWithLeadingZero(enabledDate.getSecond()); | ||
|
|
There was a problem hiding this comment.
Would not SimpleDateFormat be a simpler approach here?
There was a problem hiding this comment.
Thanks for the suggestion! I have changed this.
| String paddedMonthNumber = padWithLeadingZero(enabledDate.getMonthValue()); | ||
| String paddedDayNumber = padWithLeadingZero(enabledDate.getDayOfMonth()); | ||
| stringToAppend = enabledDate.getYear() + "-" + paddedMonthNumber + "-" + paddedDayNumber + "T" + stringToAppend; | ||
| } |
There was a problem hiding this comment.
Same here: native Date/Time APIs could be a simpler option.
There was a problem hiding this comment.
I have changed this.
…eTimeFormatter.format().
The idea is that it reduces the cognitive load: if a date is displayed, the user will first have to parse it and determine if it's the current day or a future day.
This is a good question; I believe it will continue to display the date. |
|
I'd claim that differences in how date/time is rendered may also be define as cognitive load, in particular as after midnight the date/time is not re-rendered and potentially adds confusion. |
… will automatically be enabled again.
I tested how it changes when the future date becomes the current date, and it didn't update automatically, at least not immediately. When the state of the alarm tree was changed by enabling another disabled node, then it updated the text, however. I cannot think of an easy-to-implement way of automatically updating the text, and I have therefore changed the pull request so that the full date is always displayed to prevent potential confusion. |

This pull request adds indicators for the existence of disabled leaves to the Alarm Tree application.
The following screenshots demonstrate the implemented functionality. The idea is that one should not have to expand the alarm tree in order to see that there exist disabled alarms in an alarm component. The indicators are currently always in grey text. The existence of a timer is indicated.
The existence of at least one disabled alarm is indicated as follows:




The same alarm tree expanded:
The existence of a timer is indicated as follows:
When all leaves of "Alarm Component 1" are disabled, this is indicated as follows ("Alarm Component 1.3" contains no leaves, and hence it is not greyed out):