-
Notifications
You must be signed in to change notification settings - Fork 3
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
[UXIT-1680] Event Page · Include moderators and speakers #767
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Nice one Mirha! This is definitely gonna make our remote support role for FIL Bangkok smoother 😄
Aside from my two suggestions, what do you think about saving the tabs' state in the URL?
When a user clicks on View Details
and then on the brower's back button to come back to the events page, they land on the first tab, so they have to manually find where they were. With a persisted state, they would land back on the same tab.
Based on the Headless Docs and https://nuqs.47ng.com/ it should not be too difficult.
It can definitely be another PR if you think it's worth implementing.
export function ScheduleParticipants({ | ||
title, | ||
participants, | ||
}: ParticipantsProps) { | ||
return ( | ||
<p className="text-sm"> | ||
<span className="font-semibold">{title}:</span>{' '} | ||
<span>{participants.map(formatParticipant).join('; ')}</span> | ||
</p> | ||
) | ||
} | ||
|
||
function formatParticipant({ name, company }: Participant) { | ||
return `${name}, ${company}` | ||
} |
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.
UX improvement suggestion.
I find mixing commas and semicolons hard to read, it's difficult to tell if word is a person’s name or a company name when scanning the text.
Would that format be possible? Name (Company), Name (Company) and Name (Company)
I couldn't find a Figma design for this part so maybe this is already good to go.
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.
I like that! Yes, apologies, should've mentioned that there's no Figma design yet.
participants={ | ||
event.moderators as ParticipantsProps['participants'] | ||
} |
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.
If the list of participants cannot be empty, then it would be better to reflect in the schema instead of using an as
type assertion here
So here we would have:
participants={event.moderators}
And in the EventSchema
we would have:
moderators: z.array(ParticipantSchema).nonempty().optional(),
What do you think?
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, Yes! That's perfect. Thank you.
<ScheduleParticipants | ||
title="Speakers" | ||
participants={ | ||
event.speakers as ParticipantsProps['participants'] |
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.
Same comment here :)
156e286
to
11b909e
Compare
Yes - Love this. Added a ticket . 🙏🏼 |
📝 Description
This PR adds moderators and speakers fields to the event schedule configuration. This enhancement enables the content teams to include detailed information about participants in each event. Additional refactoring ensures better code organization and maintainability.
🛠️ Key Changes
moderators
andspeakers
fields to the event schedule schema.Participants
component to display event participant details, supporting both moderators and speakers.ParticipantSchema
type inzod
to define participant structure and enforce type safety.📌 To-Do Before Merging
🧪 How to Test
📸 Screenshots