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-231 - Add MaterialGridLinkAutomatic app #1673

Merged

Conversation

kasperbirch1
Copy link
Contributor

@kasperbirch1 kasperbirch1 commented Jan 30, 2025

Link to issue

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

Description

This pull request introduces the MaterialGridLinkAutomatic app, which is largely based on MaterialGridAutomatic. The MaterialGridAutomatic will be deprecated in the feature.

This update integrating support for location and sublocation parameters in useComplexSearchWithPaginationQuery. These parameters are now extracted from the link field within the newly introduced material_grid_link_automatic paragraph type in dpl-cms.

Test

https://varnish.pr-2026.dpl-cms.dplplat01.dpl.reload.dk/paragraph-side

image

This implementation is largely based on `MaterialGridAutomatic`, which is planned for deprecation. The update is required to support the `location` and `sublocation` parameters in `useComplexSearchWithPaginationQuery`.

These parameters are extracted from the `link` field of the new `material_grid_link_automatic` paragraph type in `dpl-cms`.
@kasperbirch1 kasperbirch1 force-pushed the DDFBRA-231-paragraph-material-grid-link-automatic branch from 02b9af7 to 06af065 Compare January 30, 2025 10:15
@spaceo spaceo self-requested a review February 5, 2025 12:03
@spaceo spaceo removed their assignment Feb 5, 2025
Copy link
Contributor

@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.

LGTM 👍
I have one comment to consider

export interface MaterialGridLinkAutomaticEntryProps
extends GlobalEntryTextProps,
MaterialGridLinkAutomaticEntryConfigProps {
link: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

If you use the url siffix on this prop you dont have to cast it to an url (via new URL) later on

Standardizes the `link` prop by ensuring it is always cast to a `URL` object at the point of assignment. By enforcing a consistent type, we prevent potential issues arising from mixed string and URL usage throughout the application.
@kasperbirch1 kasperbirch1 merged commit ee0d14f into develop Feb 6, 2025
20 checks passed
@kasperbirch1 kasperbirch1 deleted the DDFBRA-231-paragraph-material-grid-link-automatic branch February 6, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants