KEMBAR78
Adopt the new context menu API for the web dropdown context menu by terrakok · Pull Request #2224 · JetBrains/compose-multiplatform-core · GitHub
Skip to content

Conversation

@terrakok
Copy link
Member

@terrakok terrakok commented Jul 8, 2025

Adopt the new context menu API for the web dropdown context menu.
Can be enabled by

ComposeFoundationFlags.isNewContextMenuEnabled = true
nwm.mp4

Fixes https://youtrack.jetbrains.com/issue/CMP-8433

Testing

This should be tested by QA

Release Notes

Features - Web

  • Support the new context menu API in web targets in the desktop mode

@terrakok terrakok requested review from eymar and m-sasha July 8, 2025 15:35
@eymar
Copy link
Member

eymar commented Jul 9, 2025

Trying it. I see some unexpected menu items duplications:

Screenshot 2025-07-09 at 12 14 26

I belive it happens because the SelectionContainer provides its own menu and TextField provides another menu.
Do you know if the items' keys are unique?

@MatkovIvan MatkovIvan changed the title Adopt the new context menu API for the web dropdown context menu. Adopt the new context menu API for the web dropdown context menu Jul 9, 2025
@m-sasha
Copy link
Member

m-sasha commented Jul 9, 2025

Trying it. I see some unexpected menu items duplications:

I'm talking to the Googler working on context menus about this. We'll get it fixed on their end.

Comment on lines 46 to +50
internal fun getString(string: Strings): String {
return getLocalizedString(string)
}

internal fun getLocalizedString(string: Strings): String {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why keep both functions? If you think getLocalizedString is better, just rename it...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is for simplify the next merge with upstreamed changes. there is an expect composable function

@terrakok
Copy link
Member Author

terrakok commented Jul 9, 2025

The same happens on android with a cursor input:
image

android text toolbar works unusual as well
image

@terrakok terrakok merged commit 28964b7 into jb-main Jul 9, 2025
11 checks passed
@terrakok terrakok deleted the web-new-ctx-menu branch July 9, 2025 14:35
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.

3 participants