Skip to content

Replace collapsing list component with details#2528

Open
adamzap wants to merge 2 commits intodjango:mainfrom
adamzap:remove-list-collapsing-component
Open

Replace collapsing list component with details#2528
adamzap wants to merge 2 commits intodjango:mainfrom
adamzap:remove-list-collapsing-component

Conversation

@adamzap
Copy link
Copy Markdown
Member

@adamzap adamzap commented Feb 27, 2026

The collapsing list component was not used much and required non-trivial JavaScript. This patch replaces all uses of it with the details and summary elements. It has also been removed from the style guide.

Closes #2520

I think this is a good change, but this PR needs some design help:

Start page - Intro to Django

Before:

image

After:

image

Community - Django RSS Feeds

Before:

image

After:

image

News - Sidebar - Archives

Before:

image

After:

image

adamzap and others added 2 commits February 26, 2026 21:29
The collapsing list component was not used much and required non-trivial
JavaScript. This patch replaces all uses of it with the `details` and
`summary` elements. It has also been removed from the style guide.
Copy link
Copy Markdown
Member

@pauloxnet pauloxnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SaptakS
Copy link
Copy Markdown
Contributor

SaptakS commented Mar 11, 2026

I can take a look at implementing the styling to make it look closer to what we had before. I think I would still prefer to have the "expand all/collapse all" button progressively added through JS, so that if someone is not using JS, the individual expand/collapse still work, but if someone does use JS, they get that extra feature (yay progressive enhancement!).

Thoughts @adamzap ?

@adamzap
Copy link
Copy Markdown
Member Author

adamzap commented Mar 23, 2026

@SaptakS I'm good with that. Do you think we need the expand/collapse buttons on the blog sidebar though? Those seem a bit out of place to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide on the future of the collapsing list component

3 participants