Skip to content

Comments

Web migration#39

Merged
gmpassos merged 71 commits intomasterfrom
web-migration
Feb 17, 2026
Merged

Web migration#39
gmpassos merged 71 commits intomasterfrom
web-migration

Conversation

@gmpassos
Copy link
Contributor

No description provided.

- CI: test with `dart2js` and `dart2wasm` (on Chrome).

- sdk: '>=3.6.0 <4.0.0'

- js_interop_utils: ^1.0.1
- web_utils: ^1.0.1
- web: ^1.1.0
- collection: ^1.19.0
- lints: ^5.1.1
- CI: test with `dart2js` and `dart2wasm` (on Chrome).

- sdk: '>=3.6.0 <4.0.0'

- js_interop_utils: ^1.0.5
- web_utils: ^1.0.5
- dom_tools: ^3.0.0-beta.3
- dom_builder: ^3.0.0-beta.1
- web: ^1.1.0
- collection: ^1.19.0
- test: ^1.25.15
- stream_channel: ^2.1.4

- lints: ^5.1.1
- build_web_compilers: ^4.1.1
- build_runner: ^2.4.15
@codecov
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

❌ Patch coverage is 41.60757% with 247 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.64%. Comparing base (864cdc7) to head (7e47af5).

Files with missing lines Patch % Lines
lib/src/bones_ui_component.dart 62.24% 74 Missing ⚠️
lib/src/bones_ui_generator.dart 3.22% 30 Missing ⚠️
lib/src/component/multi_selection.dart 0.00% 25 Missing ⚠️
lib/src/bones_ui_base.dart 23.80% 16 Missing ⚠️
lib/src/component/button.dart 11.76% 15 Missing ⚠️
lib/src/component/dialog.dart 0.00% 13 Missing ⚠️
lib/src/bones_ui_layout.dart 14.28% 12 Missing ⚠️
lib/src/bones_ui_root.dart 68.96% 9 Missing ⚠️
lib/src/component/json_render.dart 0.00% 9 Missing ⚠️
lib/src/component/loading.dart 0.00% 9 Missing ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
+ Coverage   36.56%   37.64%   +1.08%     
==========================================
  Files          22       23       +1     
  Lines        3408     3395      -13     
==========================================
+ Hits         1246     1278      +32     
+ Misses       2162     2117      -45     
Flag Coverage Δ
unittests 37.64% <41.60%> (+1.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- web_utils: ^1.0.6
- dom_tools: ^3.0.0-beta.4
- dom_builder: ^3.0.0-beta.2
- web_utils: ^1.0.7
- mercury_client: ^2.2.5
- web_utils: ^1.0.7
- mercury_client: ^2.2.5
- js_interop_utils: ^1.0.6
- web_utils: ^1.0.9
- intl_messages: ^3.0.0-beta.1
- dom_tools: ^3.0.0-beta.5
- swiss_knife: ^3.3.0
- statistics: ^1.2.0
- resource_portable: ^3.1.2
- intl: ^0.20.2
- Avoids using `identical` with `Element` (`JSObject`) to avoid inconsistencies in Wasm.

- dom_tools: ^3.0.0-beta.7
- dom_builder: ^3.0.0-beta.3
- web: ^1.1.1
- mercury_client: ^2.3.0
# Conflicts:
#	CHANGELOG.md
#	lib/src/bones_ui.dart
#	lib/src/bones_ui_component.dart
#	lib/src/component/loading.dart
#	pubspec.yaml
✨♻️ refactor(bones_ui_test_tools):
  - Standardize `selectNonTyped` and rename it to `select`.
  - Standardize `selectNonTypedAll` and rename it to `selectAll`.
  - Ensure that `selectTyped` exists where `querySelectorTyped` exists.

- web_utils: ^1.0.11
- web_utils: ^1.0.12
- dom_tools: ^3.0.0-beta.8
- project_template: ^1.1.1
- archive: ^4.0.4

- dependency_validator: ^5.0.2
# Conflicts:
#	CHANGELOG.md
#	lib/src/bones_ui.dart
#	lib/src/bones_ui_component.dart
#	pubspec.yaml
- Merge v2.5.15
  - `UIComponent`:
    - Added `renderedElementsAsync`.
  - `UIDialogBase`:
    - Added `configureButtons` to configure the buttons `onClick`.
    - `posRender` and `posAsyncRender` calls `configureButtons`.

- js_interop_utils: ^1.0.7
- web_utils: ^1.0.14
- dom_tools: ^3.0.0-beta.9
- dom_builder: ^3.0.0-beta.4
- archive: ^4.0.5
  - replace `createHTML` with `createElement` for SVG element creation.
  - replace `append` with `appendChild` for DOM consistency.
- `UISVG`:
  - replace `createHTML` with `createElement` for SVG element creation.

- `UIComponent`:
  - replace `append` with `appendChild` for DOM consistency.

- js_interop_utils: ^1.0.8
- web_utils: ^1.0.15
- dom_tools: ^3.0.0-beta.10
- archive: ^4.0.7
- test: ^1.26.2
- test_api: ^0.7.6
- test_core: ^0.6.11

- build_web_compilers: ^4.1.5
# Conflicts:
#	CHANGELOG.md
#	lib/src/bones_ui.dart
#	pubspec.yaml
- New `KeyboardEventExtension`:
  - getter `keyCodeSafe`.

- `UIDOMGenerator`:
  - `addExternalElementToElement`: improve external element resolution.
  - `attachFutureElement`: improve element resolution.

- js_interop_utils: ^1.0.9
- web_utils: ^1.0.16
- dom_tools: ^3.0.0-beta.12
- expressions: ^0.2.5+3
- collection: ^1.19.1
- test: ^1.27.0
- test_api: ^0.7.8
- test_core: ^0.6.13

- build_web_compilers: ^4.4.2
- build_runner: ^2.10.4
- dependency_validator: ^5.0.3
- New `KeyboardEventExtension`:
  - getter `keyCodeSafe`.

- `UIDOMGenerator`:
  - `addExternalElementToElement`: improve external element resolution.
  - `attachFutureElement`: improve element resolution.

- js_interop_utils: ^1.0.9
- web_utils: ^1.0.16
- dom_tools: ^3.0.0-beta.12
- dom_builder: ^3.0.0-beta.5
- expressions: ^0.2.5+3
- collection: ^1.19.1
- test: ^1.28.0
- test_api: ^0.7.8
- test_core: ^0.6.14

- build_web_compilers: ^4.4.3
- build_runner: ^2.10.4
- dependency_validator: ^5.0.3
…ion.dart function and key event handling logic.
- `UIComponent`:
  - `getFieldElementTyped`: use `asElementOfNullable`.

- web_utils: ^1.0.18
- `UIDOMGenerator`:
  - `toElements`:
    - Fix resolution of `UIComponent`, calling `UIComponent.ensureRendered` before return `UIComponent.content`.

- dom_builder: ^3.0.0-beta.6
- dom_tools: ^3.0.0-beta.13
- dom_tools: ^3.0.0-beta.13
- dom_builder: ^3.0.0-beta.7
- web_utils: ^1.0.19
  - Updated event listener attachment to use `addEventListenerTyped`.
  - Fixed null safety and type checks for button elements.
  - Fixed background color style to use `rgb` when alpha is 1.0.
  - Added `ElementStreamExtension` and `StreamSubscriptionExtension` to track subscriptions in `DOMTreeMap`.
  - Added `unregisterEventListener` and `clearEventListeners` methods.

- `EventHandlerPrivate`:
  - Changed `_eventListeners` to nullable and lazily initialized.
  - Added `_unregisterEventListener` and `_clearEventListeners` implementations.
  - Added delayed `_configure` call after construction.
  - Updated `_updateCanvasDimension` to return bool indicating if dimension changed.
  - Improved zoom and translate setters to avoid unnecessary renders.
  - Updated calls to `buildDOM` to include `treeMap` and `setTreeMapRoot` parameters.
  - Updated `addExternalElementToElement` and `toElements` to accept `treeMap` and `context` parameters.
  - Updated calls to `buildDOM` to pass `treeMap` and `setTreeMapRoot`.
  - Added new `CaptureDataFormat.urlOrBlobUrl` format.
  - Added `selectedFileDataAsURLOrDataURLBase64` getter.
  - Updated `_readFile` and `_filterCapturedData` to support new format and improved async flow with `_yeld` helper.
  - Updated `_CapturedData` class to store optional MIME type and support new format.
  - Improved data format conversions to preserve MIME type.
  - Added helper `_yeld` function for async yielding.
  - Updated `asDIVElement` buildDOM calls to pass `treeMap` and `setTreeMapRoot`.
  - Updated DOM generation calls to pass `treeMap` and `setTreeMapRoot`.
  - Updated DOM generation calls to pass `treeMap`, `context`, and `setTreeMapRoot`.
  - Updated template building to use `dsxResolution` enum instead of boolean flags.
  - Added optional `parent` parameter to rendering methods.
  - Updated DOM building calls to pass `treeMap` and `setTreeMapRoot`.
  - Updated `_resolveValueText` to use `parent` for intl message resolution.

- `UIInputTable`:
  - Updated rendering of inputs and labels to pass `domTreeMap` and `setTreeMapRoot`.
  - Replaced `Expando` with `DualWeakMap` for static field `_asyncRenderingZoneComponent`.
  - Added `_domTreeMap` field and `domTreeMap` getter for lazy DOM tree mapping.
  - Added `domTreeMapIfInitialized` getter and static `domTreeMapDummy`.
  - Replaced `Expando` with `DualWeakMap` for `_contentsUIComponents`.
  - Updated parent setting methods to use named parameter `addToParent`.
  - Added `_resolveParentFromParentUIComponent` to better resolve `_parent`.
  - Updated many list conversions from `.toList()` to `.asListViewFixed` for performance.
  - Added `_onRender` and `_onChange` lazy event streams.
  - Added `_renderedUIRoots` and `_renderedUIComponents` sets to track rendering.
  - Improved `_markRenderTime` and rendering finish notification logic.
  - Added `dispose` and `_recycle` methods for lifecycle management.
  - Added static `purgeGlobals` to clear global UI state.
  - Updated rendering and async content handling to use nullable collections.
  - Updated event listener attachment to use `addEventListenerTyped`.
  - Replaced `Expando` with `DualWeakMap` for static field `_asyncRenderingZoneComponent`.
  - Added `_domTreeMap` field and `domTreeMap` getter for lazy DOM tree mapping.
  - Added `domTreeMapIfInitialized` getter and static `domTreeMapDummy`.
  - Replaced `Expando` with `DualWeakMap` for `_contentsUIComponents`.
  - Updated parent setting methods to use named parameter `addToParent`.
  - Added `_resolveParentFromParentUIComponent` to better resolve `_parent`.
  - Updated many list conversions from `.toList()` to `.asListViewFixed` for performance.
  - Added `_onRender` and `_onChange` lazy event streams.
  - Added `_renderedUIRoots` and `_renderedUIComponents` sets to track rendering.
  - Improved `_markRenderTime` and rendering finish notification logic.
  - Added `dispose` and `_recycle` methods for lifecycle management.
  - Added static `purgeGlobals` to clear global UI state.
  - Updated rendering and async content handling to use nullable collections.
  - Updated event listener attachment to use `addEventListenerTyped`.
  - Changed `_uiComponentsTree` to nullable and lazily initialized.
  - Added `_onPurgedUIComponents` callback to dispose purged components.
  - Updated methods to safely handle nullable `_uiComponentsTree`.
  - Added `purgeRoot` method to purge tree and global UI state.

- Added `_UIDOMTreeReferenceMap` subclass to prevent premature purging of components not fully initialized or disposed.
- `UIEventHandler`:
  - Added `unregisterEventListener` and `clearEventListeners` methods.

- `EventHandlerPrivate`:
  - Changed `_eventListeners` to nullable and lazily initialized.
  - Added `_unregisterEventListener` and `_clearEventListeners` implementations.

- `ElementProvider` and `CSSProvider`:
  - Updated calls to `buildDOM` to include `treeMap` and `setTreeMapRoot` parameters.

- `UIComponent`:
  - Replaced `Expando` with `DualWeakMap` for static field `_asyncRenderingZoneComponent`.
  - Added `_domTreeMap` field and `domTreeMap` getter for lazy DOM tree mapping.
  - Added `domTreeMapIfInitialized` getter and static `domTreeMapDummy`.
  - Replaced `Expando` with `DualWeakMap` for `_contentsUIComponents`.
  - Updated parent setting methods to use named parameter `addToParent`.
  - Added `_resolveParentFromParentUIComponent` to better resolve `_parent`.
  - Updated many list conversions from `.toList()` to `.asListViewFixed` for performance.
  - Added `_onRender` and `_onChange` lazy event streams.
  - Added `_renderedUIRoots` and `_renderedUIComponents` sets to track rendering.
  - Improved `_markRenderTime` and rendering finish notification logic.
  - Added `dispose` and `_recycle` methods for lifecycle management.
  - Added static `purgeGlobals` to clear global UI state.
  - Updated rendering and async content handling to use nullable collections.
  - Updated event listener attachment to use `addEventListenerTyped`.

- `bones_ui_extension.dart`:
  - Added `ElementStreamExtension` and `StreamSubscriptionExtension` to track subscriptions in `DOMTreeMap`.

- `UIDOMGenerator`:
  - Updated `addExternalElementToElement` and `toElements` to accept `treeMap` and `context` parameters.
  - Updated calls to `buildDOM` to pass `treeMap` and `setTreeMapRoot`.

- `UIRootComponent`:
  - Changed `_uiComponentsTree` to nullable and lazily initialized.
  - Added `_onPurgedUIComponents` callback to dispose purged components.
  - Updated methods to safely handle nullable `_uiComponentsTree`.
  - Added `purgeRoot` method to purge tree and global UI state.

- Added `_UIDOMTreeReferenceMap` subclass to prevent premature purging of components not fully initialized or disposed.

- `UIButtonBase` and `UIButtonLoader`:
  - Updated event listener attachment to use `addEventListenerTyped`.
  - Fixed null safety and type checks for button elements.

- `UICapture`:
  - Added new `CaptureDataFormat.urlOrBlobUrl` format.
  - Added `selectedFileDataAsURLOrDataURLBase64` getter.
  - Updated `_readFile` and `_filterCapturedData` to support new format and improved async flow with `_yeld` helper.
  - Updated `_CapturedData` class to store optional MIME type and support new format.
  - Improved data format conversions to preserve MIME type.
  - Added helper `_yeld` function for async yielding.

- `UIDialogBase`:
  - Fixed background color style to use `rgb` when alpha is 1.0.

- `_CanvasEditImage`:
  - Added delayed `_configure` call after construction.
  - Updated `_updateCanvasDimension` to return bool indicating if dimension changed.
  - Improved zoom and translate setters to avoid unnecessary renders.

- `InputConfig`:
  - Added optional `parent` parameter to rendering methods.
  - Updated DOM building calls to pass `treeMap` and `setTreeMapRoot`.
  - Updated `_resolveValueText` to use `parent` for intl message resolution.

- `UIInputTable`:
  - Updated rendering of inputs and labels to pass `domTreeMap` and `setTreeMapRoot`.

- `UILoading`:
  - Updated `asDIVElement` buildDOM calls to pass `treeMap` and `setTreeMapRoot`.

- `MasonryItem` and `_MasonryRenderItem`:
  - Updated DOM generation calls to pass `treeMap` and `setTreeMapRoot`.

- `UITemplateElementGenerator`:
  - Updated DOM generation calls to pass `treeMap`, `context`, and `setTreeMapRoot`.
  - Updated template building to use `dsxResolution` enum instead of boolean flags.

- `pubspec.yaml`:
  - Updated dependencies:
    - `web_utils`: ^1.0.21
    - `dom_tools`: ^3.0.0-beta.19
    - `dom_builder`: ^3.0.0-beta.11
    - `swiss_knife`: ^3.3.5
    - `statistics`: ^1.2.1
    - `test`: ^1.29.0
    - `test_api`: ^0.7.9
    - `test_core`: ^0.6.15
    - `build_web_compilers`: ^4.4.11
    - `build_runner`: ^2.11.1
    - `dependency_validator`: ^5.0.4
- Release v3.0.0

- Dependencies:
  - Updated `dom_tools` from `^3.0.0-beta.19` to `^3.0.0`.
  - Updated `dom_builder` from `^3.0.0-beta.11` to `^3.0.0`.
@gmpassos gmpassos merged commit d6827ff into master Feb 17, 2026
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.

1 participant