-
Notifications
You must be signed in to change notification settings - Fork 100
Support text context menus in web targets #2207
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
Conversation
This is temporary workaround until https://android.googlesource.com/platform/frameworks/support/+/d8bc9d81dffa35162626e45ee68d4a7e271c6ada is merged to jb-main
compose/ui/ui/src/webCommonW3C/kotlin/androidx/compose/ui/platform/WebTextToolbar.kt
Show resolved
Hide resolved
I see lots of
Why not cherry-pick instead? |
@m-sasha it was my request to avoid merge conflicts - it's not a part of 1.9 in AOSP. Having such |
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 don't know if we should be using Google's UI code.
I already added our version to skikoMain
in my PR, which looks better on the desktop.
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.
It's probably worth adjusting such things in commonMain
now...
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.
How? Google wants material-like looks there. We don't.
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.
And again it's not compilation target dependent. And we DO want to use AOSP version as a source of truth.
Using material-like styles in foundation
is against Google's architectural layers design principles. If it's really the case - it needs to be fixed in AOSP
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.
this is for web targets. I guess it is better to follow the common style (material) until we support something else
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.
Then why did you ask me to put the corresponding desktop code into skikoMain
?
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.
And again it's not compilation target dependent. And we DO want to use AOSP version as a source of truth.
If I understand correctly, it wasn't in common until we asked to put it there. Maybe we should not have asked for this.
Sorry, I don't understand what was done here. I thought this was commonizing and upstreaming the (old) API we had for the desktop. And we'll need to merge it with our adaptations of the new context menu API, e.g. my PR. My head is exploding. |
No.
|
What is that? |
It is the menu you can see when you connect a mouse to the android device |
at the end I use the "android"-mouse acm.mp4 |
I don't think this existed before 1.9, but maybe I'm wrong. Why did we chose to commonize that instead of our own desktop stuff? And they're not entirely separate - some classes are shared. I'm really having trouble wrapping my head around it. |
compose/ui/ui/src/webCommonW3C/kotlin/androidx/compose/ui/platform/WebTextToolbar.kt
Show resolved
Hide resolved
fe9b628
to
958dab7
Compare
958dab7
to
264c651
Compare
At the moment, the PR introduces the same text context menus as in Android. That was an initial idea. In the future it is possible to reuse your new Desktop API for the menus, but not in the current task. The aim is to run existed code in the web. |
Support text context menus in web targets


Fixes https://youtrack.jetbrains.com/issue/CMP-113
Testing
This should be tested by QA
Release Notes
Highlights - Web