Fix control-panel property widgets hidden by pat-autotoc (#154) - #155
Merged
Merged
Conversation
The new control-panel UX added pat-autotoc with 'section: fieldset', which treats every <fieldset> as a tab section. yafowil.widget.dict / .array (2.0) wrap themselves in a nested, legend-less <fieldset>, so the user/group property-mapping widgets were turned into empty autotoc sections and hidden in the Plone control panel (the ZMI, which has no pat-autotoc, still showed them). Scope the tabbing to the top-level 'fieldset.formPanel' sections (server/users/groups/cache) so the nested widget fieldsets are left alone. Fixes #154. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
erral
self-requested a review
June 30, 2026 06:13
Member
Author
|
@erral: What do you think, is it now 2.0.0 final ready or wait for more feedback? |
Member
|
@jensens AFAICT and with the tests I have done in a client's site which uses this plugin with Active Directory, it works perfectly and a new version can be released. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #154.
Problem
After upgrading to 2.0.0rc1, the user/group property-mapping widgets are missing from the Plone control panel (they are present in the ZMI, and the data is intact).
Root cause
See the detailed analysis in #154. In short:
yafowil.widget.dict2.0 wraps itself in a nested, legend-less<fieldset>.pat-autotocwithsection: fieldset, which turns every<fieldset>into a tab section — including those nested widget fieldsets — so they get hidden in the browser.pat-autotoc.Fix
Scope the auto-TOC tabbing to the top-level section fieldsets only (
server/users/groups/cacheall carryclass: formPanel):The nested widget fieldsets no longer match the section selector.
This is a browser-side fix — the server-side HTML was already correct, so the existing Python/unit tests can't reproduce or prove it (they stay green either way). Please verify in a browser on an affected instance (the control panel should again show the User attribute aliases, User Property-Sheet Attributes, and the group equivalents). 240 unit/integration/doctest tests still pass.
Follow-up (not in this PR)
The form has both
enableFormTabbingandpat-autotocactive — two tabbing mechanisms on the same form. Worth revisiting whether both are intended.🤖 Generated with Claude Code