Giter Site home page Giter Site logo

Canada.ca flyout menu is broken. about wxt HOT 5 CLOSED

liquidcms avatar liquidcms commented on August 30, 2024
Canada.ca flyout menu is broken.

from wxt.

Comments (5)

liquidcms avatar liquidcms commented on August 30, 2024

this seems to mostly fix it.. but more testing to do yet

.slflnk.expanded.dropdown.open ul.sm {
  display: block;
}
.slflnk.expanded.dropdown ul.sm {
  display: none;
}

from wxt.

liquidcms avatar liquidcms commented on August 30, 2024

This is just a small piece of the issue; i see that the flyout portions are only on click (supposed to be on hover) and they are not positioned correctly. I see the code for acting on hover and it is being hit but failing at some point (no error). My guess is there is a class wrapper missing from the entire menu which makes the wet portions of this work... but comparing to what's on canada.ca i don't see it.

from wxt.

liquidcms avatar liquidcms commented on August 30, 2024

the following fixes the menu (externally, not in the WxT distribution). My guess is that some of this is added in WxT and they made a change to WET which has not been taken into account in WxT updates (as classes are missing and css is wrong).

JS:
$('nav#wb-auto-2 a.dropdown-toggle').attr('aria-haspopup', 'true');

CSS:

.gcweb-menu a[aria-expanded="true"] + ul.sm {
  display: block;
}
.expanded.dropdown ul.sm {
  display: none;
}

.gcweb-menu .dropup,
.gcweb-menu .dropdown {
  position: static;
}

As a side note, its startling how poor the structure of this menu is (parent items faked in css to look like parents) and how poorly the WET JS code is written in general. Spelling mistakes, formatting is extremely inconsistent with spaces and blank lines scattered around all over. Odd this has never been cleaned up or better, some sort of jslint rule set defined for it.

from wxt.

liquidcms avatar liquidcms commented on August 30, 2024

and a better version:

JS:
$('nav.gcweb-menu a.dropdown-toggle').attr('aria-haspopup', 'true');

CSS:

.gcweb-menu a[aria-expanded="true"] + ul.sm {
  display: block;
}
.expanded.dropdown ul.sm {
  display: none;
}

.gcweb-menu .dropup,
.gcweb-menu .dropdown {
  position: static;
}

from wxt.

sylus avatar sylus commented on August 30, 2024

Apologies I finally got time to take a look at this and believe I have it fixed.

I documented the fixes over in the issue:

https://www.drupal.org/project/wxt/issues/3236799#comment-14347979

from wxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.