Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve responsiveness of User Details page #10714

Merged
merged 33 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ea4a69b
improved tablet view responsiveness
Tanuj1718 Feb 3, 2025
85bfad8
solved i18n issue
Tanuj1718 Feb 4, 2025
09f613a
Merge branch 'develop' into develop
Tanuj1718 Feb 4, 2025
158d709
update mobile view responsiveness
Tanuj1718 Feb 4, 2025
b39654d
Merge branch 'develop' into develop
Tanuj1718 Feb 4, 2025
c4586e6
added responsiveness in organization users page
Tanuj1718 Feb 5, 2025
ea48433
Merge branch 'develop' into develop
Tanuj1718 Feb 5, 2025
73c1773
minor change in button
Tanuj1718 Feb 5, 2025
5283828
Merge branch 'develop' of https://github.com/Tanuj1718/care_fe into d…
Tanuj1718 Feb 5, 2025
ffdb6df
draft pr
Tanuj1718 Feb 5, 2025
f46c2eb
modified date-field handlers
Jacobjeevan Feb 5, 2025
4dfd361
minor cleanup
Jacobjeevan Feb 5, 2025
70eca3e
Merge branch 'develop' into fix-issue
Tanuj1718 Feb 6, 2025
6f00675
Merge branch 'develop' into fix-issue
Tanuj1718 Feb 6, 2025
e1b3c37
revert unwanted changes
Tanuj1718 Feb 6, 2025
a32aeef
fix responsiveness
Tanuj1718 Feb 9, 2025
6d12bf1
Merge branch 'develop' into fix-ui
Tanuj1718 Feb 9, 2025
ebdc962
minor change
Tanuj1718 Feb 10, 2025
ad685aa
Merge remote-tracking branch 'upstream/develop' into fix-ui
Tanuj1718 Feb 10, 2025
fbe0648
Merge branch 'fix-ui' of https://github.com/Tanuj1718/care_fe into fi…
Tanuj1718 Feb 10, 2025
5a4a397
Merge remote-tracking branch 'upstream/develop' into fix-ui
Tanuj1718 Feb 11, 2025
0474c0b
Merge remote-tracking branch 'upstream/develop' into fix-ui
Tanuj1718 Feb 16, 2025
ffdbb95
solved type error
Tanuj1718 Feb 16, 2025
4db802e
updated with requested changes
Tanuj1718 Feb 17, 2025
b366d3e
Merge remote-tracking branch 'upstream/develop' into fix-ui
Tanuj1718 Feb 20, 2025
b61eec4
update ui
Tanuj1718 Feb 20, 2025
de6422a
updated code
Tanuj1718 Feb 20, 2025
ad537e2
minor updation
Tanuj1718 Feb 20, 2025
7cc0b7e
minor changes
Tanuj1718 Feb 21, 2025
49ef1b6
minor changes
Tanuj1718 Feb 21, 2025
5a35122
Merge remote-tracking branch 'upstream/develop' into fix-ui2
Tanuj1718 Feb 28, 2025
a254028
minor cleanup
Tanuj1718 Feb 28, 2025
a854327
Merge branch 'develop' into fix-ui2
nihal467 Mar 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions src/components/Users/UserBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { TooltipComponent } from "@/components/ui/tooltip";

import { Avatar } from "@/components/Common/Avatar";

import { formatDisplayName, formatName } from "@/Utils/utils";
Expand All @@ -12,29 +14,36 @@ export default function UserBanner({ userData }: { userData: UserBase }) {

return (
<div className="mt-2 flex flex-col justify-between gap-3 sm:flex-row">
<div className="mb-3 flex w-full flex-col justify-between gap-3 rounded bg-white p-3 shadow-sm transition-all duration-200 ease-in-out sm:flex-row md:p-6">
<div className="mb-3 flex flex-col w-full justify-between gap-3 rounded p-3 shadow-sm transition-all duration-200 ease-in-out sm:flex-row md:p-6">
<div className="flex flex-row gap-2 self-center">
<Avatar
imageUrl={userData?.profile_picture_url}
name={formatDisplayName(userData)}
className="h-20 w-20 md:mr-2 lg:mr-3 lg:h-16 lg:w-16"
className="h-20 w-20 md:mr-2 shrink-0"
/>
<div className="flex flex-col self-center">
<div className="grid grid-cols-1 self-center">
<div className="flex flex-row items-center gap-3">
<h1 className="text-xl font-bold" id="users-name">
{formatName(userData)}
</h1>
<TooltipComponent content={formatName(userData)} side="top">
<h1 className="text-xl font-bold truncate" id="users-name">
{formatName(userData)}
</h1>
</TooltipComponent>
<div className="min-width-50 shrink-0 text-sm text-secondary-600">
<UserStatusIndicator user={userData} addPadding />
<UserStatusIndicator
user={userData}
addPadding
className="pl-0"
/>
</div>
</div>

<span
id="username"
className="text-sm font-light leading-relaxed text-secondary-600"
>
{userData.username}
</span>
<TooltipComponent content={userData.username} side="bottom">
<p
id="username"
className="text-sm font-light leading-relaxed text-secondary-600 truncate"
>
{userData.username}
</p>
</TooltipComponent>
</div>
</div>
</div>
Expand Down
12 changes: 8 additions & 4 deletions src/components/Users/UserViewDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useTranslation } from "react-i18next";

import { TooltipComponent } from "@/components/ui/tooltip";

import { UserBase } from "@/types/user/user";

interface UserViewDetailsProps {
Expand All @@ -16,10 +18,12 @@ const LabelValue = ({
id?: string;
}) => (
<div className="flex flex-col gap-1">
<span className="text-sm text-gray-500">{label}</span>
<span id={`view-${id}`} className="text-sm">
{value || "-"}
</span>
<p className="text-sm text-gray-500">{label}</p>
<TooltipComponent content={value || "-"} side="bottom">
<span id={`view-${id}`} className="text-sm truncate max-w-fit">
{value || "-"}
</span>
</TooltipComponent>
</div>
);

Expand Down
Loading