WIP: Form components extensions and improvements #94707
No reviewers
Labels
No Label
legacy project
Infrastructure: Blender Web Assets
legacy project
Infrastructure: Websites
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Resolved
Type
Design
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/web-assets#94707
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "component-forms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request is work in progress. 🚧
This pull request overhauls Web Assets' forms components by simplifying existing styles with the cleanup of redundant rules, improving UI and usability details and adding new stylized components for generic form controls like checkboxes, radio buttons and sliders.
Fixes
Improvements
Generalized input example for file uploads
New components
Roadmap
Deployment
The
component-forms
branch and the PR is meant to be polished and wrapped up while working on the survey branch in the devfund-website. The PR should be merged, and a new BWA version should be released later. As there're multiple changes to forms' styling, project-level deployments should be done with extra caution.As discussed IRL:
Account for the help text in forms under the class
.form-text
. Bootstrap docs.I went ahead and cleaned up the Profile settings in Studio.
Consider adding an example field that is
required
. So we can style the usual red asterisk.The class is
form-required-indicator
andasteriskField
(Django Crispy Forms)Thank you for the changes! The examples have been updated accordingly. There were some conflicting layout styles present: they've been cleaned up as well.
@pablovazquez the optional range slider styles have been added. This is how it looks by default:
There was a subtle variant added with steps indicators being dots:
Currently it's very simple and only uses CSS. It works by appending flat HTML markup to the slider input, like this:
The number of
slider-custom-steps-items
must match the number of steps. In most cases it should be simple to implement. We can enhance it further with JavaScript if we want to.Checkout
From your project repository, check out a new branch and test the changes.