-
-
Notifications
You must be signed in to change notification settings - Fork 827
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
Afform - Easier layout creation with predefined container styles and built-in title #22975
Conversation
(Standard links)
|
@eileenmcnaughton to avoid merge-conflicts I included the commit from #22963 in this PR, but we should merge that one first and I can rebase it out of this. |
I had this loading when documenting here - https://lab.civicrm.org/documentation/docs/user-en/-/merge_requests/549/diffs - so it worked One weird thing I noticed is how the label looks when the style is inline Without - note I didn't re-configure the afform - afform content below
Also - in greenwitch theme - I found it hard to tell which of the layout options is selected - the grey vs grey wasn't clear to me (that is probably pr-exisiting) |
…n css Now this widget supports having a `placeholder`. Also gave it its own css instead of piggybacking off crm-editable classes, as that was a bit messy and Shoreditch was applying some extra stuff which then had to be undone.
Before: A fieldset `<legend>` was treated as its own element. This was more flexible but more complex. After: Augenerated `<legend> for fieldsets or `<h4>` for other containers based on new `af-title` directive. This allows central control of titles for e.g. collapsible styles. Fixes dev/core#3110
Adds a predefined "Panel Pane" style, for creating dashboards.
Thanks @eileenmcnaughton I've rebased this PR now that #22963 is merged and also fixed the titles for inline/column layouts. |
OK - that looks better! |
Overview
This makes layouts easier to make, by adding predefined "Panel Pane" and "Collapsible" styles which can be applied to any container element. It also makes container titles easier to work with, and fixes some issues with saving blocks.
Before
No predefined style for creating a dashboard dashlet or collapsible fieldset.
After
Any container can be given a title and styled as a panel pane and/or collapsible:
This gives a nice-looking dashboard: