Details

    • Rank:
      33463

      Description

      Presently on docs.moodle.org the JS for the menu is loaded at the end of the page causing noticeable visual jump sometimes (particularly if you haven't cached the JS)
      Mediawiki doesn't appear to include any hooks to include JS in the head any more (all in the foot a bit like us) so it appears now is the time to uprgade the menu.

      Other places we have this menu for reference:

      • moodle.org : Moodle.org uses the custom menu which is primarily JS powered (YUI node-menunav) and has CSS to support it when JS is disabled and to remove any visual jump.
      • tracker.moodle.org : Uses the CSS version of the custom menu from moodle.org, no JS required at all, but only one language so no meaty upgrade required to get it there.
      • planet.moodle.org : Uses the same old skool menu as docs.moodle.org, JS powered with no supporting CSS so visual jump. This could also benefit from our conversion.

      The upgrade would be to upgrade the menu structure to one fully supported by CSS (like tracker) and would have to involved converting all of the language menu's as well.
      Certainly not a horribly mammoth task. Should be able to get through it in a day easily.

      Cheers
      Sam

        Activity

        Hide
        Sam Hemelryk added a comment -

        Hello watchers I just added

        This issue is about upgrading the menu on docs.moodle.org to get rid of the JS (purely CSS powered) eliminating the visual jump.
        Wanna check it out and give some feedback?

        Jordan would love to know what other sites use this menu, you'd have a better idea than anyone I imagine.
        Martin would you like this to have some priority, you mentioned you'd noticed the jump to me the other day?

        Cheers
        Sam

        Show
        Sam Hemelryk added a comment - Hello watchers I just added This issue is about upgrading the menu on docs.moodle.org to get rid of the JS (purely CSS powered) eliminating the visual jump. Wanna check it out and give some feedback? Jordan would love to know what other sites use this menu, you'd have a better idea than anyone I imagine. Martin would you like this to have some priority, you mentioned you'd noticed the jump to me the other day? Cheers Sam
        Hide
        Martin Dougiamas added a comment -

        After some thought, yes I think this is worth fixing to be CSS-only everywhere. And quite soon.

        We also need some new little scripts to generate the HTML again for each language on moodle.org, like http://moodle.org/theme/moodle/menu.php?lang=jp so that we can easily pull updates via scripts to other systems and do what it takes there to make the menus show.

        Show
        Martin Dougiamas added a comment - After some thought, yes I think this is worth fixing to be CSS-only everywhere. And quite soon. We also need some new little scripts to generate the HTML again for each language on moodle.org, like http://moodle.org/theme/moodle/menu.php?lang=jp so that we can easily pull updates via scripts to other systems and do what it takes there to make the menus show.
        Hide
        Jordan Tomkinson added a comment -

        i dont think there will ever be an automated 'drop in' menu for other projects as code differes so hugely between moodle, jira, mediawiki, planet, gitweb, viewvc etc...

        Show
        Jordan Tomkinson added a comment - i dont think there will ever be an automated 'drop in' menu for other projects as code differes so hugely between moodle, jira, mediawiki, planet, gitweb, viewvc etc...
        Hide
        Martin Dougiamas added a comment -

        Is it possible to have some header JS on all these sites (customised for each site as required) that just pulls in a JSON structure or something from a standard text file on the same domain eg tracker.moodle.org/menu.json ? The standard text file could be updated automatically by shell scripts.

        Show
        Martin Dougiamas added a comment - Is it possible to have some header JS on all these sites (customised for each site as required) that just pulls in a JSON structure or something from a standard text file on the same domain eg tracker.moodle.org/menu.json ? The standard text file could be updated automatically by shell scripts.
        Hide
        Dan Poltawski added a comment -

        I think doing this in JS was exactly why we got that horrible juddering on docs.moodle.org, so not sure thats wise

        Show
        Dan Poltawski added a comment - I think doing this in JS was exactly why we got that horrible juddering on docs.moodle.org, so not sure thats wise
        Hide
        Martin Dougiamas added a comment -

        Well, we don't usually click on the menus as soon as the page loads. Can't it load the whole page first without submenus (for example), and then add the submenus later?

        The main problem with the old one was that it was printing the menus out uncollapsed first and then collapsing them once the whole page was loaded (fail).

        Show
        Martin Dougiamas added a comment - Well, we don't usually click on the menus as soon as the page loads. Can't it load the whole page first without submenus (for example), and then add the submenus later? The main problem with the old one was that it was printing the menus out uncollapsed first and then collapsing them once the whole page was loaded (fail).
        Hide
        Martin Dougiamas added a comment -
        Show
        Martin Dougiamas added a comment - Related: http://drupal.org/node/979006 ?
        Hide
        Dan Poltawski added a comment -

        Ah right sure, ajaxy type request could work to load the menu subitems

        Show
        Dan Poltawski added a comment - Ah right sure, ajaxy type request could work to load the menu subitems
        Hide
        Dan Poltawski added a comment -

        (although with that I wonder how it'll fit into the new moodle.org redesign - will we always have hidden then reveal menus?)

        Show
        Dan Poltawski added a comment - (although with that I wonder how it'll fit into the new moodle.org redesign - will we always have hidden then reveal menus?)
        Hide
        Martin Dougiamas added a comment -

        Now we have Bootstrap it seems best to focus on duplicating how that works everywhere else.

        Show
        Martin Dougiamas added a comment - Now we have Bootstrap it seems best to focus on duplicating how that works everywhere else.
        Hide
        Helen Foster added a comment -

        Please note that, as mentioned in MDLSITE-1876, since we've decided to go for a top menu listing sites (moodle.org, docs, downloads, demo, tracker etc as on spreadsheet https://docs.google.com/spreadsheet/ccc?key=0AmamVlPpCnn4dHpSRTByb2pJWHljUzMxYlE5dDg1d3c&hl=en_GB#gid=1 ) this means that a simple top menu listing sites can be hard-coded.

        Show
        Helen Foster added a comment - Please note that, as mentioned in MDLSITE-1876 , since we've decided to go for a top menu listing sites (moodle.org, docs, downloads, demo, tracker etc as on spreadsheet https://docs.google.com/spreadsheet/ccc?key=0AmamVlPpCnn4dHpSRTByb2pJWHljUzMxYlE5dDg1d3c&hl=en_GB#gid=1 ) this means that a simple top menu listing sites can be hard-coded.
        Hide
        Helen Foster added a comment -

        Closing as the top menu of community sites needs no further work

        moodle.org | documentation | downloads | demo | tracker | development | translation | moodle.net

        Show
        Helen Foster added a comment - Closing as the top menu of community sites needs no further work moodle.org | documentation | downloads | demo | tracker | development | translation | moodle.net

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development