-
Notifications
You must be signed in to change notification settings - Fork 9
#133 Added the dismissOnNotAnnotatable
expression option
#215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
#133 Added the dismissOnNotAnnotatable
expression option
#215
Conversation
* Determines whether an active selection should be dismissed | ||
* when a user ends their interaction (click, selection) | ||
* on a non-annotatable element. | ||
* - NEVER - don't dismiss the selection, ignore the action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The NEVER
matches the behavior we had before the introduction of the dismissOnClickOutside
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not married to the ANNOTATABLE_AREAS
name (and it's clunky I admit). But clicking outside of a highlight–but inside the annotatable area–does discard the current selection, so I wonder if NEVER
works as a expected as a name? At the same time, with the necessary clarification in the docs, it might be the catchier/less convoluted term...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The important detail is that the dismissOnNotAnnotatable
expression is relevant only when a user ends their interaction on a not-annotatable
element.
With that in mind, reading the dismissOnNotAnnotatable="ANNOTATABLE_AREAS"
looks a bit questionable. Like how the not-annotatable controls is impacted by the annotatable area 🤔
That's why I went with the dismissOnNotAnnotatable="NEVER"
. It clearly states that if an interaction ends on the not-annotatable, the dismissal should be cancelled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good point! I missed the renaming of the prop. I somehow was still thinking about the idea of naming it dismissOnPointerUp
.
The good news is that the migration to the |
Issue
In the #208 (comment) @rsimon and I discussed that it would be worth extending the
dismissOnClickOutside
into a more elaborate expression-like option.Changes Made
Replaced the
dismissOnClickOutside
option with thedismissOnNotAnnotatable
that now is the aforementioned expression. Now thedismissOnNotAnnotatable: ALWAYS
option matches the previousdismissOnClickOutside: true
.(Soomo Staged, 09.09.25)