Skip to content

added layout for empty month to go to the next month#6011

Merged
PeerRich merged 7 commits intomainfrom
5799-cal-508-public-booking-show-no-times-in-month-notice
Dec 14, 2022
Merged

added layout for empty month to go to the next month#6011
PeerRich merged 7 commits intomainfrom
5799-cal-508-public-booking-show-no-times-in-month-notice

Conversation

@PeerRich
Copy link
Copy Markdown
Member

@PeerRich PeerRich commented Dec 13, 2022

fixes #5799

CleanShot 2022-12-13 at 19 06 06

TODO

  • only show when month is empty (after data received)

@PeerRich PeerRich linked an issue Dec 13, 2022 that may be closed by this pull request
@linear
Copy link
Copy Markdown

linear Bot commented Dec 13, 2022

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 13, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
cal ✅ Ready (Inspect) Visit Preview Dec 14, 2022 at 10:39PM (UTC)

"disable_app": "Disable App",
"disable_app_description": "Disabling this app could cause problems with how your users interact with Cal",
"edit_keys": "Edit Keys",
"apps_description": "Enable apps for your instance of Cal",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

there was a duplicate string introduced previously

return (
<>
<Meta title={t("apps")} description={t("apps_description")} />
<Meta title={t("apps")} description={t("admin_apps_description")} />
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

there was a duplicate string introduced previously

Comment thread packages/ui/v2/modules/booker/DatePicker.tsx Outdated
@PeerRich PeerRich added ♻️ autoupdate tells kodiak to keep this branch up-to-date automerge labels Dec 14, 2022
Comment on lines +77 to +78
month: string | null;
nextMonthButton: () => void;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

there are probably better types for this

Comment on lines +108 to +109
month: string | null;
nextMonthButton: (newMonth: number) => void;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

there are probably better types for this

</div>
))}

{!props.isLoading && includedDates && includedDates?.length === 0 && (
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

there is a very short flicker like 0.1ms on first load. maybe there is another prop we can check for here

Comment on lines +254 to +255
month={month}
nextMonthButton={() => changeMonth(+1)}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we need these two props for the overlay. preferably we move the component out of <Days> and do all the calculation on the backend to speed up the frontend.

it should be:

{isNotAvailable ? <NoAvailabilityOverlay/> : <Days/>}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On the other hand this would make this UI fairly difficult, as both Days and the overlay are being drawn.
image

@PeerRich PeerRich enabled auto-merge (squash) December 14, 2022 22:34
Copy link
Copy Markdown
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

I like it, couldn't reproduce the flicker on my end by the way. Works great!

@PeerRich PeerRich merged commit cf6efab into main Dec 14, 2022
@PeerRich PeerRich deleted the 5799-cal-508-public-booking-show-no-times-in-month-notice branch December 14, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge ♻️ autoupdate tells kodiak to keep this branch up-to-date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-508] /public booking - Show "No times in month" notice

2 participants