[MGNLUI-2066] Messaging method names and Javadoc unclear Created: 11/Sep/13  Updated: 09/Mar/21  Resolved: 09/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: app framework
Affects Version/s: 5.1
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Antti Hietala Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

1) Shell and AbstractUIContext have two methods with almost the same name:

  • info.magnolia.ui.api.shell
    • showNotification(String message)
  • info.magnolia.ui.framework.context.AbstractUIContext
    • openNotification

It is unclear what the difference between "opening" and "showing" a notification is. Please rename the methods so that they match the actual message type they display.

2) Javadoc for the openNotification methods is confusing. The description mixes up notifications and banners.

info.magnolia.ui.framework.context.AbstractUIContext

  • openNotification(MessageStyleType type, boolean doesTimeout, String title)
    • Notification indicator is a message banner that only shows a message to user.
  • openNotification(MessageStyleType type, boolean doesTimeout, String title, String linkText, NotificationCallback cb)
    • Notification indicator is a message banner that only shows a message to user.
  • openNotification(MessageStyleType type, boolean doesTimeout, View viewToShow)
    • Notification indicator is a message banner that only shows a message to user.

A notification is not a banner. Notification is transient box, like a Post-IT note, that shows the message and then goes away in 3s automatically. See Showing notifications as notes.

A banner is a persistent, viewport-wide banner that must be clicked to close. The message is stored and viewable in the Pulse. See Showing system and app messages using banners.

Please correct the Javadoc.


Generated at Mon Feb 12 08:52:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.