Skip to content
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

Closes #2197 use card title field in demo content, Closes #2426 Add view paragraphs to demo content. #2422

Merged
merged 21 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e11d05a
Closes #2197 update card title
trackleft May 19, 2023
1e28762
added new AZ Person 3-col page to demo dropdown menu
cpoff May 19, 2023
e66a181
Merge branch 'main' into view-paragraph-demo-content
cpoff Jul 24, 2023
21d4810
Merge branch 'main' into view-paragraph-demo-content
trackleft Dec 1, 2023
08f6152
Update modules/custom/az_demo/migrations/az_demo_view_paragraph.yml
trackleft Dec 6, 2023
6a58641
Merge branch 'main' into view-paragraph-demo-content
trackleft Dec 6, 2023
574382a
Update az_demo_page_node.json
trackleft Dec 6, 2023
6cd2b7b
Update az_demo_text_paragraph.json
trackleft Dec 6, 2023
ecb26e6
Update az_demo_view_paragraph.json
trackleft Dec 6, 2023
5f34562
Update az_demo_menu_links.json
trackleft Dec 6, 2023
53fa638
Apply suggestions from code review
trackleft Dec 6, 2023
75c28ad
Update views titles
trackleft Dec 6, 2023
15a3935
Update az_demo_view_paragraph.json
trackleft Dec 6, 2023
17ffb24
Update modules/custom/az_demo/migrations/az_demo_view_paragraph.yml
trackleft Dec 6, 2023
6c93bda
Apply suggestions from code review
trackleft Dec 6, 2023
18fc520
Update modules/custom/az_demo/migrations/az_demo_view_paragraph.yml
trackleft Dec 6, 2023
1e07f9f
Update modules/custom/az_demo/migrations/az_demo_view_paragraph.yml
trackleft Dec 6, 2023
eb2e394
Update modules/custom/az_demo/migrations/az_demo_view_paragraph.yml
trackleft Dec 6, 2023
32b63bd
Update modules/custom/az_demo/migrations/az_demo_view_paragraph.yml
trackleft Dec 6, 2023
a25a476
Update modules/custom/az_demo/migrations/az_demo_card_paragraph.yml
trackleft Dec 6, 2023
08b3a37
fix with target_id
trackleft Dec 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules/custom/az_demo/data/az_demo_card_paragraph.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"id": 80,
"card_width": "col-lg-6",
"card_style": "card",
"card_title": "Borderless Cards",
"card_title_style": "default",
"card_clickable": false,
"az_cards": [
Expand Down Expand Up @@ -34,6 +35,7 @@
"id": 81,
"card_width": "col-lg-4",
"card_style": "card card-borderless",
"card_title": "Clickable Borderless Cards",
"card_title_style": "default",
"card_clickable": true,
"az_cards": [
Expand Down Expand Up @@ -74,6 +76,7 @@
"id": 82,
"card_width": "col-lg-4",
"card_style": "card",
"card_title": "Clickable Title-on-Image Cards",
"card_title_style": "title-on-image",
"card_clickable": true,
"az_cards": [
Expand Down Expand Up @@ -114,6 +117,7 @@
"id": 83,
"card_width": "col-lg-6",
"card_style": "card card-borderless",
"card_title": "Borderless Title-on-Image Cards",
"card_title_style": "title-on-image",
"card_clickable": false,
"az_cards": [
Expand Down
22 changes: 22 additions & 0 deletions modules/custom/az_demo/data/az_demo_menu_links.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,28 @@
"expanded": false,
"enabled": true,
"weight": "13"
},
{
"link_id": "31",
"parent_link_id": "6",
"menu": "main",
"title": "News Views",
"urlpath": "/pages/news-view-paragraphs",
"external": false,
"expanded": false,
"enabled": true,
"weight": "14"
},
{
"link_id": "32",
"parent_link_id": "6",
"menu": "main",
"title": "Person Views",
"urlpath": "/pages/person-view-paragraphs",
"external": false,
"expanded": false,
"enabled": true,
"weight": "15"
}
]
}
4 changes: 4 additions & 0 deletions modules/custom/az_demo/data/az_demo_page_categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
{ "name" : "Text",
"description" : "A page with text paragraphs.",
"parent_name" : ""
},
{ "name" : "Views",
"description":"A page containing views.",
"parent_name" : ""
}
]
}
22 changes: 21 additions & 1 deletion modules/custom/az_demo/data/az_demo_page_node.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"path" : "/pages/card-decks",
"exclude_title" : false,
"az_page_category" : "Cards",
"az_main_content" : "80|28|81|29|82|30|83",
"az_main_content" : "80|81|82|83",
"az_media_image" : "",
"az_summary" : ""
},
Expand Down Expand Up @@ -180,6 +180,26 @@
"az_main_content" : "89",
"az_media_image" : "",
"az_summary" : "This is a code example."
},
{
"id":19,
"title" : "News Views",
"path" : "/pages/news-view-paragraphs",
"exclude_title" : true,
"az_page_category" : "Views",
"az_main_content" : "100|101|102",
"az_media_image" : "",
"az_summary" : "A flexible page with news views."
},
{
"id":20,
"title" : "Person Views",
"path" : "/pages/person-view-paragraphs",
"exclude_title" : true,
"az_page_category" : "Views",
"az_main_content" : "103",
"az_media_image" : "",
"az_summary" : "Person Grid 3-column."
}
]
}
15 changes: 0 additions & 15 deletions modules/custom/az_demo/data/az_demo_text_paragraph.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,6 @@
"az_text_area" : "<h2>Embed a File<\/h2>\r\n",
"bottom_spacing" : "mb-0"
},
{
"id":28,
"az_text_area" : "<h2>Clickable Borderless Cards</h2>\r\n",
"bottom_spacing" : "mb-0"
},
{
"id":29,
"az_text_area" : "<h2>Clickable Title-on-Image Cards</h2>\r\n",
"bottom_spacing" : "mb-0"
},
{
"id":30,
"az_text_area" : "<h2>Borderless Title-on-Image Cards</h2>\r\n",
"bottom_spacing" : "mb-0"
},
{
"id":84,
"az_text_area":"<div class=\"bs_grid\"><div class=\"no-gutters row \" data-row-lg=\"equal_equal\" data-row-md=\"none\" data-row-none=\"12_12\" data-row-sm=\"none\" data-row-xl=\"\" data-row-xxl=\"\"><div class=\"col-12 col-lg\"><h3>Settings:<\/h3><ul>\t<li><strong>Label:&nbsp;<\/strong>Main navigation<\/li>\t<li><strong>Label display<\/strong>: True<\/li>\t<li><strong>Follow<\/strong>: False<\/li>\t<li><strong>Follow parent<\/strong>: child<\/li>\t<li><strong>Level<\/strong>: 2<\/li>\t<li><strong>Depth<\/strong>: Unlimited<\/li>\t<li><strong>Expand all items<\/strong><span>: True<\/span><\/li>\t<li><strong>Parent<\/strong>: main:<\/li>\t<li><strong>Theme hook suggestion<\/strong>: sidebar<\/li><\/ul><\/div><div class=\"col-12 col-lg\"><drupal-entity data-embed-button=\"az_embed_content_block\" data-entity-embed-display=\"view_mode:block_content.full\" data-entity-type=\"block_content\" data-entity-uuid=\"3a7fffab-e13b-429e-9405-f2bb89c83d63\"><\/drupal-entity><\/div><\/div><\/div><hr \/>",
Expand Down
36 changes: 36 additions & 0 deletions modules/custom/az_demo/data/az_demo_view_paragraph.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"paragraphs": [
{
"title" : "Grid View",
"id":100,
trackleft marked this conversation as resolved.
Show resolved Hide resolved
"target_id" : "az_news",
"display_id" : "az_grid",
"data": "",
"bottom_spacing" : "mb-0"
},
{
"id":101,
trackleft marked this conversation as resolved.
Show resolved Hide resolved
"title" : "Grid View with Filter",
"target_id" : "az_news",
"display_id" : "az_grid_filter",
"data": "",
"bottom_spacing" : "mb-0"
},
{
"id":102,
trackleft marked this conversation as resolved.
Show resolved Hide resolved
"title" : "Feature View",
"target_id" : "az_news",
"display_id" : "az_feature",
"data": "",
"bottom_spacing" : "mb-0"
},
{
"id" : 103,
trackleft marked this conversation as resolved.
Show resolved Hide resolved
"title" : "Grid - 3 col",
"target_id" : "az_person",
"display_id" : "grid_block_3cols",
"data" : "",
"bottom_spacing" : "mb-0"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ source:
-
name: card_clickable
selector: card_clickable
-
name: card_title
selector: card_title
-
name: az_cards
selector: az_cards
Expand All @@ -48,6 +51,8 @@ destination:
default_bundle: az_cards

process:
field_az_title: card_title

trackleft marked this conversation as resolved.
Show resolved Hide resolved
field_az_cards:
source: az_cards
plugin: sub_process
Expand Down
2 changes: 2 additions & 0 deletions modules/custom/az_demo/migrations/az_demo_page_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ process:
- az_demo_text_media_paragraph
- az_demo_splitscreen_paragraph
- az_demo_card_paragraph
- az_demo_view_paragraph
source: '@pseudo_exploded_paragraphs'

field_az_main_content:
Expand Down Expand Up @@ -119,6 +120,7 @@ migration_dependencies:
- az_demo_text_media_paragraph
- az_demo_splitscreen_paragraph
- az_demo_card_paragraph
- az_demo_view_paragraph
- az_demo_page_categories

dependencies:
Expand Down
55 changes: 55 additions & 0 deletions modules/custom/az_demo/migrations/az_demo_view_paragraph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
id: az_demo_view_paragraph
label: AZ Quickstart Demo Text with View Paragraphs
migration_tags:
- Quickstart Demo Content
- Content
dependencies:
enforced:
module:
- az_flexible_page
- az_paragraphs_view
- az_news
source:
plugin: url
data_fetcher_plugin: file
data_parser_plugin: json
urls:
- profiles/custom/az_quickstart/modules/custom/az_demo/data/az_demo_view_paragraph.json
item_selector: paragraphs
ids:
id:
type: integer
fields:
-
name: id
selector: id
trackleft marked this conversation as resolved.
Show resolved Hide resolved
-
name: title
selector: title
-
name: target_id
selector: target_id
-
name: display_id
selector: display_id
-
name: data
selector: data
-
name: bottom_spacing
selector: bottom_spacing

destination:
plugin: 'entity_reference_revisions:paragraph'
default_bundle: az_view_reference

process:
field_az_title/value: field_az_title
trackleft marked this conversation as resolved.
Show resolved Hide resolved
field_az_view_reference/display_id: display_id
field_az_view_reference/data: data
behavior_settings:
plugin: az_paragraphs_behavior_settings
paragraph_behavior_plugins:
az_default_paragraph_behavior:
az_display_settings:
bottom_spacing: bottom_spacing