feat: Support Lupus Decoupled Drupal recipes.#5
Conversation
| <div class="lg:flex lg:justify-around"> | ||
| <component | ||
| :is="renderCustomElements(row)" | ||
| v-for="(row, index) in rows" |
There was a problem hiding this comment.
index is following row, looks strange
|
|
||
| const formatDate = (dateString: string) => { | ||
| if (!dateString) return ''; | ||
| const date = new Date(dateString); |
There was a problem hiding this comment.
minor: but why not format the date with the formatter on the backend?
| created?: string; | ||
| }>(); | ||
|
|
||
| const formatDate = (dateString: string) => { |
There was a problem hiding this comment.
would make sense to move it into composable to avoid defining it multiple times?
| defineProps<{ | ||
| title?: String; | ||
| path?: object; | ||
| featuredImage?: CustomElementContent; |
ivangrozni
left a comment
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Is this a defined structure? (endDate is sometimes optional)
| if (props.geofield) { | ||
| return [props.geofield.lat, props.geofield.lon]; | ||
| } | ||
| return [0, 0]; |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
referring to my first comment, looks like this is a pattern, index comes last
| sections?: object; | ||
| title?: string; | ||
| featuredImage?: object; | ||
| clientLogo?: object; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
No description provided.