-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Implement page editor redesign for widget styles and forms layout #8921
Implement page editor redesign for widget styles and forms layout #8921
Conversation
7200f91
to
c319ac9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read through styles so far. Have not run locally but hopefully have some useful feedback.
Note: Updated the description so that issues fixed are shown with their full title. |
wagtail/snippets/templates/wagtailsnippets/snippets/create.html
Outdated
Show resolved
Hide resolved
Getting some issues with date fields overlapping Something to to with display grid on |
Vertical alignment of select box appears offhttps://www.whatsmybrowser.org/b/TXK9N |
StreamField input value in error state - not getting red outlineParent has File |
Looks incredible @thibaudcolas - the feedback I have so far is all I can probably do today, I have not gone through every single field type yet, but have read through code at least 1.5 times and started some smoke testing on Firefox (my preferred browser). |
6f88077
to
593ec8d
Compare
- box-sizing: border-box added to all elements globally in wagtail#8921 - Fixes wagtail#9031
- box-sizing: border-box added to all elements globally in wagtail#8921 - Relates to wagtail#9031
Includes #8318 (rebased). Fixes multiple issues (see below). This PR refactors and re-implements almost all of Wagtail’s form styles, in particular:
There are a few notable exceptions:
<ul class="fields">
markup and thefield_as_li.html
, even though it’s not appropriate for a form to be a list. I’ve left those as-is in the interest of time, but hope to get to them in a future refactoring.And notable additions:
{% panel %}
,{% field_row %}
and{% field %}
block-level template tags, which should make it easier for us to avoid duplicating this form/field markup everywhere.Fixes
Since this refactoring is such an enormous task, I’ve spent the time to set up a detailed test plan (see below), and also further list tasks / changes which are intentionally not part of this.
Remaining page editor form tasks
Before Wagtail 4 final release
[ ] Panel icons: documentation, review default icons, unit tests[ ] Consistent application ofheading_size=label
for panel components[ ] Field focus stylesOut of scope for this PR, status TBD
November 2022 release refactorings
field_as_li.html
<ul class="fields">
with forms rendering shared template.Backlog
Test plan
Here are my recommended parts of the Wagtail UI to look at:
EverythingPage
Branch: thibaudcolas/bakerydemo:tree/feature/everything-page (including database)
This is based on a previous PR which added all the possible types of StreamField blocks. In addition, this adds a
EverythingPage
page model which has fields of almost all types available in Wagtail/Django, and Wagtail panel definitions of almost all types. There are a few missing – notably Django multi-field form widgets that are rarely used, and Wagtail widgets only used in filters (such asButtonSelect
).In the database, I’ve made three copies of this page:
Here are the different panels, panel/field customisations, and widget types to test. There are a few I haven’t tested (didn’t seem simple enough to test to warrant the setup).
Panels
max_num(untested)Field customisations
Hidden field (editable=False)(untested)Widgets
Button(untested)ButtonWithDropdown(untested)AdminTaskChooser(untested)HiddenInput(untested)NullBooleanSelect(untested)ClearableFileInput(untested)MultipleHiddenInput(untested)SplitDateTimeWidget(untested)SplitHiddenDateTimeWidget(untested)SelectDateWidget(untested)Wagtail baseline test plan
Cross-browser testing:
Assistive tech: