Button Secondary Text placement

I have encountered a problem with the placement of the secondary text in Buttons. The “Placement” toggle puts the secondary text before or after the primary text with the “Spacing” given. The spacing is achieved by adding a margin to the secondary text (top margin for “After”, bottom margin for “Before”)
image
When switching to break-out mode, “Before” is shown as “true”, "After is shown as “false”. However, it doesn’t quite work that way when manually entering the values in the break-out mode text boxes. The following screenshot shows how the button looks with various entries in the “Placement” text box [the 1st button in the screenshot corresponds to the screenshot above]:

  • Placement “Above” is achieved by entering ‘true’ into the textbox
  • Placement “Below” is achieved by entering 0, or by leaving it empty.
  • ‘false’ seems to be interpreted as invalid input, like any other input that I have tried other than ‘0’, ‘true’, or empty.

Invalid input leads to placement “Before”, but the margin is added as a top margin instead of bottom margin.

Now, the real problem: I want to make the Placement available as a parameter in a button component. The “After” Placement works by picking “” or “0” as a value for the parameter (‘false’ is invalid, just like when manually entering ‘false’). The “Before” placement does not work. ‘true’ behaves the same as an invalid input:
image

Unrelated to the placement problem: I noticed that the text “0” (just the single digit, no quotation marks) does not show up as button primary or secondary label. That’s why in the second-to-last button above, I have written ‘0’ in quotation marks.

Hello @striata,

Thanks for writing in!

You can use the Conditional Parameters. This is what you will need;

"options" : [
      { "value" : "true", "label" : "Before" },
      { "value" : "false", "label" : "After" },
    ]

Is the above option not working for you?

Cheers.

I went to great lengths to describe a bug in the way this works (or doesn’t work). Have you even read my question?

Hey @striata,

Please use this instead:

{
  "subLabelPosition" : {
    "type"      : "choose",
    "label"     : "Placement Secondary Label",
    "initial" : "1",
    "options" : [
      { "value" : "1", "label" : "Before" },
      { "value" : "0", "label" : "After" }
    ]
  }
}

Thanks.

HI @ruenel, This doe not work. The following entries and values are valid (VAL) or invalid (INV) when entered directly into the break-out-mode text field, or when used as options value in the parameter (direct/param):

Placement “Before”:

  • true (VAL/INV)
  • 1 (INV/INV)

Placement “After”:

  • false (INV/INV)
  • 0 (VAL/VAL)
  • empty (VAL/VAL)

Note that any invalid value results in a placement “before” (incl. “1” and “true” when used as parameter value), but the margin on the secondary label is at the top (appropriate for “After” placement"), and not at the bottom.

Any update on this?

Hey @striata,

I have replicated the issue. I believe this is a bug. I will have this reported to our developers.

Please bear with us.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.