Skip to content

feat: Support Lupus Decoupled Drupal recipes.#5

Draft
arthurlorenz wants to merge 3 commits into1.xfrom
feature/recipes-2.x
Draft

feat: Support Lupus Decoupled Drupal recipes.#5
arthurlorenz wants to merge 3 commits into1.xfrom
feature/recipes-2.x

Conversation

@arthurlorenz
Copy link
Copy Markdown

No description provided.

@arthurlorenz arthurlorenz changed the title Feature/recipes 2.x feat: Support Lupus Decoupled Drupal recipes. Sep 3, 2025
<div class="lg:flex lg:justify-around">
<component
:is="renderCustomElements(row)"
v-for="(row, index) in rows"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

index is following row, looks strange


const formatDate = (dateString: string) => {
if (!dateString) return '';
const date = new Date(dateString);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor: but why not format the date with the formatter on the backend?

created?: string;
}>();

const formatDate = (dateString: string) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would make sense to move it into composable to avoid defining it multiple times?

defineProps<{
title?: String;
path?: object;
featuredImage?: CustomElementContent;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe define as slot also?

Copy link
Copy Markdown

@ivangrozni ivangrozni left a comment

Choose a reason for hiding this comment

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

Looks good. Added some nitpicky comments that needs a second check.

<div class="bg-white rounded-lg shadow-md p-6 mb-8">
<div v-if="date" class="mb-4">
<h3 class="text-lg font-semibold mb-2">Date:</h3>
<p>{{ formatDate(date.value) }} - {{ formatDate(date.endValue) }}</p>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this a defined structure? (endDate is sometimes optional)

if (props.geofield) {
return [props.geofield.lat, props.geofield.lon];
}
return [0, 0];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe find a better default location than south of coast of Africa.
Or maybe we could add a check that doesn't display the location if 0,0 is output although null response would be better in that case

</div>
</div>
<div v-if="personEmail && personEmail.length > 0" class="mb-4">
<div v-for="(email, index) in personEmail" :key="index" class="flex items-center gap-2 text-gray-700 dark:text-gray-300">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

referring to my first comment, looks like this is a pattern, index comes last

sections?: object;
title?: string;
featuredImage?: object;
clientLogo?: object;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's differ CustomElementContent vs some object? link is not very nice like this, would it make sense to flatten?

const { renderCustomElements } = useDrupalCe()
defineProps<{
title?: String;
path?: object;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there is now some solution for the path I think latest CE-release has some special formatter, see 3.1 release notes

};
locationName?: string;
locationAddress?: {
addressLine1: string;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oh I was not aware it works like this also, that's nice, maybe we could use that for the link structure also?

// Layout-builder support.
sections?: object;
title?: string;
featuredImage?: object;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CustomElementContent, Slot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants