From 142be70b893490b00ca7042c26cbac6b07b0281d Mon Sep 17 00:00:00 2001 From: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Date: Wed, 26 Oct 2022 20:59:01 +0530 Subject: [PATCH] fix: overflow text, ui bugs (#5071) * fix: overflow text, ui bugs * fix: merge conflict * fix: availability buttons ui * fix: mobile view added for /event-type header * fix: dropdown closing bug on mobile Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> --- .../v2/eventtype/AvailabilityTab.tsx | 21 ++++++++++------- .../components/v2/eventtype/EventSetupTab.tsx | 4 ++-- .../v2/eventtype/EventTypeSingleLayout.tsx | 23 ++++++++++++++++--- packages/app-store/_components/AppCard.tsx | 4 ++-- packages/ui/v2/core/Shell.tsx | 8 +++---- 5 files changed, 41 insertions(+), 19 deletions(-) diff --git a/apps/web/components/v2/eventtype/AvailabilityTab.tsx b/apps/web/components/v2/eventtype/AvailabilityTab.tsx index fd131f7afa..aa130bbca8 100644 --- a/apps/web/components/v2/eventtype/AvailabilityTab.tsx +++ b/apps/web/components/v2/eventtype/AvailabilityTab.tsx @@ -129,37 +129,41 @@ export const AvailabilityTab = () => { /> -
+
    {weekdayNames(i18n.language, 1, "long").map((day, index) => { const isAvailable = !!filterDays(index).length; return (
  1. - + {day} {isLoading ? ( ) : isAvailable ? ( -
    +
    {filterDays(index).map((dayRange, i) => (
    - {format(dayRange.startTime)} - - + {format(dayRange.startTime)} + -
    {format(dayRange.endTime)}
    ))}
    ) : ( - {t("unavailable")} + {t("unavailable")} )}
  2. ); })}

-
- +
+ {schedule?.timeZone || } @@ -168,6 +172,7 @@ export const AvailabilityTab = () => { color="minimal" EndIcon={Icon.FiExternalLink} target="_blank" + className="justify-center border sm:border-0" rel="noopener noreferrer"> {t("edit_availability")} diff --git a/apps/web/components/v2/eventtype/EventSetupTab.tsx b/apps/web/components/v2/eventtype/EventSetupTab.tsx index c97f1eda88..1a7eaf7e35 100644 --- a/apps/web/components/v2/eventtype/EventSetupTab.tsx +++ b/apps/web/components/v2/eventtype/EventSetupTab.tsx @@ -132,14 +132,14 @@ export const EventSetupTab = ( } return (
  • -
    +
    {`${eventLocationType.label} - + {location[eventLocationType.defaultValueVariable] || eventLocationType.label}
    diff --git a/apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx b/apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx index 63e6f55622..1f7437fb59 100644 --- a/apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx +++ b/apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx @@ -23,6 +23,7 @@ import { } from "@calcom/ui/v2"; import ConfirmationDialogContent from "@calcom/ui/v2/core/ConfirmationDialogContent"; import { Dialog } from "@calcom/ui/v2/core/Dialog"; +import Divider from "@calcom/ui/v2/core/Divider"; import Dropdown, { DropdownMenuContent, DropdownMenuItem, @@ -172,11 +173,11 @@ function EventTypeSingleLayout({ subtitle={eventType.description || ""} CTA={
    -
    +
    + className="mt-2 hidden cursor-pointer self-center whitespace-nowrap pr-2 sm:inline"> {t("hide_from_profile")} - + @@ -264,6 +265,22 @@ function EventTypeSingleLayout({ {t("delete")} + +
    + + {t("hide_from_profile")} + + { + formMethods.setValue("hidden", e); + }} + /> +
    diff --git a/packages/app-store/_components/AppCard.tsx b/packages/app-store/_components/AppCard.tsx index c1a1f1753a..515bf27965 100644 --- a/packages/app-store/_components/AppCard.tsx +++ b/packages/app-store/_components/AppCard.tsx @@ -26,8 +26,8 @@ export default function AppCard({ const [animationRef] = useAutoAnimate(); return ( -
    -
    +
    +
    {/* Don't know why but w-[42px] isn't working, started happening when I started using next/dynamic */} diff --git a/packages/ui/v2/core/Shell.tsx b/packages/ui/v2/core/Shell.tsx index ef8eb8a473..6c25e8faf0 100644 --- a/packages/ui/v2/core/Shell.tsx +++ b/packages/ui/v2/core/Shell.tsx @@ -785,12 +785,12 @@ export function ShellMain(props: LayoutProps) {
    {props.HeadingLeftIcon &&
    {props.HeadingLeftIcon}
    }
    {props.heading && ( -

    +

    {!isLocaleReady ? : props.heading}

    )} @@ -830,7 +830,7 @@ function MainContainer({ const [sideContainerOpen, setSideContainerOpen] = props.drawerState || [false, noop]; return ( -
    +
    {/* show top navigation for md and smaller (tablet and phones) */} {TopNavContainerProp} {/* The following is used for settings navigation on medium and smaller screens */} @@ -844,7 +844,7 @@ function MainContainer({ }} /> {SettingsSidebarContainerProp} -
    +
    {/* add padding to top for mobile when App Bar is fixed */}