Skip to content
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

Deprecate Modifier.mouseClickable. It should be replaced by Modifier.onClick #243

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

eymar
Copy link
Member

@eymar eymar commented Jun 20, 2022

Questions:

Currently, the replaceWith expression ignores onClickLabel and role arguments.
We can try to add role - semantics(true) { if (role != null) this.role = role }. But it ends up with weird and verbose construction when role value is default (null).
I think that we can't set onClickLabel on behalf of a user, because onClickLabel makes sense only for Primary click, and onClick can be added multiple times with different click handlers.

Also, mouseClickable adds detectClickFromKey, indication, hoverable, focusableInNonTouchMode, which are not added within onClick and not added by replaceWith expression. I think the most convenient option is to describe these nuances in the tutorial.

@eymar eymar requested a review from igordmn June 20, 2022 12:41
@eymar eymar marked this pull request as ready for review June 20, 2022 12:41
@eymar eymar merged commit 9c4a6c3 into jb-main Jun 21, 2022
@eymar eymar deleted the deprecate_mouseClickable branch June 21, 2022 07:09
eymar added a commit that referenced this pull request Jun 27, 2022
…onClick (#243)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
eymar added a commit that referenced this pull request Jun 28, 2022
…onClick (#243)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
igordmn pushed a commit that referenced this pull request Aug 18, 2022
…onClick (#243)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
igordmn pushed a commit that referenced this pull request Aug 18, 2022
…onClick (#243)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
eymar added a commit that referenced this pull request Oct 26, 2022
…onClick (#243)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
eymar added a commit that referenced this pull request Nov 16, 2022
…onClick (#243)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
eymar added a commit that referenced this pull request Jan 13, 2023
…onClick (#243)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants