Repository navigation
Conversation
A fieldset is a flat list of fields: plone.supermodel's Fieldset holds field names and nothing else, so a tab of twenty settings can only be broken up by making more tabs, which scatters settings that belong together. A schema can now name the field that opens a section and the heading drawn above it, through the senaite.core.fieldset_sections tagged value. A field that is not named renders exactly as before, so nothing changes on a schema that declares none. The SENAITE setup declares them for its four longest tabs.
The two JavaScript sourcemaps the build rewrote are left out: no JavaScript changed, only the stylesheet.
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.
Description of the issue/feature this PR addresses
The SENAITE setup has tabs that hold twenty settings each.
Analysesmixes display options, verification, result formatting, rejection and registration into one list, andSamplingruns the optional workflow steps straight into the turnaround times.A fieldset cannot be broken up further.
plone.supermodel'sFieldsetholds a label, a description and a flat list of field names, and nothing else, so the only way to group within a tab today is to make more tabs. That scatters settings that belong together and breaks the deep links into#analyses.Current behavior before PR
Desired behavior after PR is merged
A schema can name the field that opens a section and the heading drawn above it:
Twelve headings over the four longest tabs:
Analyses,Appearance,SamplingandNotifications.Implementation
Small, because the pieces were already there.
SenaiteRenderWidgetand itswidget.ptalready replace the ones fromplone.app.z3cform, so the heading is a lookup on the widget's own schema and five lines of template:senaite.core.config.FIELDSET_SECTIONS, the tagged value keySenaiteRenderWidget.get_section_heading, which reads it offwidget.field.interfacewidget.pt, above the field wrapper, undertal:conditionforms.scssA field that is not named renders exactly as before, so a schema that declares no sections is untouched. No new view, adapter or registration.
Verification
The twelve headings render on the setup edit form, and an edit form of a schema that declares none is byte for byte what it was. Checked both on a running instance.
Full
senaite.coretest suite: 229 tests, 0 failures, 0 errors.--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.