Announcement

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

    AdaptiveMenu/Menu issues with orientation changes

    SmartClient Version: v13.1p_2025-09-02/AllModules Development Only (built 2025-09-02)

    Safari on iOS 18.5 iPhone 14 (both physical device and XCode emulator), iPad Air 11" (XCode emulator)

    Hello, I've found some issues which may be related to this thread:
    https://forums.smartclient.com/forum...vemenu-problem

    Below there's a slightly modified test case. Please run it from the browser console, after opening the showcase with this Density:
    https://www-demos.smartclient.com/sm...rease=15&dhc=1

    1. On iPad Air 11" in portrait orientation, after clicking the menuButton, you'll see that the menu covers the ToolStrip: I don't think it's correct (actually happens also on desktop browsers)
    Click image for larger version

Name:	2025-09-02 17.15.47.jpg
Views:	26
Size:	29.6 KB
ID:	276349
    2. If, with the menu still opened, you switch to landscape orientation, you'll see menu items in the menu which before were buttons:
    Click image for larger version

Name:	2025-09-02 17.20.39.jpg
Views:	19
Size:	36.1 KB
ID:	276350 3. if you switch back to portrait, the ToolStrip is now visible, but the menuButton is the only button in it (BTW if you try to close and reopen the menu, the ToolStrip become covered by the menu, again):
    Click image for larger version

Name:	2025-09-02 17.22.53.jpg
Views:	17
Size:	39.1 KB
ID:	276351

    Moreover, using the iPhone 14, when I open the menu in portrait, everything it's right:
    Click image for larger version

Name:	2025-09-02 17.26.04.jpg
Views:	20
Size:	42.8 KB
ID:	276352

    4. if I switch to landscape with the menu still open, the menu doesn't adapt its width, nor the ToolStrip changes to add buttons:
    Click image for larger version

Name:	2025-09-02 17.29.45.jpg
Views:	19
Size:	33.6 KB
ID:	2763535. then if I switch back to portrait only the menuButton remains in the ToolStrip:
    Click image for larger version

Name:	2025-09-02 17.32.23.jpg
Views:	20
Size:	44.5 KB
ID:	276354

    Code:
    isc.Auth.setRoles(["ROLE_FOO", "ROLE_FOO_S"]);
    isc.Auth.setAvailableRoles(["ROLE_FOO", "ROLE_FOO_S", "ROLE_BAR"]);
    
    isc.DynamicForm.create({
        ID: "embeddedForm",
        snapTo: "L",
        snapOffsetLeft: 20,
        defaultLayoutAlign: "center",
        height: 1,
        width: "100%",
        minWidth: 300,
        titleWidth: 1,
        numCols: 4,
        linearMode: true,
        linearNumCols: 3,
        fields: [
            {
                name: "foo",
                showTitle: false,
                valueMap: ['one', 'two', 'three', 'four', 'five']
            },
            {
                name: "bar",
                showTitle: false,
                valueMap: ['one', 'two', 'three', 'four', 'five']
            },
            {
                name: "spacer",
                type: "spacer",
                height: 20
            }
        ]
    });
    
    isc.AdaptiveMenu.create({
        ID: "adaptiveMenu",
        menuButtonTitle: "Altro...",
        menuProperties: {
            width: "100%"
        },
        defaultLayoutAlign: "center",
        items: [
            {
                title: "Le Mie Attivitą",
                icon: "Edit",
                visibleWhen: {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO"}
            },
            {
                title: "Export Planning",
                icon: "Edit",
                visibleWhen: {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO_S"}
            },
            {
                title: "Export Massivo Report",
                icon: "Edit",
                visibleWhen: {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO_S"}
            },
            {
                title: "Report Tecnici",
                icon: "Edit"
            },
            {
                title: "Report Societą",
                icon: "Edit"
            },
            {
                title: "Report Attivitą",
                icon: "Edit",
                visibleWhen: {
                    _constructor: "AdvancedCriteria",
                    operator: "or",
                    criteria: [
                        {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO"},
                        {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO_S"}
                    ]
                }
            },
            {
                title: "Cerca Attivitą",
                icon: "Edit"
            },
            {
                title: "Aggiorna",
                icon: "Edit"
            },
            {
                title: "Legenda Attivitą",
                icon: "Edit"
            },
            {isSeparator: true},
            {
                icon: "Edit",
                embeddedComponent: embeddedForm,
                embeddedComponentFields: ["title"]
            }
        ]
    });
    
    isc.ToolStrip.create({
        ID: "toolStrip",
        membersMargin: 5,
        members: [
            adaptiveMenu
        ]
    });
    
    isc.VLayout.create({
        ID: "vLayout",
        width: "100%",
        height: "100%",
        backgroundColor: "white",
        members: [
            isc.VLayout.create({height:"*"}),
            toolStrip
        ]
    }).show()

    #2
    We have committed a fix that may resolve most of the issues you reported, but it's not yet available in the public downloads. We'll update this thread to let you know when it's in the nightly builds.

    Comment


      #3
      Fixes been committed back to SC 13.1 to address the issues you reported. They will be included in tomorrow's nightly builds, dated 2025-09-09 and beyond.

      Comment


        #4
        SmartClient Version: v13.1p_2025-09-09/AllModules Development Only (built 2025-09-09)

        Hi, I’ve just tested the latest 13.1 build:

        Safari on iPad Air 11" (XCode emulator)
        1. Fixed - the menu no longer covers the ToolStrip.
        2. & 3. When changing orientation with the menu open, the menu is closed. I don’t know if this is intended behavior, but I think it could be acceptable.

        Safari on iOS 18.5 iPhone 14 (XCode emulator)
        4. & 5. Here I don’t see any differences compared to the previous behaviour.

        Comment


          #5
          Yes, menus are now closed during rotation to avoid inappropriate sizing.

          We reproduced cases #4 and #5 that you reported and have made additional fixes, which should be in the next nightly builds of SC 13.1+.

          Comment

          Working...
          X