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 new event button in Agenda view when it's empty (for single and two columns layout) #7143

Closed

Conversation

andrehgdias
Copy link
Contributor

Closes #7139
image

@andrehgdias andrehgdias force-pushed the 7139-new-event-button-at-the-agenda-view branch 3 times, most recently from 00cd332 to 023aa4e Compare July 1, 2024 07:49
@andrehgdias andrehgdias marked this pull request as draft July 1, 2024 07:51
@andrehgdias andrehgdias force-pushed the 7139-new-event-button-at-the-agenda-view branch 2 times, most recently from dcf2a1c to 6f4e46d Compare July 1, 2024 08:07
@andrehgdias andrehgdias marked this pull request as ready for review July 1, 2024 08:09
@murilopereirame murilopereirame linked an issue Jul 3, 2024 that may be closed by this pull request
2 tasks
@murilopereirame murilopereirame changed the base branch from dev-mail to dev-calendar July 3, 2024 11:09
@@ -61,3 +64,20 @@ export class BaseButton implements ClassComponent<BaseButtonAttrs> {
function booleanToAttributeValue(value: boolean | null | undefined): string | null {
return value != null ? String(value) : null
}

export function renderNewEventButton(buttonAttrs: { label: TranslationKey; click: ClickHandler; style?: Record<string, any> }): Children {
Copy link
Contributor

Choose a reason for hiding this comment

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

The name should be more generic in this case since this button is also used to create a new email.

@@ -61,3 +64,20 @@ export class BaseButton implements ClassComponent<BaseButtonAttrs> {
function booleanToAttributeValue(value: boolean | null | undefined): string | null {
return value != null ? String(value) : null
}

export function renderNewEventButton(buttonAttrs: { label: TranslationKey; click: ClickHandler; style?: Record<string, any> }): Children {
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't a base button, it's worthwhile to have it's own file

label: "newEvent_action",
click: () => attrs.onCreateEvent?.(),
style: {
"margin-top": ".6rem",
Copy link
Contributor

Choose a reason for hiding this comment

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

We have some utility classes for sizing and margins that we should use to keep the spacing standardized, take a look at main-styles.ts#L266

@andrehgdias andrehgdias force-pushed the 7139-new-event-button-at-the-agenda-view branch 2 times, most recently from 7c8d073 to 2469943 Compare July 9, 2024 08:14
@andrehgdias andrehgdias changed the base branch from dev-calendar to 7147-update-settings-for-standalone-calendar-app July 9, 2024 08:32
@andrehgdias andrehgdias changed the base branch from 7147-update-settings-for-standalone-calendar-app to dev-calendar July 9, 2024 08:41
@andrehgdias andrehgdias force-pushed the 7139-new-event-button-at-the-agenda-view branch from 2469943 to 0b908e7 Compare July 9, 2024 08:42
@andrehgdias andrehgdias force-pushed the 7139-new-event-button-at-the-agenda-view branch from 0b908e7 to e3259b4 Compare July 18, 2024 11:26
@andrehgdias andrehgdias force-pushed the 7139-new-event-button-at-the-agenda-view branch from e3259b4 to 24f5c3c Compare July 19, 2024 08:48
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.

New event button at the Agenda view when it's empty
4 participants