Page MenuHomePhabricator

Accordion: Add options for more styles
Closed, ResolvedPublic

Description

Background

We have seen continuous needs for various styling of the Accordion — with the divider, with an outline, or without one at all. Additionally, a more minimal and space saving Accordion has also been desired.

In some cases, the divider is useful to separate the different accordion items in a group, but in some other cases the dividers within the accordion items in a group create noise (e.g. when they are placed on big screens like desktop or tablet). Also, we need to keep in mind that a single accordion could appear in a page, so in this case the divider could not be necessary.

Captura de pantalla 2023-10-03 a las 19.27.40.png (717×737 px, 61 KB)

Goal

Ideally, we would have a variant property called something like separation with the values of divider, outline, and none. In order to not break any current implementations of Accordion, divider should be the default. Additionally, we should add a boolean prop for minimal or something, which is forced to have a separation of none due to its styling.

Also, for a separation of divider, the border division should only appear on accordion groups, and not on a lone accordion.

Acceptance criteria (or Done)

Design

  • Update the component in the Figma

Code

  • Implement the component in Codex

Event Timeline

bmartinezcalvo renamed this task from Accordion: implement the gray divider as property to Accordion: Add the gray divider as property.Mar 4 2025, 6:57 PM
DTorsani-WMF renamed this task from Accordion: Add the gray divider as property to Accordion: Add options for more styles.Aug 19 2025, 12:26 AM
DTorsani-WMF claimed this task.
DTorsani-WMF removed a project: Design-System-Team.
DTorsani-WMF updated the task description. (Show Details)

Change #1179766 had a related patch set uploaded (by Dtorsani; author: Dtorsani):

[design/codex@main] [WIP] Accordion: build in more styles

https://gerrit.wikimedia.org/r/1179766

DTorsani-WMF moved this task from Backlog to In Progress on the Codex board.

Change #1179766 merged by jenkins-bot:

[design/codex@main] Accordion: build in more styles

https://gerrit.wikimedia.org/r/1179766

Change #1191541 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update Codex from v2.3.1 to v2.3.2

https://gerrit.wikimedia.org/r/1191541

Change #1191541 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v2.3.1 to v2.3.2

https://gerrit.wikimedia.org/r/1191541

Volker_E updated the task description. (Show Details)