-
Notifications
You must be signed in to change notification settings - Fork 196
WD-32254-Updated equal heights row and pattern to use 4 4 8 grid #5729
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
Merged
jmuzina
merged 7 commits into
main
from
WD-32254-dev-update-equal-heights-row-and-pattern-to-use-4-4-8-grid
Jan 13, 2026
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
52a5abd
upgrade equal heights row to the new grid
jmuzina d31fc40
Refactor equal heights to use a new shared equal heights block macro
jmuzina 7156b24
updated the legacy grid in equal heights pattern
immortalcodes b44fe88
added support to link the titles of items in equal heights component
immortalcodes fb86e55
review fixes in equal heights macro
immortalcodes a01fbeb
fixed 2-block data-spotlight macro for new grid
immortalcodes baa4070
rm todo comment
jmuzina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "vanilla-framework", | ||
| "version": "4.39.0", | ||
| "version": "4.40.0", | ||
| "author": { | ||
| "email": "[email protected]", | ||
| "name": "Canonical Webteam" | ||
|
|
||
immortalcodes marked this conversation as resolved.
Show resolved
Hide resolved
|
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
jmuzina marked this conversation as resolved.
Show resolved
Hide resolved
immortalcodes marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| {#- | ||
| vf_equal_heights_block | ||
| Renders the inner Equal Heights grid (no outer section/rows), suitable for embedding in other patterns (e.g. tab panels). | ||
|
|
||
| Params: | ||
immortalcodes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - items (array): Each item may include 'image_html', 'title_text', 'description_html', and 'cta_html'. | ||
| - subtitle_heading_level (int): 4 or 5 (default 5) — used for item titles. | ||
| - highlight_images (boolean): Whether to add a subtle grey background behind images. | ||
| - image_aspect_ratio_small (string): "square" | "2-3" | "3-2" | "16-9" | "cinematic" | "auto" (default: "square"). | ||
| - image_aspect_ratio_medium (string): same options as above (default: "square"). | ||
| - image_aspect_ratio_large (string): same options as above (default: "2-3"). | ||
| -#} | ||
| {%- macro vf_equal_heights_block( | ||
| items=[], | ||
| subtitle_heading_level=5, | ||
| highlight_images=false, | ||
| image_aspect_ratio_small="square", | ||
| image_aspect_ratio_medium="square", | ||
| image_aspect_ratio_large="2-3" | ||
| ) -%} | ||
| <div class="p-equal-height-row--wrap"> | ||
| {%- for item in items -%} | ||
| {%- set image = item.get("image_html", "") | trim -%} | ||
| {%- set title = item.get("title_text", "") | trim -%} | ||
| {%- set description = item.get("description_html", "") | trim -%} | ||
| {%- set cta = item.get("cta_html", "") | trim -%} | ||
| <div class="p-equal-height-row__col is-borderless"> | ||
| {#- Image item -#} | ||
| <div class="p-equal-height-row__item"> | ||
| {%- if image | length > 0 %} | ||
| <div | ||
| class="p-image-container{% if image_aspect_ratio_small != 'auto' %} p-image-container--{{ image_aspect_ratio_small }}-on-small{% endif %}{% if image_aspect_ratio_medium != 'auto' %} p-image-container--{{ image_aspect_ratio_medium }}-on-medium{% endif %}{% if image_aspect_ratio_large != 'auto' %} p-image-container--{{ image_aspect_ratio_large }}-on-large{% endif %} is-cover{% if highlight_images %} is-highlighted{% endif %}"> | ||
| {{- image | safe -}} | ||
| </div> | ||
| <hr class="p-rule--highlight"/> | ||
| {%- endif -%} | ||
| </div> | ||
| {#- Title item -#} | ||
| <div class="p-equal-height-row__item"> | ||
| {%- if title | length > 0 -%} | ||
| <p class="p-heading--{{ subtitle_heading_level }}">{{- title -}}</p> | ||
| {%- endif -%} | ||
| </div> | ||
| {#- Description item (optional) -#} | ||
| <div class="p-equal-height-row__item"> | ||
| {{- description | safe -}} | ||
| </div> | ||
| {#- CTA item (optional) -#} | ||
| <div class="p-equal-height-row__item"> | ||
| {%- if cta | length > 0 -%} | ||
| <p> | ||
| {{- cta | safe -}} | ||
| </p> | ||
| {%- endif -%} | ||
| </div> | ||
| </div> | ||
| {%- endfor -%} | ||
| </div> | ||
| {%- endmacro -%} | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.