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

Soft button content is misaligned in an alert #323

Closed
NicoleYarroch opened this issue Nov 18, 2020 · 3 comments
Closed

Soft button content is misaligned in an alert #323

NicoleYarroch opened this issue Nov 18, 2020 · 3 comments
Labels

Comments

@NicoleYarroch
Copy link
Contributor

Bug Report

If a soft button in an alert has both images and text, the text extends outside the bounds of the button. This was seen on Firefox web browser (Mozilla Firefox 83.0)

Reproduction Steps

  1. Create an alert with two soft buttons. One button is text-only ("Ok") and the second button has text and an image ("Gotcha" with the speech bubble icon).
  2. Send the alert request.

Expected Result

The soft button text and image is center aligned inside the button.

Actual Result

The soft button text and image are misaligned. Text extends outside the bounds of the soft button.

Screen Shot 2020-11-18 at 2 05 46 PM

@iCollin
Copy link
Collaborator

iCollin commented Dec 10, 2020

Hello @NicoleYarroch, could you please share with me the exact RPC you were sending when you saw this issue? I haven't been able to reproduce with a similar setup.

Also is this your exact output?

$ firefox --version
Mozilla Firefox 83.0

Thank you!

btw, this is what I was sending:

{
    "rpc":"Alert",
    "parameters":{
        "alertText1":"goodjob!",
        "softButtons":[
            {
                "type":"TEXT",
                "softButtonID":1,
                "text":"sb1"
            },
            {
                "type":"BOTH",
                "softButtonID":2,
                "text":"gotcha!",
                "image":{
                    "value":"0xCD",
                    "imageType":"STATIC"
                }
            }
        ]
    }
}

@NicoleYarroch
Copy link
Contributor Author

I was still able to reproduce this on the develop branch of generic_hmi.
Firefox version: Mozilla Firefox 83.0
Generic_hmi commit: 2fad670 (HEAD -> develop, origin/develop)
SDL_core commit: 5c72cddc353aadef06e89064c53c1ec6b2467d25 (HEAD -> release/7.0.0, tag: 7.0.0-RC1)

Button Bug

This is what I sent for the image above:

2020-12-14 08:55:39.356759-0500 SDL_Smoke_Tests[22767:679897] [Protocol] Sending RPC: Alert (request), id: 24
{
    alertIcon = "{\n    imageType = DYNAMIC;\n    isTemplate = 0;\n    value = a815096a889d6987;\n}";
    alertText1 = "second alert";
    alertText2 = 2;
    alertText3 = 3;
    cancelID = 8;
    duration = 5000;
    playTone = 0;
    progressIndicator = 0;
    softButtons =     (
        "{\n    image = \"{\\n    imageType = DYNAMIC;\\n    isTemplate = 1;\\n    value = e9793f97e11cf753;\\n}\";\n    isHighlighted = 0;\n    softButtonID = 1;\n    systemAction = \"DEFAULT_ACTION\";\n    text = \"Button 1\";\n    type = BOTH;\n}",
        "{\n    image = \"{\\n    imageType = DYNAMIC;\\n    isTemplate = 1;\\n    value = e9793f97e11cf753;\\n}\";\n    isHighlighted = 0;\n    softButtonID = 101;\n    systemAction = \"DEFAULT_ACTION\";\n    text = \"Button 2\";\n    type = BOTH;\n}"
    );
}

@jacobkeeler
Copy link
Contributor

Closing with the merge of #338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants