Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RadioGroupItem Obsidian Theme Issue

    Hi Isomorphic,

    We seem to have some quirk with the Obsidian theme for the RadioGroupItem.

    SmartClient Version: v12.1p_2022-11-14/Pro Deployment (built 2022-11-14)

    The default value doesn't appear selected for Obsidian, whereas, for Stratus it does.


    Stratus

    Click image for larger version

Name:	stratus_radiogroup.png
Views:	202
Size:	5.3 KB
ID:	269071

    Obsidian

    Click image for larger version

Name:	obsidian_radiogroup.png
Views:	132
Size:	5.7 KB
ID:	269072

    Code:
    package com.sandbox.client;
    
    import java.util.HashMap;
    import java.util.LinkedHashMap;
    import java.util.Map;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.Cookies;
    import com.google.gwt.user.client.Window;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
    import com.smartgwt.client.widgets.form.fields.SelectItem;
    import com.smartgwt.client.widgets.layout.Layout;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class Sandbox27 implements EntryPoint {
    
        public void onModuleLoad() {
            Layout vLayout = new VLayout();
            DynamicForm form = new DynamicForm();
    
            SelectItem selectItem = new SelectItem("skin", "Choose Skin");
            selectItem.setWidth(130);
            LinkedHashMap<String, String> valueMap = new LinkedHashMap<>();
            valueMap.put("Enterprise", "Enterprise");
            valueMap.put("Stratus", "Stratus");
            valueMap.put("Tahoe", "Tahoe");
            valueMap.put("Obsidian", "Obsidian");
    
            selectItem.setValueMap(valueMap);
    
            String currentSkin = Cookies.getCookie("skin");
    
            if (currentSkin == null) {
                currentSkin = "Enterprise";
            }
            selectItem.setDefaultValue(currentSkin);
            selectItem.setStartRow(true);
            selectItem.addChangedHandler(event -> {
                Cookies.setCookie("skin", event.getValue().toString());
                Window.Location.reload();
            });
    
            form.setWidth(200);
            form.setHeight(200);
    
            Map<Integer, String> radioMap = new HashMap<>();
            radioMap.put(0, "Option 1");
            radioMap.put(1, "Option 2");
    
            RadioGroupItem fieldRestriction = new RadioGroupItem("Radio Options");
            fieldRestriction.setRedrawOnChange(Boolean.TRUE);
            fieldRestriction.setStartRow(Boolean.TRUE);
            fieldRestriction.setValueMap(radioMap);
            fieldRestriction.setDefaultValue(0);
            fieldRestriction.setVertical(false);
    
            form.setItems(selectItem, fieldRestriction);
    
            vLayout.addMember(form);
    
            RootPanel.get().add(vLayout);
            vLayout.setWidth100();
            vLayout.setHeight100();
            vLayout.show();
        }
    }

    #2
    Thanks for the report - we see the issue and we'll update shortly when it's been fixed.

    Comment


      #3
      We've applied a fix for this issue - please retest with a build dated November 18 or later.

      Comment


        #4
        Hi Isomorphic,

        We are using SmartClient Version: v12.1p_2022-11-20/Pro Deployment (built 2022-11-20) and the issue with the RadioGroupItem is resolved, however, there is now an issue with the CheckboxItem defaulting to checked even when the value is false. The CheckboxItem works as expected with SmartClient Version: v12.1p_2022-11-14/Pro Deployment (built 2022-11-14).

        You can see this issue with showcase example here. The checkbox should be unchecked at first.

        Thanks.

        Comment


          #5
          Apologies - we have some internal shenanigans going on for the Obsidian skin, where we use CheckBoxItems rather than native radios so we can customize the background color.

          The issue was fixed for yesterday's builds, dated November 22, and we added some new autotests that were missing here - please let us know if you see any further issues.
          Last edited by Isomorphic; 23 Nov 2022, 09:36.

          Comment


            #6
            Both issues are resolved with the November 23 build. Thanks!

            Comment


              #7
              Hi Isomorphic,

              We are experiencing issues again with radio buttons and the obsidian theme.

              On the FilterBuilder, when we use setTopOperatorAppearance(TopOperatorAppearance.RADIO), it does not show a selection when clicked. The class remains radioFalse.

              Click image for larger version  Name:	filterbuilderradio2023-03-23 140428.png Views:	0 Size:	3.8 KB ID:	269879

              We also hit the problem with the RadioGroupItem.

              It seems related to setting the title with wrap title true.

              Code:
                      Map<Integer, String> radioMap = new HashMap<>();
                      radioMap.put(0, "Option 1");
                      radioMap.put(1, "Option 2");
                      radioMap.put(2, "Option 3");
              
                      RadioGroupItem fieldRestriction = new RadioGroupItem("Radio Options");
                      fieldRestriction.setTitle("Hello World");
                      fieldRestriction.setWrapTitle(Boolean.TRUE);
                      fieldRestriction.setValueMap(radioMap);
                      fieldRestriction.setValue(1);
                      fieldRestriction.setVertical(true);
              
                      form.setItems(fieldRestriction);
              Click image for larger version  Name:	radiogroupitem12023-03-23 141320.png Views:	0 Size:	4.5 KB ID:	269880

              Interestingly, we can set the middle option, but not the first or third.

              Click image for larger version  Name:	radiogroupitem22023-03-23 141320.png Views:	0 Size:	5.1 KB ID:	269881

              SmartClient Version: v12.1p_2023-02-28/Pro Deployment (built 2023-02-28)

              Thanks
              Last edited by stonebranch2; 23 Mar 2023, 10:20.

              Comment


                #8
                Hi Isomorphic,

                Just checking in to see if you have enough information to identify the problem on your end here.

                Thank you

                Comment


                  #9
                  Thanks for the report and apologies for the delay. Yes, we do see this issue in Obsidian in 12.1 (not in 13.x), and it's been fixed, along with a flawed autotest that should have caught it, in today's builds, dated March 25 or later.

                  Comment


                    #10
                    Thank you, we will integrate and follow up.

                    Comment


                      #11
                      The issue in Obsidian looks to be resolved with the March 26 build.

                      We did notice that the radio items show as focused when selected in Tahoe and Stratus as shown below, however, this appears to be the case in previous builds as well.

                      Click image for larger version

Name:	radiogroupitem_focus.jpg
Views:	82
Size:	3.2 KB
ID:	269917






                      Comment

                      Working...
                      X