-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Support Lupus Decoupled Drupal recipes. #5
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
base: 1.x
Are you sure you want to change the base?
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.
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); |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
ivangrozni
left a comment
There was a problem hiding this 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> |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CustomElementContent, Slot?
No description provided.