Bug - Collapsible sections and lists
Update 2023-09-06
Bug 2 is working as intended
Bug 1 still needs to be resolved, as confirmed in aforementioned thread.
Summary
Wrapping a list in a collapsible section results in some odd behaviour:
- Wrapping a list in a collapsible section using the IDE button will wrap each line of the list in a separate collapsible subsection
- Manually wrapping the list in a collapsible subsection removes the list formatting; the list will display on a single line
This appears unrelated to other collapsible section bugs (such as #338705, and #29766)
Steps to reproduce
I'll use the following list code as a debug input:
1. First item
1. Nested first item (under First item)
1. Nested second item (under First item)
1. Second item
1. Nested first item (under Second item)
1. Nested second item (Under Second item)
Which appears as follows (expected behaviour):
- First item
- Nested first item (under First item)
- Nested second item (under First item)
- Second item
- Nested first item (under Second item)
- Nested second item (Under Second item)
Bug 1 - using the Collapsible Section web IDE button
Click to expand
1\\. First itemClick to expand
1\\. Nested first item (under First item)Click to expand
1\\. Nested second item (under First item)Click to expand
1\\. Second itemClick to expand
1\\. Nested first item (under Second item)Click to expand
1\\. Nested second item (Under Second item)Bug 2 - manually wrapping the list in a <details>
tag with a <summary>
tag as the first child
Click to expand
1\\. First item 1. Nested first item (under First item) 1. Nested second item (under First item) 1. Second item 1. Nested first item (under Second item) 1. Nested second item (Under Second item)Example Project
N/A - this ticket is a suitable reproduction
What is the current bug behavior?
Wrapping lists in a collapsible section results in a malformed list
What is the expected correct behavior?
Wrapping a list in a collapsible section results in 1x list that renders isomorphically to the example given at the start of the Reproduction
section.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
N/A
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \\\`sudo gitlab-rake gitlab:env:info\\\`) (For installations from source run and paste the output of: \\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\`)
Results of GitLab application Check
N/A
Possible fixes
Uncertain - ideally lists nested inside a collapsible section will appear near-identically to a list not nested inside a collapsible section.