Skip to content

Do not send popups with unresolvable anchors to Scout JS#2032

Open
fschinkel wants to merge 1 commit intoreleases/24.2from
features/fschinkel/24.2/improve-JsonPopupManager
Open

Do not send popups with unresolvable anchors to Scout JS#2032
fschinkel wants to merge 1 commit intoreleases/24.2from
features/fschinkel/24.2/improve-JsonPopupManager

Conversation

@fschinkel
Copy link
Member

@fschinkel fschinkel commented Feb 19, 2026

The PopupManager contains a set of popups, which themselves may contain anchors. When a JsonPopup builds its json it may happen that there is no json adapter for the anchor of the popup, because the anchor is e.g. part of an outline that is currently not the active outline. The JsonPopup can not leave its anchor property empty as a popup without anchor will be rendered directly which would be incorrect. In addition, the JsonPopup can not return null when creating its json as this leads to other errors.
Therefore, the JsonPopupManager needs to filter its set of popups and ensure that no popup containing an anchor without a json adapter is sent to Scout JS. To ensure correct updates of its property "popups" the JsonPopupManager needs to observe all current anchors of its popups and perform an update of its property "popups" if json adapters are created or disposed for one of these observed anchors.
Additionally, close a Popup if its anchor is disposed to prevent memory leaks.

448950

@fschinkel fschinkel requested a review from cguglielmo February 19, 2026 08:59
@fschinkel fschinkel self-assigned this Feb 19, 2026
The PopupManager contains a set of popups, which themselves may contain
anchors. When a JsonPopup builds its json it may happen that there is no
json adapter for the anchor of the popup, because the anchor is e.g.
part of an outline that is currently not the active outline. The
JsonPopup can not leave its anchor property empty as a popup without
anchor will be rendered directly which would be incorrect. In addition,
the JsonPopup can not return null when creating its json as this leads
to other errors.
Therefore, the JsonPopupManager needs to filter its set of popups and
ensure that no popup containing an anchor without a json adapter is sent
to Scout JS. To ensure correct updates of its property "popups" the
JsonPopupManager needs to observe all current anchors of its popups and
perform an update of its property "popups" if json adapters are created
or disposed for one of these observed anchors.
Additionally, close a Popup if its anchor is disposed to prevent memory
leaks.

448950
@fschinkel fschinkel force-pushed the features/fschinkel/24.2/improve-JsonPopupManager branch from ee9b562 to da4a4f6 Compare February 19, 2026 09:01
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