IBM / mac-ibm-notifications

macOS agent used to display custom notifications and alerts to the end user.
Apache License 2.0
294 stars 51 forks source link

[BUG] Single Page Onboarding set to Continue #174

Closed jbmaruh closed 1 year ago

jbmaruh commented 1 year ago

Describe the bug When utilizing Onboarding with a singular page the primary button maintains the "Continue" state rather than the "Close" state.

To Reproduce Steps to reproduce the behavior:

Trigger an Onboarding UI with a single page using the example invocation, or any other: ~/Applications/IBM\ Notifier.app/Contents/MacOS/IBM\ Notifier -type onboarding -payload "{\"pages\":[{\"title\":\"First page's title\",\"subtitle\":\"First page's subtitle\",\"body\":\"First page's body\"}]}"

Screenshot 2023-08-01 at 8 09 25 AM

Expected behavior Expected to appear by default as if the primaryButtonLabel is set to close. ~/Applications/IBM\ Notifier.app/Contents/MacOS/IBM\ Notifier -type onboarding -payload "{\"pages\":[{\"title\":\"First page's title\",\"subtitle\":\"First page's subtitle\",\"body\":\"First page's body\",\"primaryButtonLabel\":\"Close\"}]}"

Screenshot 2023-08-01 at 8 09 30 AM

This bug does not occur when the pages are two or greater and correctly shows the Continue button until the last page is reached, which then reverts to Close.

Desktop (please complete the following information):

Workaround: Add "primaryButtonLabel":"Close" to the page creation for a singular page deployments.