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

fix: 🐛 ↕️ 📱height now matches mobile height #1323

Merged
merged 1 commit into from
Oct 4, 2023
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 frontend/app/chat/[chatId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const SelectedChatPage = (): JSX.Element => {

return (
<div
className={`flex flex-col flex-1 items-center justify-stretch w-full h-[100vh] overflow-hidden ${
className={`flex flex-col flex-1 items-center justify-stretch w-full h-fill-available overflow-hidden ${
shouldDisplayFeedCard ? "bg-chat-bg-gray" : "bg-white"
} dark:bg-black transition-colors ease-out duration-500`}
data-testid="chat-page"
Expand Down
6 changes: 6 additions & 0 deletions frontend/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ div:focus {
/* background: #000; */
@apply bg-gray-500;
}

.h-fill-available {
/* fixes the h-[100vh] issue on mobile */
/* like height: -webkit-fill-available; but for any device (android and iphone) */
@apply h-[100vh] supports-[height:100cqh]:h-[100cqh] supports-[height:100svh]:h-[100svh];
}
}
2 changes: 1 addition & 1 deletion frontend/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ a {
/* background: #000; */
@apply bg-gray-500;
}
}
}
2 changes: 1 addition & 1 deletion frontend/lib/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Sidebar = ({
setOpen(false);
}
}}
className="flex flex-col fixed sm:sticky top-0 left-0 h-[100vh] overflow-visible z-30 border-r border-black/10 dark:border-white/25 bg-white dark:bg-black"
className="flex flex-col fixed sm:sticky top-0 left-0 h-fill-available overflow-visible z-30 border-r border-black/10 dark:border-white/25 bg-white dark:bg-black"
>
{!open && (
<button
Expand Down
Loading