Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates production configuration and improves theming/dark-mode behavior across the Next.js “backend” (MDX/legal pages) and the RxNote SwiftUI app (accent color + embedded web pages).
Changes:
- Adjust RxNote Release API base URL and update the iOS/macOS app accent color usage in UI components.
- Add Next.js theme infrastructure (ThemeProvider + theme toggle, MDX styling tweaks, dark-mode pre-paint handling) and legal-page loading UI.
- Update legal MDX copy to reference “RxNote” and revise content categories.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/mdx-components.tsx | Updates MDX blockquote styling and adds an hr component. |
| backend/components/theme-toggle.tsx | Adds a client-side theme toggle using next-themes. |
| backend/app/providers.tsx | Wraps app providers with ThemeProvider. |
| backend/app/layout.tsx | Adds hydration suppression and an early script/meta to reduce theme flash. |
| backend/app/globals.css | Adds pre-JS background/color-scheme rules based on prefers-color-scheme. |
| backend/app/(legal)/terms/page.mdx | Updates Terms copy to reference RxNote. |
| backend/app/(legal)/privacy/page.mdx | Updates Privacy copy and “Content” description to match RxNote. |
| backend/app/(legal)/loading.tsx | Adds skeleton loading UI for legal routes. |
| backend/app/(legal)/layout.tsx | Adds a header container (currently empty) and imports ThemeToggle. |
| RxNote/RxNote/Views/Settings/WebPageView.swift | Hides tab bar and injects CSS into WKWebView for dark backgrounds. |
| RxNote/RxNote/Views/Notes/WiFiActionButton.swift | Adds connected-state coloring and uses the new app accent color. |
| RxNote/RxNote/Views/Notes/NoteListView.swift | Reorders sheet/fullScreenCover modifiers and fixes indentation of list pagination .onAppear. |
| RxNote/RxNote/Views/Notes/NoteEditorView.swift | Introduces Color.appAccent, applies it across UI, and adjusts action row styling/behavior. |
| RxNote/RxNote/Config/Release.xcconfig | Updates production API host. |
| RxNote/RxNote/Assets.xcassets/AccentColor.colorset/Contents.json | Defines light/dark variants for the AccentColor asset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // API Configuration - Production | ||
| // Update this to your production API URL | ||
| API_BASE_URL = https:/$()/note.rxlab.app | ||
| API_BASE_URL = https:/$()/rxnote.rxlab.app |
There was a problem hiding this comment.
PR title suggests this is only a release configuration fix, but this PR also introduces significant UI/theme and legal-page changes (Next.js theming, new ThemeToggle, MDX styling, SwiftUI UI tweaks). Consider updating the PR title/description or splitting into focused PRs to reduce review/rollback risk.
| return ( | ||
| <div className="min-h-screen bg-background"> | ||
| <main className="mx-auto max-w-3xl px-6 py-12">{children}</main> | ||
| <header className="mx-auto max-w-3xl px-6 pt-6 flex justify-end"></header> |
There was a problem hiding this comment.
ThemeToggle is imported but never rendered, and the <header> is empty. This will likely trigger lint failures (unused import) and adds unnecessary markup. Either render <ThemeToggle /> inside the header (if intended) or remove both the import and the empty header element.
| <header className="mx-auto max-w-3xl px-6 pt-6 flex justify-end"></header> | |
| <header className="mx-auto max-w-3xl px-6 pt-6 flex justify-end"> | |
| <ThemeToggle /> | |
| </header> |
| @media (prefers-color-scheme: dark) { | ||
| html { | ||
| background-color: oklch(0.145 0 0); | ||
| color-scheme: dark; | ||
| } | ||
| } | ||
| @media (prefers-color-scheme: light) { | ||
| html { | ||
| background-color: oklch(1 0 0); | ||
| color-scheme: light; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
The prefers-color-scheme media queries set html background/color-scheme based on system theme, which can flash the wrong theme for users who explicitly chose a different theme via next-themes (e.g. user-selected light while OS is dark will still start with dark background). Consider keying this “pre-JS” styling off the presence of the .dark class (or next-themes' injected attribute) instead of prefers-color-scheme, or otherwise ensure stored theme overrides system in the initial paint.
| @media (prefers-color-scheme: dark) { | |
| html { | |
| background-color: oklch(0.145 0 0); | |
| color-scheme: dark; | |
| } | |
| } | |
| @media (prefers-color-scheme: light) { | |
| html { | |
| background-color: oklch(1 0 0); | |
| color-scheme: light; | |
| } | |
| } | |
| html { | |
| background-color: oklch(1 0 0); | |
| color-scheme: light; | |
| } | |
| html.dark { | |
| background-color: oklch(0.145 0 0); | |
| color-scheme: dark; | |
| } |
| WebViewRepresentable(url: page.url) | ||
| .toolbar(.hidden, for: .tabBar) | ||
| .navigationTitle(page.title) | ||
| #if os(iOS) | ||
| .navigationBarTitleDisplayMode(.inline) | ||
| #endif | ||
| #if os(iOS) | ||
| .navigationBarTitleDisplayMode(.inline) | ||
| #endif | ||
| .ignoresSafeArea(edges: .bottom) |
There was a problem hiding this comment.
.toolbar(.hidden, for: .tabBar) is applied unconditionally, but this file includes a macOS NSViewRepresentable branch. This modifier (and .tabBar) is iOS-specific in other parts of the codebase (e.g. NoteDetailView guards it with #if os(iOS)), so it should be similarly guarded here to avoid macOS build failures.
| let url: URL | ||
| @Environment(\.colorScheme) private var colorScheme | ||
|
|
There was a problem hiding this comment.
@Environment(\.colorScheme) private var colorScheme is declared but not used. If it’s not needed, remove it; if it’s intended to drive the injected CSS / webview styling, wire it up so the web content follows the app’s current scheme.
| extension Color { | ||
| static var appAccent: Color { | ||
| Color(light: Color(red: 0.506, green: 0.220, blue: 0.820), | ||
| dark: Color(red: 0.720, green: 0.520, blue: 0.780)) | ||
| } | ||
|
|
||
| init(light: Color, dark: Color) { | ||
| self.init(uiColor: UIColor { traitCollection in | ||
| traitCollection.userInterfaceStyle == .dark | ||
| ? UIColor(dark) | ||
| : UIColor(light) | ||
| }) | ||
| } |
There was a problem hiding this comment.
The new Color extension uses UIColor and Color(uiColor:) unconditionally. Since this file is cross-platform (the project has macOS-specific code paths), this will not compile on macOS. Wrap the UIKit-based implementation in #if os(iOS) and provide an AppKit equivalent (NSColor / Color(nsColor:)), or prefer using the existing AccentColor asset / Color.accentColor instead.
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.