• Andrzej Michalec
    November 17, 2016 at 7:00 am #3098

    We have a situation with Tab Section and dynamically changed content visibility. Imagine one of tabs is custom coach view (CV) that must work in context of full edit (default visibility) and for review only (read only visibility). CV visibility is bound to string variable that is either “DEFAULT” or “READONLY” to serve that purpose.

    In such scenario visibility is incorrectly handled:
    – Initially our CV is first tab and its visibility (and variable value) is “READONLY”, CV is properly rendered.
    – Second tab is activated, our CV becomes “NONE” (also variable is modified)
    – First tab is activated again and now it is set to “DEFAULT (variable also) instead of “READONLY”

     

    Now it sounds like bound visibility variable is accidentally modified. In fact it is expected coach framework behavior — in SPARK code I saw that tabs are switched by modification of “context.options._metadata.visibility” so that bound variable is being also updated. Unfortunate thing is that state is not preserved and intention of using variable for visibility and tabs change should not touch it.  Stock Tab widget from IBM “Responsive Coaches” does not modify metadata but flips CSS class on tab’s DIV adding and removing “display:none” attribute. This way tabs work fine and bound visibility variable remains unchanged preserving its intentions (read only pane remains read only).

     

    Simple fix like storing previous visibility before hiding and restoring it when reactivating pane works only partially – when variable is not modified after displaying tabs. Otherwise changing variable value for hidden tab will make it accidentally visible (two children shown at once). So as long as SPARK Tab Section relies on metadata visibility I do not see clean way to fix it on client-side (widget consumer side).

    Please provide an estimated date of fix.

    regards,
    -andy.

    SPARK Support
    November 17, 2016 at 3:22 pm #3102

    Hi Andy,

    We are looking into this issue.   I have submitted a Ticket on your behalf.

    Regards,

    Stephen P.

    Andrzej Michalec
    November 21, 2016 at 11:38 am #3139

    Dear SPARK team,

    I want to thank JMAC for providing simple solution — adding extra container between tab widget and tab content that isolates visibility propagation. To make it working:
    1. place container (like horizontal layout) in TabSection content box – leave this container visibility as default (same as parent),
    2. place own coachview into this container and bind own coachview’s visibility to variable.

    My only suggestion is to place such a tip in TabSection article.

    regards,
    -andy.

    SPARK Support
    November 22, 2016 at 9:39 am #3150

    Hi Andy,

    Thank you for the Feedback.

    I will discuss making a revision to the Tab Article with JMAC.

    Regards,

    Stephen P.

    SPARK Support
    January 4, 2017 at 10:44 am #3430

    The Tab article has been updated with Visibility information and can be found here.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search