Skip to content
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

Show which calendar the event belongs to at event preview #8386

Conversation

andrehgdias
Copy link
Contributor

Add calendar info, color, name, and type, at event popup and event details (search and agenda view)
Changes icon alignment to always align to the top, except when the data displayed fits in a single line, in this case it's centered.
Closes #7209

@andrehgdias andrehgdias linked an issue Jan 27, 2025 that may be closed by this pull request
@@ -202,6 +208,29 @@ export class EventPreviewView implements Component<EventPreviewViewAttrs> {
if (sanitizedDescription == null || sanitizedDescription.length === 0) return null
return this.renderRow(Icons.AlignLeft, [m.trust(sanitizedDescription)], true)
}

private renderCalendar(calendarName: string | undefined, calendarColor: string | undefined, calendarRenderType: TranslationKey | undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Any specific reason for using string | undefined instead of ?: string ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll raise error instead of returning null/undefined. This values should never be undefined.

Add calendar info, color, name, and type, at event popup and event
details (search and agenda view)
Changes icon alignment to always align to the top, except when the
data displayed fits in a single line, in this case it's centered.
@andrehgdias andrehgdias force-pushed the 7209-calendar-events-show-which-calendar-they-belong-to branch from ae24e11 to cacd38c Compare February 7, 2025 10:47
@andrehgdias andrehgdias merged commit cacd38c into dev-calendar Feb 7, 2025
6 checks passed
@andrehgdias andrehgdias deleted the 7209-calendar-events-show-which-calendar-they-belong-to branch February 7, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calendar events show which calendar they belong to
2 participants