fix(coss-ui): convert /settings/my-account/general to coss-ui (#26053)
* fix(coss-ui): convert /settings/my-account/general to coss-ui * update guide * fix: add menuPosition fixed to TimezoneSelect in TravelScheduleModal Co-Authored-By: [email protected] <[email protected]> * fix: use menuPortalTarget to render TimezoneSelect dropdown above dialog footer Co-Authored-By: [email protected] <[email protected]> * fix: use Object.assign for type-safe styles in TimezoneSelect Co-Authored-By: [email protected] <[email protected]> * revert comment * fix: guard document access for SSR in TravelScheduleModal Addresses Cubic AI review feedback: menuPortalTarget={document.body} will throw during server rendering where document is undefined. Added typeof check to guard against SSR. Co-Authored-By: unknown <> * change dialog backdrop from blur to dim * fix: add menuPlacement auto to open dropdown upward on mobile Co-Authored-By: [email protected] <[email protected]> * fix: use menuPlacement top on mobile for TimezoneSelect dropdown Co-Authored-By: [email protected] <[email protected]> * fix: make timezone button stack vertically on mobile to prevent overflow Co-Authored-By: [email protected] <[email protected]> * fix: make timezone select and button 50/50 width on larger viewports Co-Authored-By: [email protected] <[email protected]> * fix date range picker issue on mobile * prevent travel schedule dialog dismissal with date picker --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
7 files changed
+1195
-83
No files matched your search
@@ -2,22 +2,21 @@
|
||||
|
||||
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { SkeletonButton, SkeletonContainer, SkeletonText } from "@calcom/ui/components/skeleton";
|
||||
import { Skeleton } from "@coss/ui/components/skeleton";
|
||||
|
||||
export const SkeletonLoader = () => {
|
||||
const { t } = useLocale();
|
||||
return (
|
||||
<SettingsHeader title={t("general")} description={t("general_description")} borderInShellHeader={true}>
|
||||
<SkeletonContainer>
|
||||
<div className="space-y-6">
|
||||
<div className="border-subtle stack-y-6 rounded-b-xl border border-t-0 px-4 py-8 sm:px-6">
|
||||
<SkeletonText className="h-8 w-full" />
|
||||
<SkeletonText className="h-8 w-full" />
|
||||
<SkeletonText className="h-8 w-full" />
|
||||
<SkeletonText className="h-8 w-full" />
|
||||
|
||||
<SkeletonButton className="ml-auto h-8 w-20 rounded-md p-5" />
|
||||
<Skeleton className="h-8 w-full" />
|
||||
<Skeleton className="h-8 w-full" />
|
||||
<Skeleton className="h-8 w-full" />
|
||||
<Skeleton className="h-8 w-full" />
|
||||
<Skeleton className="ml-auto h-8 w-20 rounded-md p-5" />
|
||||
</div>
|
||||
</SkeletonContainer>
|
||||
</div>
|
||||
</SettingsHeader>
|
||||
);
|
||||
};
|
||||
@@ -204,8 +204,8 @@ const GeneralView = ({ user, travelSchedules }: GeneralViewProps) => {
|
||||
<Label className="text-emphasis mt-6">
|
||||
<>{t("timezone")}</>
|
||||
</Label>
|
||||
<div className="flex items-end gap-2">
|
||||
<div className="flex-1">
|
||||
<div className="flex flex-col gap-2 sm:flex-row sm:items-end">
|
||||
<div className="w-full sm:w-1/2">
|
||||
<TimezoneSelect
|
||||
id="timezone"
|
||||
value={value}
|
||||
@@ -219,6 +219,7 @@ const GeneralView = ({ user, travelSchedules }: GeneralViewProps) => {
|
||||
</div>
|
||||
{!watchedTzSchedules.length && (
|
||||
<Button
|
||||
className="w-full sm:w-1/2"
|
||||
color="secondary"
|
||||
StartIcon="calendar"
|
||||
onClick={() => setIsTZScheduleOpen(true)}
|
||||
@@ -413,7 +414,7 @@ const GeneralView = ({ user, travelSchedules }: GeneralViewProps) => {
|
||||
/>
|
||||
<TravelScheduleModal
|
||||
open={isTZScheduleOpen}
|
||||
onOpenChange={() => setIsTZScheduleOpen(false)}
|
||||
onOpenChange={setIsTZScheduleOpen}
|
||||
setValue={formMethods.setValue}
|
||||
existingSchedules={formMethods.getValues("travelSchedules") ?? []}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user