The admin toolbox should include an option to hide the mobile menu entirely below the configured breakpoint.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    knaffles created an issue. See original summary.

    jlj’s picture

    +1

    imclean’s picture

    Version: 2.0.0-alpha2 » 2.0.0-alpha3
    Category: Task » Feature request

    I have working code for this feature for the 2.0.x branch but this version can't be selected in either the Version dropdown of this issue or when cloning via git. https://www.drupal.org/node/2006774/git-instructions

    imclean’s picture

    Status: Active » Needs review
    StatusFileSize
    new6.44 KB
    anoopsingh92’s picture

    Assigned: irene_dobbs » Unassigned

    Hi @imclean, Reviewing the #4 patch. Thanks

    anoopsingh92’s picture

    Assigned: Unassigned » anoopsingh92
    anoopsingh92’s picture

    Assigned: anoopsingh92 » Unassigned
    Status: Needs review » Reviewed & tested by the community
    StatusFileSize
    new69.55 KB

    Hi @imclean, Your Parch has been applied successfully. It looks good to me.

    Lenovo@LAPTOP-PDE747K8 MINGW64 /c/xampp/htdocs/drupal-9/web/modules/contrib/tb_megamenu-3252526 ((2.0.0-alpha3))
    $ git apply -v add_option_to_hide_mobile_menu-3252526-4.patch
    Checking patch dist/js/frontend.js...
    Checking patch dist/js/toolbox.js...
    Checking patch js/frontend.js...
    Checking patch js/toolbox.js...
    Checking patch src/TBMegaMenuBuilder.php...
    Checking patch tb_megamenu.module...
    Checking patch templates/backend/tb-megamenu-backend.html.twig...
    Applied patch dist/js/frontend.js cleanly.
    Applied patch dist/js/toolbox.js cleanly.
    Applied patch js/frontend.js cleanly.
    Applied patch js/toolbox.js cleanly.
    Applied patch src/TBMegaMenuBuilder.php cleanly.
    Applied patch tb_megamenu.module cleanly.
    

    Patch #4
    Thanks for the patch. I am moving it to RTBC. Thanks

    imclean’s picture

    Status: Reviewed & tested by the community » Needs review

    Hi @anoopsingh92. Thanks for your interest, however posting screenshots of patches applying is not a proper review and not particularly helpful. You don't say what works, what doesn't, what you did or didn't do or what the before and after behaviour is.

    See issue etiquette, specifically item 11 of things not to do in issues:

    Don't: Upload screenshots of a patch applying. This is of no benefit to maintainers or other contributors.

    See also this issue: #3226762-12: Agree on policy on repeated posts.

    Setting to "Needs review".

    anoopsingh92’s picture

    Hi @imclean, First of all, i apologize for all doing this. And Thank you so much for guiding me in Drupal contribution reviewing thing. I will review this once again with the proper way as of now you suggested. I accept it, that is my mistake actually I am new in the contribution. Next time I will definitely remember that. Thank you

    knaffles’s picture

    The patch worked great for me, although the config wasn't being saved on the backend, so I had to make a slight tweak to toolbox.js. I created a PR based on the patch provided, with a couple of changes to simplify the JS used to hide the menu, and to prevent the flash of unstyled content on mobile (ie, the hamburger appears before a split second before the necessary JS runs).

    Here's the PR:
    https://git.drupalcode.org/project/tb_megamenu/-/merge_requests/56

    knaffles’s picture

    Status: Needs review » Fixed

    This has been merged and will be included in the next release, following 2.0.0-alpha3.

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.