feat: Added feature of embeding availability to emails#10183
feat: Added feature of embeding availability to emails#10183hariombalhara merged 25 commits intocalcom:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@Pradumn27 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for following the naming conventions! 🙏 |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Five Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
| illustration: ( | ||
| <svg | ||
| width="100%" | ||
| height="100%" | ||
| className="rounded-md" | ||
| viewBox="0 0 308 265" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg"> | ||
| <path | ||
| d="M0 1.99999C0 0.895423 0.895431 0 2 0H306C307.105 0 308 0.895431 308 2V263C308 264.105 307.105 265 306 265H2C0.895431 265 0 264.105 0 263V1.99999Z" | ||
| fill="white" | ||
| /> | ||
| <rect x="24" width="260" height="38.5" rx="6" fill="#F3F4F6" /> | ||
| <rect x="24" y="50.5" width="120" height="76" rx="6" fill="#F3F4F6" /> | ||
| <rect x="24" y="138.5" width="120" height="76" rx="6" fill="#F3F4F6" /> | ||
| <rect x="156" y="50.5" width="128" height="164" rx="6" fill="#F3F4F6" /> | ||
| <rect x="24" y="226.5" width="260" height="38.5" rx="6" fill="#F3F4F6" /> | ||
| <rect x="226" y="223.5" width="66" height="26" rx="6" fill="#292929" /> | ||
| <rect x="242" y="235.5" width="34" height="2" rx="1" fill="white" /> | ||
| </svg> | ||
| ), | ||
| }, |
There was a problem hiding this comment.
This illustration is needed from design team
| style={{ | ||
| paddingBottom: "3px", | ||
| fontSize: "13px", | ||
| color: "black", | ||
| lineHeight: "1.4", | ||
| minWidth: "30vw", | ||
| maxHeight: "60vh", | ||
| overflowY: "auto", | ||
| backgroundColor: "white", |
There was a problem hiding this comment.
Have used inline styles here as when copying the data from this div we want the style to stay intact and in copying the content the styles need to be part of the html element rather than being computed
apps/web/components/Embed.tsx
Outdated
| className="rounded-lg p-0.5 sm:max-w-[80rem]" | ||
| enableOverflow | ||
| type="creation"> | ||
| <DialogContent ref={dialogContentRef} className="rounded-lg p-0.5 sm:max-w-[80rem]" type="creation"> |
There was a problem hiding this comment.
Have removed overflow from the entire Dialog as it was leading for the entire dialog to be scrolled rather than just the child divs with overflow
| useInitializeBookerStore({ | ||
| username, | ||
| eventSlug: eventType?.slug ?? "", | ||
| eventId: eventType?.id, | ||
| layout: BookerLayouts.MONTH_VIEW, | ||
| }); |
There was a problem hiding this comment.
Need to initialise the booker store here to access the required state variables from the store in the child components
|
@PeerRich this work for the svg embed graphic? (right)
|
|
Two observations; Feel free to disregard both as @Jaibles will cover these anyway, just some feedback as early is better than later.
|
|
Agree with both comments by @emrysal. Vertical margin can just match the horizontal one.
Great work and a really cool feature 👏 |
|
Thanks for the reviews @emrysal @Jaibles , will make the changes accordingly. @Jaibles can you share the figma file for the illustration will add that too then. |
…al.com into feat/embed-in-emails
|
Have done the UI changes and also added ordering based on dates. @Jaibles @emrysal
|
|
Looks much better thank you @Pradumn27 🙏 |
hariombalhara
left a comment
There was a problem hiding this comment.
LGTM !! Amazing work @Pradumn27 🙏
|
Followup:
|
Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>


What does this PR do?
This PR adds the feature of embedding availability times to email. Have added this as another embed option where users can select their desired date and times to share and can just copy that to their email.
Technical Details:
Have added a global state of selectedDatesAndTimes this keeps track of all the selected days and the times associated with them for every eventType, have used this type for checking in the selection of multiple dates and times.
For the email preview, I had to use tables and inline styles as they worked best for our purpose of copying the content inside the divs.
Remaining Debt:
Need the illustration for this email embed from the design team.
Fixes #6533
/claim #6533
Screen.Recording.2023-07-16.at.7.09.59.PM.mov
Type of change
How should this be tested?
Mandatory Tasks