Repository navigation
v3.0.19
3.0.19
-
UIComponent:onChildRendered: fixed the notification passing the parent component instead of the
rendered child (_callOnChildRenderedcalledonChildRendered(this))._parseOnEventKeyPress: anonEventKeyPressattribute without akey:actiondelimiter
threw aRangeErrorthat aborted the whole render (toContentElementsreturned an empty
list). The value is now handled as an action triggered by any key.focusField: was looking for the text input in the component itself instead of in the
resolved field component.getFieldsComponentsMap: for a repeated field name it now keeps theUIFieldcomponent
instead of letting a plain element overwrite it.getFieldsExtendedhad a sort with the
same intent, but it comparedMapEntry is UIComponent(alwaysfalse) over an
already deduplicated map.appendStyle: ensures the previous declarations are terminated before appending.
-
UIAsyncContent:_ensureElementForDOM: an HTML content with multiple root nodes returned the raw
Stringinstead of the built element (missingreturnin the branch).
-
UILayout:_getElementIndexByID: an element without anidbuilt the invalid CSS selector#,
throwing aSyntaxError. This broke any evaluateduiLayoutcommand
(e.g.x(10px)) on elements without anid._parseValuePx: crashed with aFormatExceptionon fractional values (e.g.4.5px);
now parsed as anumand ignored when not a plainpxvalue (e.g.calc(...))._valueXY: returned the invalid CSS value'0 px'(with a space) when the parent had
no dimensions.- The window
resizelistener is now registered once perWindow(it was registered by
everyUILayoutinstance, since_registeredWindowwas notstatic). _configure: removed a no-opsplit()over a regex passed as a literalString._getElementIndex/_getElementIndexByID: null-safe for detached elements.
-
UINavigator:navigateOnClick: anull/empty route threw a null-check error; it now clears a
previously registered route and returnsnull._navigateTo: the "navigable not found" retry dropped thefromURLflag, pushing a
duplicated entry in the browser history for URL-driven navigations.
-
UIElementExtension.resolveUIComponent: no longer throws when there is noUIRoot. -
$uiButtonLoader:button-stylewas only emitted whenbuttonClasseswas provided (and was emitted empty
when onlybuttonClasseswas given).loaded-text-classeswas built frombuttonClassesinstead ofloadedTextClass.UIButtonLoader.generatornow also accepts theloaded-text-classesattribute
(the one generated by$uiButtonLoader).
-
UIEventHandler.trackAllRegisteredEventListeners: fixed an empty-check usingisElement. -
getUILoadingType: thedualRingcase was unreachable, since the value is lower-cased
before theswitch.UILoadingType.dualRingcould never be parsed from aStringand
silently fell back toUILoadingType.ring. Also acceptsdual-ringanddual_ring. -
UILoadingConfig:toInlinePropertiesemittedtextZoom, butfromMaponly readtext-zoom, and
withProgresswas not emitted at all. Both were silently lost on a
toInlineProperties→parseround-trip (used by theui-button-loadertag).
-
UIDialog.getAllDialogs/removeAllDialogs: resolved the dialogs by mapping the
.ui-dialogelements back to their components through anExpando. AnExpandois
keyed by identity, and ondart2wasman element re-read from the DOM is a new Dart
wrapper, so the lookup always missed and both methods were no-ops. They now resolve
the instances throughUIRootComponent.getInstances. -
Lints (
dart analyze --fatal-infos --fatal-warnings):BUIViewProvider.fromManifestContent: thereturnof theasync
fromManifestTreewas inside atryblock, so its errors were never caught by the
catch(unawaited_return_in_try_block). Moved out of thetry, which keeps the
behavior and makes the guarded scope explicit.- Converted the forwarded constructor parameters to super parameters in
UIDocument,
BUIRender,UIButtonCapture,UIDialogInput,UIDialogAlertandUIDialogLoading
(use_super_parameters).
-
Tests:
- Added
test/bones_ui_component_test.dart,test/bones_ui_async_content_test.dart,
test/bones_ui_layout_test.dart,test/bones_ui_navigator_test.dartand
test/bones_ui_button_test.dart. - Coverage: added
test/bones_ui_extension_test.dart,
test/bones_ui_component_async_test.dart,test/bones_ui_fields_test.dart,
test/bones_ui_navigable_test.dart,test/bones_ui_utils_test.dartand
test/bones_ui_dialog_test.dart. - Line coverage: 47.8% → 60.8%.
- Added