Skip to content

Conversation

@arthurlorenz
Copy link

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"

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

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

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];

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">

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