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(GIST-102): update sidebar responsive #43

Merged
merged 1 commit into from
Nov 15, 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 src/app/(gistLayout)/layout-ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function AppSidebar({
}: AppSidebarProps) {
return (
<Sidebar variant="floating">
<div className="w-min flex flex-col gap-8 flex-shrink-0 p-2">
<div className="w-min flex flex-col gap-8 flex-shrink-0 p-2 h-full">
<SidebarHeader>
<div className="flex flex-row gap-2 justify-between items-center">
<div className="flex flex-row justify-start items-center gap-2">
Expand Down
10 changes: 10 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,14 @@
color: #2d1eff;
background: #f1f5f9;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
}
2 changes: 1 addition & 1 deletion src/components/ui/org-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface OrgListProps {

export function OrgList({ orgs, onGistOrg, onDeleteOrg, onDeleteGist, onUpdateOrg }: OrgListProps) {
return (
<Accordion type="single" collapsible className="w-full">
<Accordion type="single" collapsible className="w-full h-full overflow-scroll no-scrollbar">
{orgs.map((org) => (
<AccordionItem key={org.name} value={org.name} className="border-none">
<AccordionTrigger>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/profile-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function ProfileDropdown({ username, onLogout }: ProfileDropdownProps) {
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant={"ghost"} className="font-medium truncate max-w-[200px]">
<span className="truncate">{username}</span>
<span className="max-w-[100px] truncate">{username}</span>
<ChevronDown className="w-3 h-3 ml-2 flex-shrink-0" />
</Button>
</DropdownMenuTrigger>
Expand Down
Loading