Skip to content

Comments

Rename WebElementView to HtmlElementView and migrate all usages#2636

Merged
eymar merged 6 commits intoJetBrains:jb-mainfrom
ApoloApps:renameToHtmlElementView
Dec 12, 2025
Merged

Rename WebElementView to HtmlElementView and migrate all usages#2636
eymar merged 6 commits intoJetBrains:jb-mainfrom
ApoloApps:renameToHtmlElementView

Conversation

@ApoloApps
Copy link

@ApoloApps ApoloApps commented Dec 9, 2025

Renaming WebElementView to HtmlElementView to better reflect the type of layout we are interoping with. Since all Interop elements in Web are bounded to HtmlElement from the dom apis, it makes sense to update the name to better reflect the purpose

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

Release Notes

Migration Notes - Web

  • Renamed WebElementView to HtmlElementView to better reflect its HTML-specific purpose

@MatkovIvan MatkovIvan requested a review from eymar December 10, 2025 10:18
@eymar
Copy link
Member

eymar commented Dec 10, 2025

Could you please run ./gradlew :mpp:jbApiDump and add the update to this PR too?

@ApoloApps
Copy link
Author

done

@eymar
Copy link
Member

eymar commented Dec 11, 2025

I see a lot of unrelated changes in the new api dump (for example for material3). I'll investigate.

@eymar
Copy link
Member

eymar commented Dec 11, 2025

I'm not sure why it generate such api dump in your case. (Do you have unstaged changes? I doubt, but that would exaplain it)

When I tried to update the dump in your branch it resulted only in one change:

// Targets: [js, wasmJs]
final fun <#A: org.w3c.dom/HTMLElement> androidx.compose.ui.viewinterop/WebElementView(kotlin/Function0<#A>, androidx.compose.ui/Modifier?, kotlin/Function1<#A, kotlin/Unit>?, kotlin/Function1<#A, kotlin/Unit>?, kotlin/Function1<#A, kotlin/Unit>?, androidx.compose.runtime/Composer?, kotlin/Int, kotlin/Int) // androidx.compose.ui.viewinterop/WebElementView|WebElementView(kotlin.Function0<0:0>;androidx.compose.ui.Modifier?;kotlin.Function1<0:0,kotlin.Unit>?;kotlin.Function1<0:0,kotlin.Unit>?;kotlin.Function1<0:0,kotlin.Unit>?;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){0§<org.w3c.dom.HTMLElement>}[0]

I think we can eliminate that change by keeping WebElementView experimental as it was. Experimental API doesn't apear in api dump.

If you return @ExperimentalComposeUiApi on WebElementView back, then you can drop the api dump commit.

@ApoloApps
Copy link
Author

ApoloApps commented Dec 11, 2025

I'm not sure why it generate such api dump in your case. (Do you have unstaged changes? I doubt, but that would exaplain it)

none that affect Material 3 sources or foundation Locale. I just did what you suggested since I cannot seem to make it work without it or not updating api dump. If you could do it from your side for it to work would be better but for now this is what I can do

Copy link
Member

@eymar eymar left a comment

Choose a reason for hiding this comment

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

Thank you!

@eymar eymar merged commit 88f5043 into JetBrains:jb-main Dec 12, 2025
34 of 36 checks passed
@eymar eymar requested a review from Schahen December 12, 2025 11:43
Copy link

@Schahen Schahen left a comment

Choose a reason for hiding this comment

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

Totally makes sense, strictly speaking we can deal in this HtmlViewElement with non-HTML DOM entities as well (first SVG comes to mind) but that's nit-picking already

@ApoloApps ApoloApps deleted the renameToHtmlElementView branch December 12, 2025 22:25
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