Render using theme input and select instead of lists with links for checkboxes and dropdown

Created on 16 January 2018, almost 7 years ago
Updated 28 August 2024, 4 months ago

Currently the facets are always rendered as lists with links, which are rewritten by javascript to form elements.
A few issues arise:

  • In some themes javascript is loaded from the footer, some flickering may arise.
  • Slight lag ofcourse because javascript has to do it's thing to enable checkboxes and dropdowns
  • Styling issues, because the form elements are not rendered by the theme functions of these elements, the html is different and it has to be styled and fixed seperately. For a lot of frontenders this could be found annoying.

What did I do?

  • Rewritten the DropdownWidget and CheckboxWidget to render the elements serverside using the theme functions for select and checkbox (input__checkbox).
  • Rewritten the javascript just to trigger on change events for checkboxes and facets.
  • Also fixed that theme suggestions are correctly added for the available widget types.
  • Added a twig file for checkboxes, because for this element we do not need the (-) element anymore when it is active.
🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇳🇱Netherlands jefuri

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024