Open HugoPerard opened 1 month ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
start-ui | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Oct 4, 2024 3:41pm |
The changes involve modifications to the Document
component in src/app/Document.tsx
, where EnvHint
is replaced by AppHint
, and conditional rendering is added for the ReactQueryDevtools
component based on the NEXT_PUBLIC_DEV_TOOLS_ENABLED
environment variable. The layout.tsx
file updates the import for getEnvHintTitlePrefix
to source from AppHint
. The new environment variable NEXT_PUBLIC_DEV_TOOLS_ENABLED
is introduced in src/env.mjs
. Additionally, the AppHint
and DevToolsDrawer
components are added to manage environmental hints and development settings, while the EnvHint
file is removed.
File | Change Summary |
---|---|
src/app/Document.tsx |
Replaced EnvHint with AppHint and added conditional rendering for ReactQueryDevtools . |
src/app/layout.tsx |
Updated import for getEnvHintTitlePrefix to source from AppHint . |
src/env.mjs |
Introduced new environment variable NEXT_PUBLIC_DEV_TOOLS_ENABLED for managing development tools visibility. |
src/features/devtools/AppHint.tsx |
Added new components for displaying environmental hints and developer tools functionality. |
src/features/devtools/DevToolsDrawer.tsx |
Introduced DevToolsDrawer component for managing development-related settings in a drawer. |
src/features/devtools/EnvHint.tsx |
Removed the entire file, including the EnvHint component and its associated function. |
sequenceDiagram
participant User
participant Document
participant AppHint
participant DevToolsDrawer
User->>Document: Load Document component
Document->>AppHint: Render AppHint based on environment variables
User->>AppHint: Check for development tools
AppHint->>Document: Conditionally render ReactQueryDevtools
User->>DevToolsDrawer: Open DevToolsDrawer for settings
DevToolsDrawer->>User: Display development settings options
DarkModeSwitch
component or its functionality, as it focuses solely on updating TypeScript ESLint configurations without any direct connection to the UI components or their implementations.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
After some feedbacks, I come with a new version of the development helper :
https://github.com/user-attachments/assets/68c0c6bd-f872-40d4-8164-fbbc5725e9d6
Describe your changes
I create this PR as an idea, a proposal, it's a first draft to have some feedbacks.
The idea is to have a quick way to switch between light/dark modes during development, to avoid the pain to navigate to account page and then come back to our current page to try things on different theme mode.
This is the initial need, but maybe others use cases cause the same pain.
So I want to have a quick access to DarkModeSwitcher wherever we are in the app, and one stuff that is always display on development environnement is the EnvHint, that why I decide to improve it and transform it on a "development helper" opening button.
Screenshots
Documentation
Checklist
pnpm storybook
command and everything is working(If you cannot update the french language, just let us know in the PR description)
Summary by CodeRabbit
New Features
DevToolsDrawer
for managing theme and language preferences in a responsive drawer.AppHint
to display environmental hints at the top of the application.Bug Fixes
EnvHint
component, streamlining the hint display logic.Chores
NEXT_PUBLIC_DEV_TOOLS_ENABLED
, for controlling the availability of development tools.