-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: responsive UI for phones (#1) #2
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ import "../styles/app.scss"; | |||||||
| import "../styles/tailwind.css"; | ||||||||
| import DockElement from "../components/DockElement"; | ||||||||
| import GitHubStars from "../components/GitHubStars"; | ||||||||
| import MainWrapper from "../components/MainWrapper"; | ||||||||
|
|
||||||||
| export const metadata: Metadata = { | ||||||||
| title: { | ||||||||
|
|
@@ -98,8 +99,14 @@ export default function RootLayout({ | |||||||
| }>) { | ||||||||
| return ( | ||||||||
| <html lang="en"> | ||||||||
| <body className={` bg-gray-900`}> | ||||||||
| <main className="pt-4">{children}</main> | ||||||||
| <head> | ||||||||
| <meta | ||||||||
| name="viewport" | ||||||||
| content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" | ||||||||
| /> | ||||||||
| </head> | ||||||||
| <body className="bg-gray-900 overflow-x-hidden"> | ||||||||
| <MainWrapper>{children}</MainWrapper> | ||||||||
|
||||||||
| <MainWrapper>{children}</MainWrapper> | |
| <body className="bg-gray-900"> | |
| <MainWrapper className="overflow-x-hidden">{children}</MainWrapper> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| "use client"; | ||
|
|
||
| import { usePathname } from "next/navigation"; | ||
|
|
||
| export default function MainWrapper({ | ||
| children, | ||
| }: { | ||
| children: React.ReactNode; | ||
| }) { | ||
| const pathname = usePathname(); | ||
|
|
||
| // For notebook, graphs, and whiteboard, don't add padding | ||
| const isFullPageApp = | ||
| pathname === "/notebook" || | ||
| pathname === "/graphs" || | ||
| pathname === "/whiteboard"; | ||
|
|
||
| return <main className={isFullPageApp ? "" : "pt-4"}>{children}</main>; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,6 +16,14 @@ body { | |||||
| font-family: "Mozilla Text", sans-serif; | ||||||
| font-optical-sizing: auto; | ||||||
| font-style: normal; | ||||||
|
|
||||||
| // Mobile improvements | ||||||
| @media (max-width: 768px) { | ||||||
| -webkit-touch-callout: none; | ||||||
|
||||||
| -webkit-touch-callout: none; |
Copilot
AI
Aug 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globally disabling text selection (-webkit-user-select: none) can harm accessibility by preventing users from selecting text for copying or using assistive technologies. Apply this property selectively to UI elements where text selection should be prevented, not globally.
| -webkit-user-select: none; | |
| /* -webkit-user-select: none; Removed for accessibility */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting
maximum-scale=1.0anduser-scalable=noprevents users from zooming, which violates WCAG accessibility guidelines. Users with visual impairments rely on zoom functionality. Remove these properties to allow zooming while maintaining responsive design.