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

[FE](styles): tablet UI [AF-89] #76

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion client/src/containers/filters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function Filters({ nrResults = 0 }: { nrResults: number }) {
<Dialog>
<DialogTrigger aria-label="Show filters" asChild>
<Button variant="outline" size="base">
<Filter className="stroke-[1.5px]" />
<Filter className="hidden stroke-[1.5px] xl:block" />
<span>Filters</span>
</Button>
</DialogTrigger>
Expand Down
6 changes: 3 additions & 3 deletions client/src/containers/panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export default function Panel({ children }: { children: React.ReactNode }) {
return (
<div
className={cn({
'rounded-4xl bg-background after:rounded-b-4xl before:rounded-t-4xl absolute bottom-0 top-0 z-10 my-2 flex w-full max-w-[400px] flex-col shadow-md transition-transform duration-500 before:absolute before:left-0 before:top-1 before:h-6 before:w-full before:bg-gradient-to-b before:from-white/100 before:to-white/0 before:content-[""] after:absolute after:bottom-1 after:left-0 after:h-6 after:w-full after:bg-gradient-to-t after:from-white/0 after:to-white/100 after:content-[""]':
'rounded-4xl bg-background after:rounded-b-4xl before:rounded-t-4xl absolute bottom-0 top-0 z-10 my-2 flex w-full max-w-[342px] flex-col shadow-md transition-transform duration-500 before:absolute before:left-0 before:top-1 before:h-6 before:w-full before:bg-gradient-to-b before:from-white/100 before:to-white/0 before:content-[""] after:absolute after:bottom-1 after:left-0 after:h-6 after:w-full after:bg-gradient-to-t after:from-white/0 after:to-white/100 after:content-[""] xl:max-w-[400px]':
true,
'left-[106px] translate-x-0': open,
'left-24 -translate-x-full': !open,
'left-[92px] translate-x-0 xl:left-[106px]': open,
'left-20 -translate-x-full xl:left-24': !open,
})}
>
<div
Expand Down
2 changes: 1 addition & 1 deletion client/src/containers/projects/detail/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function ProjectDashboard({ id }: { id: string }) {
return (
<div
data-cy="project-dashboard"
className="z-50 box-content h-full w-full rounded-3xl bg-neutral-50 p-6 shadow-md"
className="no-scrollbar z-50 box-content h-full w-full overflow-x-hidden rounded-3xl bg-neutral-50 p-6 shadow-md xl:overflow-y-auto"
>
<ContentLoader
data={data}
Expand Down
16 changes: 10 additions & 6 deletions client/src/containers/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ export default function Sidebar() {
const [sidebarTab, setSidebarTab] = useState<'projects' | 'countries' | 'datasets'>('projects');

return (
<div className="rounded-8xl absolute bottom-0 left-4 top-0 z-20 my-2 w-20 bg-yellow-700 py-10 text-xs text-yellow-50">
<div className="rounded-8xl absolute bottom-0 left-4 top-0 z-20 my-2 w-16 bg-yellow-700 py-10 text-xs text-yellow-50 xl:w-20">
<div className="h-[88%]">
<div className="flex flex-col items-center pb-12">
<Image src="/images/logo.svg" alt="logo" width={62} height={29} />
<div className="flex hidden flex-col items-center pb-12 xl:block">
<Image src="/images/logo.svg" alt="logo" width={35} height={29} />
</div>

<div className="block flex flex-col items-center pb-12 xl:hidden">
<Image src="/images/logo.svg" alt="logo" width={48} height={19} />
</div>

<ul className="flex h-full flex-col">
Expand All @@ -38,7 +42,7 @@ export default function Sidebar() {
key={name}
data-cy={`sidebar-tab-${name}`}
className={cn({
'rounded-8xl mx-2 mt-2 flex flex-col items-center space-y-1 border-2 border-transparent py-10 text-center hover:border-yellow-50':
'xl:rounded-8xl mx-2 mt-2 flex flex-col items-center space-y-1 rounded-full border-2 border-transparent py-2 text-center hover:border-yellow-50 xl:py-10':
true,
'bg-yellow-600': pathname.includes(name),
})}
Expand All @@ -50,7 +54,7 @@ export default function Sidebar() {
alt={name}
width={24}
height={24}
className="h-6 w-6"
className="h-7 h-8 xl:h-6 xl:w-6"
/>

{name === 'datasets' && layers.length > 0 && (
Expand All @@ -65,7 +69,7 @@ export default function Sidebar() {
</div>
)}
</div>
<p className="capitalize">{name}</p>
<p className="hidden capitalize xl:block">{name}</p>
</Link>
))}
<div className="mt-auto flex flex-col items-center space-y-2">
Expand Down
Loading