Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@p-mazhnik
Copy link
Contributor

@p-mazhnik p-mazhnik commented Feb 29, 2024

This PR changes the JS-accessible methods to add/remove views in a multi-view web app from async to sync.

It also adds a new add/remove view test that tests calling the actual JS methods, and verifies in the engine that the view has been registered/unregistered.


Related: flutter/flutter#138930

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Feb 29, 2024
@ditman ditman requested review from ditman and mdebbar March 1, 2024 00:47
@p-mazhnik
Copy link
Contributor Author

@ditman While this PR is a subject for discussion, do you think the engine will benefit if I extract the test into a separate PR, adapting it for the async case? I didn't find other tests in the repo for addView JS function when I was working on these changes

@ditman
Copy link
Member

ditman commented Mar 7, 2024

@p-mazhnik it's likely that I'll land this, either in this PR or in a separate one cherry-picking this change + some stuff, I've been convinced to:

  • make these methods sync
  • rename them to mount(config)/unmount(id)
    • this way, if we ever add a view object usable from JS, we have addView(config)/view.remove() available.

@ditman
Copy link
Member

ditman commented Mar 7, 2024

@p-mazhnik the test is indeed very useful, thanks for that, and that will land FOR SURE regardless of what happens with the synchronicity of the views. I take back what I said about renaming stuff above, let's do one change at a time, and figure out if this being sync hurts or helps :)

@p-mazhnik
Copy link
Contributor Author

@ditman in case you need a version of this test for the current async scenario, e.g. for internal testing, I also have the one: https://github.com/flutter/engine/compare/main...p-mazhnik:addview-test?expand=1

@ditman
Copy link
Member

ditman commented Mar 7, 2024

@p-mazhnik that's fantastic, thanks for both the implementations of the test!

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Thanks for the change, let's make those methods sync!

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 7, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 7, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 7, 2024

auto label is removed for flutter/engine/51103, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@ditman
Copy link
Member

ditman commented Mar 8, 2024

Please @mdebbar, can you PTAL? We need 2 approvals!

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 12, 2024
@auto-submit auto-submit bot merged commit 8b3fa09 into flutter:main Mar 12, 2024
@ditman
Copy link
Member

ditman commented Mar 12, 2024

Thansk @p-mazhnik!!

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 12, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 13, 2024
…145042)

flutter/engine@e25e977...ea848c3

2024-03-12 [email protected] Fix some races in the platform isolate tests (flutter/engine#51358)
2024-03-12 [email protected] Roll Skia from 187488b64570 to bbe453e3525d (1 revision) (flutter/engine#51366)
2024-03-12 [email protected] [web] make addView/removeView functions sync (flutter/engine#51103)
2024-03-12 [email protected] Roll Dart SDK from 7f26f32f374f to b19e0995f317 (1 revision) (flutter/engine#51363)
2024-03-12 [email protected] [dart:ui] Add view ID to `PointerData.toString` (flutter/engine#51352)
2024-03-12 [email protected] Fix null filter NOP case in DlLocalMatrixImageFilter (flutter/engine#51340)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@p-mazhnik p-mazhnik deleted the sync-add-view branch March 14, 2024 23:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants