Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix closeButton formatting for AlertManeuver #565

Merged

Conversation

jacobkeeler
Copy link
Contributor

@jacobkeeler jacobkeeler commented May 10, 2021

Fixes #536

This PR is ready for review.

Testing Plan

Send AlertManeuver without softbuttons, popup should appear with a centered "Close" button

Summary

Center close button when present in AlertManeuver popup

CLA

also center close button, if present
@@ -152,7 +149,8 @@ SDL.AlertManeuverPopUp = Em.ContainerView.create(
*/
addSoftButtons: function(params) {
const softButtons = params.softButtons;
if (!softButtons) {
if (!softButtons || softButtons.length == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the close button needs to be added if there are softbuttons included?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following the existing behavior in this case, which was to only show the close button if app-defined buttons were not present. I think the current behavior at least matches the description in the API, though I do think it could be interpreted either way:

        <param name="softButtons" type="SoftButton" minsize="0" maxsize="3" array="true" mandatory="false">
            <description>If omitted on supported displays, only the system defined "Close" SoftButton shall be displayed.</description>
        </param>

@jacobkeeler jacobkeeler merged commit 1aec880 into develop May 17, 2021
@jacobkeeler jacobkeeler deleted the fix/alert_maneuver_without_softbuttons_formatting branch May 17, 2021 20:41
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.

2 participants