Rewrite jQuery .show() and .hide()

Created on 26 August 2020, about 5 years ago
Updated 14 March 2024, over 1 year ago

Problem/Motivation

The jQuery .show() and .hide() is used in a few places. It's also specifically mentioned in core/modules/system/css/components/hidden.module.css as a way to toggle hidden elements.

Proposed resolution

Provide an API to toggle visibility of elements. However, we should probably use either .hidden or [hidden] for determining the visibility. As we do that, we should make the CSS rule use !important on the display: none property to ensure that it doesn't get overridden accidentally by arbitrary rules.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Javascript 

Last updated about 1 month ago

Created by

🇫🇮Finland lauriii Finland

Live updates comments and jobs are added and updated live.
  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

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