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

DDFBRA-390 - Added GO Material Slider paragraphs #1997

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

Dresse
Copy link
Contributor

@Dresse Dresse commented Jan 21, 2025

Link to issue

https://reload.atlassian.net/browse/DDFBRA-390

Description

Added two new GO paragraphs:

  • GO Material Slider - Automatic
  • GO Material Slider - Manual

Enabled both of them for all GO specific content types (GO Article, GO Category, GO Page)

Enabled both paragraphs in GraphQL Compose.

Also enabled GO Linkbox paragraph for all GO specific content types and enabled it in GraphQL Compose.

Screenshot of the result

GO Material Slider - Automatic in Drupal backend:
Screenshot 2025-01-21 at 16 02 38

GO Material Slider - Manual in Drupal backend:
Screenshot 2025-01-21 at 16 03 45

Additional comments or questions

Example GraphQL query for fetching a GO Page containing a both "GO Material Slider - Automatic" and "GO Material Slider - Manual":

query MyQuery {
  route(path: "test-page") {
    ... on RouteInternal {
      __typename
      entity {
        ... on NodeGoPage {
          id
          paragraphs {
            ... on ParagraphGoMaterialSliderAutomatic {
              id
              cqlSearch {
                value
              }
              title
              sliderAmountOfMaterials
            }
            ... on ParagraphGoMaterialSliderManual {
              id
              title
              materialSliderWorkIds {
                material_type
                work_id
              }
            }
          }
        }
      }
    }
  }
}

Result

{
  "data": {
    "route": {
      "__typename": "RouteInternal",
      "entity": {
        "id": "1dcf347c-2ab1-485a-94a1-954958679291",
        "paragraphs": [
          {
            "id": "cdd4b451-2a0e-4c17-877a-b9d32cd20f13",
            "cqlSearch": {
              "value": "'gardening' AND term.mainlanguage= 'engelsk' AND 'garden' OR 'vegetables' AND term.accesstype='online'"
            },
            "title": "GO Material Slider - Automatic",
            "sliderAmountOfMaterials": 8
          },
          {
            "id": "4f6eb42a-bb40-42bf-ac7b-b41566c9ea56",
            "title": "GO Material Slider - Manual",
            "materialSliderWorkIds": [
              {
                "material_type": "bog",
                "work_id": "work-of:870970-basis:22252852"
              }
            ]
          }
        ]
      }
    }
  }
}

- GO Material Slider - Automatic
- GO Material Slider - Manual

Enabled both of them for all GO specific content types (GO Article, GO Category, GO Page)

Enabled both paragraphs in GraphQL Compose.

Also enabled GO Linkbox paragraph for all GO specific content types and enabled it in GraphQL Compose.
Copy link
Collaborator

@spaceo spaceo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Najs. LGTM 👍
I have some comments

In the WorkIdType renamed the field "value" -> "work_id" for better readability.
Fixed typo in the "GO Material Slider - Manual" paragraph. Renamed it from "Mannual" -> "Manual"
@Dresse Dresse merged commit 13a0911 into develop Jan 22, 2025
21 checks passed
@Dresse Dresse deleted the DDFBRA-390-add-material-slider-paragraphs branch January 22, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants