Accordion and SequenceWidget
Open
Nobody has claimed this yet.
bug
needs-pr
should backport
- Dominant language
- JavaScript
- Stars
- 423
- Forks
- 158
- PR merge metrics
- No merged PRs in 30d
Description
Mixing accordion exemple with SequenceWidget and Select2Widget leads to some strange behaviour:
- accordion of the first element work, the others can't be opened/closed
- css of Select2Widget inside the accordion seems have some issues.
version: deform==2.0.4
Here some code to illustrate:
choices = (('test1', 'Test 1'),
('test2', 'Test 2'),
('test3', 'Test 3'))
## Inside the accordion
class ClipParameterSchema(colander.Schema):
not_available_for = colander.SchemaNode(
colander.Set(),
validator=colander.Length(max=10),
widget=deform.widget.Select2Widget(
values=choices,
multiple=True),
missing=[]
)
only_available_for = colander.SchemaNode(
colander.Set(),
validator=colander.Length(max=1),
widget=deform.widget.Select2Widget(
values=choices,
multiple=True),
missing=[],
)
until = colander.SchemaNode(
colander.Date(),
missing=colander.drop
)
## Schema with an accordion
class ClipSchema(colander.Schema):
upload = colander.SchemaNode(
deform.FileData(),
widget=deform.widget.FileUploadWidget(tmpstore)
)
parameters = ClipParameterSchema(
title="Clip parameters",
widget=deform.widget.MappingWidget(
template="mapping_accordion",
open=False))
## Sequence of schema with an accordion
class ClipSequence(colander.SequenceSchema):
upload = ClipSchema()
And a screen shot here:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided ClipSequence example with MappingWidget using the mapping_accordion template, Select2Widget, and deform 2.0.4. Trace the accordion and Select2 behavior in the rendered form; done means every accordion item opens and closes correctly and Select2 styling remains correct inside the accordion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100