Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config with default template 5d22fbf8 #166

Merged
merged 7 commits into from
Oct 17, 2024

Conversation

1letter
Copy link
Contributor

@1letter 1letter commented Oct 16, 2024

@1letter 1letter requested a review from petschki October 16, 2024 18:48
@1letter
Copy link
Contributor Author

1letter commented Oct 16, 2024

@petschki short explanation for the changes by me. the command tox -e lint format the attribute multiple="" to multiple, that is from point of HTML standard view okay. but then it will be rendered in the template to multiplemultiple and a multiselect don't work. I decide me to remove the attribute in the template, the lint process don't touch the attribute and the bug is gone. what do you think? Is this solution okay?

Copy link
Member

Choose a reason for hiding this comment

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

Two questions:

  1. what about the second "multiple" in the to field?
  2. if multiple is missing, are there problems when saving multiple values?

Copy link
Member

@petschki petschki Oct 17, 2024

Choose a reason for hiding this comment

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

OK I see now that the multiple attribute is set in tal:attributes so its OK to remove it from the markup.

But TBH it smells a bit like a bug in Chameleon template rendering engine, because if I do multiple="" in the widget markup it gets replaced correctly with multiple="multiple" (thats what z3c.form OrderedSelect widget defines here: https://github.com/zopefoundation/z3c.form/blob/master/src/z3c/form/browser/orderedselect.py#L36) -> but according to the specs, those "boolean html attributes" should be handled correctly if they are present without a value (https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML)

So if you remove the second multiple in the to field too, this is approved.

Copy link
Member

Choose a reason for hiding this comment

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

related 😉

collective/zpretty#123

Copy link
Contributor Author

Choose a reason for hiding this comment

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

related 😉

collective/zpretty#123

Okay, a new task for the week ;-)

Copy link
Member

Choose a reason for hiding this comment

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

Root cause: malthe/chameleon#429

@1letter 1letter requested a review from petschki October 17, 2024 06:43
@1letter 1letter merged commit 373c22c into master Oct 17, 2024
9 checks passed
@1letter 1letter deleted the config-with-default-template-5d22fbf8 branch October 17, 2024 06:58
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.

2 participants