Feature/clear button for calendar drawers#4572
Conversation
Coverage Report for CI Build 29329505714Coverage decreased (-0.1%) to 58.992%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions22 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
📦 Build Artifacts Ready
|
Withalion
left a comment
There was a problem hiding this comment.
Welcome to the jungle!
|
Also the the clear text is not horizontally aligned with the rest of header and the text color is wrong |
📦 Build Artifacts Ready
|
| function hasValidFieldValue() { | ||
| return root._fieldValueIsNull | ||
| || root._fieldHasMixedValues | ||
| || (root._fieldValue ?? null) === null |
There was a problem hiding this comment.
| || (root._fieldValue ?? null) === null | |
| || root._fieldValue ?? true |
this should be the same
| } | ||
| } | ||
|
|
||
| function hasValidFieldValue() { |
There was a problem hiding this comment.
It would make more sense to call it invalid values
| } | ||
|
|
||
| onClearButtonClicked: { | ||
| root.editorValueChanged( undefined, true ) |
There was a problem hiding this comment.
is there a reason we can't use null? If not then let's prefer using null
There was a problem hiding this comment.
can you as well purge the openCalendar() method only keep forceActiveFocus() and then from openPicker() take the contents and put everything in openCalendar(). Remove openPicker()
| dim: true | ||
|
|
||
| drawerHeader.title: root.title | ||
| drawerHeader.topLeftItem.visible: !root.showClearButton |
There was a problem hiding this comment.
the logic of visibility is opposite to the naming of the variable, it should match
Problem
There was no way to remove value/set it as null for date field in calendar drawers. Users had to reopen the drawer by creating exactly the same point on the map for example.
Clearing the date field is causing runtime error.
Solution
Added a clear button in the drawer in header space.
Added guards which check for
undefinedandnull_fieldValuebefore assigningdateTimein calendar drawer.Behavior
Images for part 1
Video for part 1
Screencast.From.2026-06-30.17-43-27.webm