chore: UX Fixes (#26643)

* Copy changes

* Move search bar inline with new button

* Get rid of no more results message

* Change hidden badge to (hidden)

* Remove Cal.ai badge from sidebar

* Add dropdown to create button when there is multiple options

* Fix delete dialog

* Saved filters updates

* More string fixes

* Switch members table to use names

* Fix member spacing

* Fix routing form identifier field

* Fix routing forms stuff

* Only show SMS hint on SMS options

* Make workflow delete button minimal

* Fix padding on workflow steps

* Remove min width on workflow title

* Fix delete workflow PR

* Fix org profile buttons

* Fix org profile screen partially scrolled down

* Improve logos & banner uploads

* Personal profile fixes

* Fix settings general view stuff

* Sentence case consistency

* Fix stuff I broke

* Fix fab

* Fix hidden translation string

* Fix text fields

* Make button small for solo users too

* fix: update E2E tests to match sentence case labels in routing forms

* fix: update tests to match sentence case label changes

- insights.e2e.ts: chart titles (14 strings)
- event-types.e2e.ts: Organizer phone number location
- EditLocationDialog.test.tsx: phone number labels

* fix: address Cubic AI review feedback (confidence 9+)

- Replace hardcoded text-gray-500 with text-muted in TextField.tsx hint section
- Replace text locator with data-testid in E2E test for location select

Co-Authored-By: unknown <>

* fix: update E2E tests for sentence case label changes

- Use data-testid selectors for location options (more reliable than text)
- Update field identifiers in routing-forms tests to match new labels
- Fix Long text selector in manage-booking-questions test

* fix: replace text locator with data-testid in manage-booking-questions E2E test

Replace fragile text="Long text" locator with resilient
page.getByTestId("select-option-textarea") selector per E2E best practices.

Addresses Cubic AI review feedback (confidence 9/10).

Co-Authored-By: unknown <>

* fix: use .last() for multiple location select items

---------

Co-authored-by: Pedro Castro <pedro@cal.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Bailey Pumfleet
2026-01-13 00:56:08 -05:00
committed by GitHub
co-authored by unknown <> Pedro Castro Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 32d97fbea4
commit 7c66f33de2
31 changed files with 3350 additions and 1887 deletions
@@ -6,7 +6,13 @@ import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Avatar } from "@calcom/ui/components/avatar";
import { Sheet, SheetContent, SheetBody, SheetHeader, SheetFooter } from "@calcom/ui/components/sheet";
import {
Sheet,
SheetContent,
SheetBody,
SheetHeader,
SheetFooter,
} from "@calcom/ui/components/sheet";
import { Loader } from "@calcom/ui/components/skeleton";
import type { UserTableAction, UserTableState } from "../types";
@@ -36,15 +42,19 @@ export function EditUserSheet({
const { t } = useLocale();
const { user: selectedUser } = state.editSheet;
const orgBranding = useOrgBranding();
const [editMode, setEditMode] = useEditMode((state) => [state.editMode, state.setEditMode], shallow);
const { data: loadedUser, isPending } = trpc.viewer.organizations.getUser.useQuery(
{
userId: selectedUser?.id,
},
{
enabled: !!selectedUser?.id,
}
const [editMode, setEditMode] = useEditMode(
(state) => [state.editMode, state.setEditMode],
shallow
);
const { data: loadedUser, isPending } =
trpc.viewer.organizations.getUser.useQuery(
{
userId: selectedUser?.id,
},
{
enabled: !!selectedUser?.id,
}
);
const { data: usersAttributes, isPending: usersAttributesPending } =
trpc.viewer.attributes.getByUserId.useQuery(
@@ -57,11 +67,15 @@ export function EditUserSheet({
}
);
const avatarURL = `${orgBranding?.fullDomain ?? WEBAPP_URL}/${loadedUser?.username}/avatar.png`;
const avatarURL = `${orgBranding?.fullDomain ?? WEBAPP_URL}/${
loadedUser?.username
}/avatar.png`;
const schedulesNames = loadedUser?.schedules && loadedUser?.schedules.map((s) => s.name);
const schedulesNames =
loadedUser?.schedules && loadedUser?.schedules.map((s) => s.name);
const teamNames =
loadedUser?.teams && loadedUser?.teams.map((t) => `${t.name} ${!t.accepted ? "(pending)" : ""}`);
loadedUser?.teams &&
loadedUser?.teams.map((t) => `${t.name} ${!t.accepted ? "(pending)" : ""}`);
return (
<Sheet
@@ -69,19 +83,25 @@ export function EditUserSheet({
onOpenChange={() => {
setEditMode(false);
dispatch({ type: "CLOSE_MODAL" });
}}>
}}
>
<SheetContent className="bg-default">
{!isPending && loadedUser ? (
<>
{!editMode ? (
<>
<SheetHeader showCloseButton={false} className="w-full">
<div className="border-sublte bg-default w-full rounded-xl border p-4">
<div className="border-subtle bg-default w-full rounded-xl border p-4">
<OrganizationBanner />
<div className="bg-default ml-3 w-fit translate-y-[-50%] rounded-full p-1 ring-1 ring-[#0000000F]">
<Avatar asChild size="lg" alt={`${loadedUser?.name} avatar`} imageSrc={avatarURL} />
<Avatar
asChild
size="lg"
alt={`${loadedUser?.name} avatar`}
imageSrc={avatarURL}
/>
</div>
<h2 className="text-emphasis font-sans text-2xl font-semibold">
<h2 className="text-emphasis font-sans text-2xl font-semibold -mt-8">
{loadedUser?.name || "Nameless User"}
</h2>
<p className="text-subtle max-h-[3em] overflow-hidden text-ellipsis text-sm font-normal">
@@ -91,49 +111,79 @@ export function EditUserSheet({
</SheetHeader>
<SheetBody className="stack-y-4 flex flex-col p-4">
<div className="stack-y-4 mb-4 flex flex-col">
<h3 className="text-emphasis mb-1 text-base font-semibold">{t("profile")}</h3>
<h3 className="text-emphasis mb-1 text-base font-semibold">
{t("profile")}
</h3>
<DisplayInfo
label="Cal"
value={removeProtocol(
`${orgBranding?.fullDomain ?? WEBAPP_URL}/${loadedUser?.username}`
`${orgBranding?.fullDomain ?? WEBAPP_URL}/${
loadedUser?.username
}`
)}
icon="external-link"
/>
<DisplayInfo label={t("email")} value={loadedUser?.email ?? ""} icon="at-sign" />
<DisplayInfo label={t("role")} value={[loadedUser?.role ?? ""]} icon="fingerprint" />
<DisplayInfo label={t("timezone")} value={loadedUser?.timeZone ?? ""} icon="clock" />
<DisplayInfo
label={t("email")}
value={loadedUser?.email ?? ""}
icon="at-sign"
/>
<DisplayInfo
label={t("role")}
value={[loadedUser?.role ?? ""]}
icon="fingerprint"
/>
<DisplayInfo
label={t("timezone")}
value={loadedUser?.timeZone ?? ""}
icon="clock"
/>
<DisplayInfo
label={t("teams")}
value={!teamNames || teamNames.length === 0 ? "" : teamNames}
value={
!teamNames || teamNames.length === 0 ? "" : teamNames
}
icon="users"
coloredBadges
/>
<DisplayInfo
label={t("availability")}
value={!schedulesNames || schedulesNames.length === 0 ? "" : schedulesNames}
value={
!schedulesNames || schedulesNames.length === 0
? ""
: schedulesNames
}
icon="calendar"
/>
</div>
{canViewAttributes && usersAttributes && usersAttributes?.length > 0 && (
<div className="mt-4 flex flex-col">
<h3 className="text-emphasis mb-5 text-base font-semibold">{t("attributes")}</h3>
<div className="stack-y-4 flex flex-col">
{usersAttributes.map((attribute, index) => (
<>
<DisplayInfo
key={index}
label={attribute.name}
value={
["TEXT", "NUMBER", "SINGLE_SELECT"].includes(attribute.type)
? attribute.options[0].value
: attribute.options.map((option) => option.value)
}
/>
</>
))}
{canViewAttributes &&
usersAttributes &&
usersAttributes?.length > 0 && (
<div className="mt-4 flex flex-col">
<h3 className="text-emphasis mb-5 text-base font-semibold">
{t("attributes")}
</h3>
<div className="stack-y-4 flex flex-col">
{usersAttributes.map((attribute, index) => (
<>
<DisplayInfo
key={index}
label={attribute.name}
value={
["TEXT", "NUMBER", "SINGLE_SELECT"].includes(
attribute.type
)
? attribute.options[0].value
: attribute.options.map(
(option) => option.value
)
}
/>
</>
))}
</div>
</div>
</div>
)}
)}
</SheetBody>
<SheetFooter>
<SheetFooterControls