[MGNLUI-5043] Improve deprecation of UiContext and OverlayLayer Created: 25/Feb/19  Updated: 27/Mar/19  Resolved: 03/Mar/19

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.0
Fix Version/s: 6.1

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Mikaël Geljić
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 1h
Time Spent: 2.15h
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-4820 Rename messages app to notifications app Closed
causality
is causing MGNLPN-439 Create version compatible with Magnol... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

info.magnolia.ui.api.context.UiContext was deprecated in M6.0.

The actual implementations are not deprecated.

Methods
#openConfirmation
#openNotification (renamed to pop ups, see https://documentation.magnolia-cms.com/display/DOCS61/Showing+pop-ups, originally https://documentation.magnolia-cms.com/display/DOCS61/Showing+notifications)
#openAlert
have no description of the replacement in their javadoc.

Acceptance criteria

  1. UiContext interfaces and classes are consistently (not)deprecated
  2. Optionally the methods fits the naming in documentation.


 Comments   
Comment by Mikaël Geljić [ 27/Feb/19 ]

Okay, I thought deprecating UiContext and OverlayLayer on class level was enough, but true, when using one such method inherited, say by SubAppContext, there's no sign whatsoever that we're using a deprecated API. Should finish the job there.

As for replacements, isn't this clear enough?

Deprecated
since 6.0, use either AlertBuilder to open alerts and confirm-dialogs, or default Vaadin Notifications and Windows.

Comment by Roman Kovařík [ 27/Feb/19 ]

when using one such method inherited, say by SubAppContext, there's no sign whatsoever that we're using a deprecated API

SubAppContext is still used in new framework. Wasn't the intention just deprecate the OverlayLayer?

As for replacements, isn't this clear enough?

Was expecting a hint in the affected methods rather than just in the class javadoc as this might be often called from a custom code.

Comment by Mikaël Geljić [ 27/Feb/19 ]

Re: SubAppContext, that one will not be deprecated. Only when you invoke one of its method which is declared in OverlayLayer or UiContext, that method should be struck through. That's not the case at the moment. Indeed then re: deprecation messages, we can be more specific on method level.

I prepare that right away on a PR then.

Comment by Roman Kovařík [ 27/Mar/19 ]

For the record (removed deprecated methods):

[ERROR] 7002: info.magnolia.ui.api.overlay.OverlayLayer: Method 'public void openAlert(info.magnolia.ui.api.overlay.MessageStyleType, info.magnolia.ui.api.view.View, java.lang.String, info.magnolia.ui.api.overlay.AlertCallback)' has been removed
[ERROR] 7002: info.magnolia.ui.api.overlay.OverlayLayer: Method 'public void openConfirmation(info.magnolia.ui.api.overlay.MessageStyleType, info.magnolia.ui.api.view.View, java.lang.String, java.lang.String, boolean, info.magnolia.ui.api.overlay.ConfirmationCallback)' has been removed

MGNLPN-439

Generated at Mon Feb 12 09:22:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.