style: improve remote confix ux
This PR addresses issue #174. I changed the input for strings to textareas and made modals scrollable.
Before:
After:
Also made sure that there is no overflow on the previews anymore.
Before:
After:
Summary by CodeRabbit
-
New Features
- Updated the flag value input for string types to a multi-line, auto-resizing textarea for improved usability.
-
Style
- Enhanced the display of feature flag values with better width constraints and text truncation for a cleaner layout.
- Improved modal content handling by adding a maximum height and scrollability for lengthy content.
-
Chores
- Added "react-textarea-autosize" as a new dependency.
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| abby-docs | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jul 24, 2025 0:59am |
Walkthrough
A new dependency, "react-textarea-autosize", was added. The AddFeatureFlagModal now uses an auto-resizing textarea for string flag values. Dropdown.tsx updates a type alias to align with a different Radix UI type. FeatureFlag.tsx and Modal.tsx receive minor UI and layout adjustments for improved display and scrolling.
Changes
| File(s) | Change Summary |
|---|---|
| apps/web/package.json | Added "react-textarea-autosize" v^8.5.9 to dependencies. |
| apps/web/src/components/AddFeatureFlagModal.tsx | Replaced single-line input for "STRING" flag with multi-line auto-resizing textarea using TextareaAutosize. |
| apps/web/src/components/Dropdown.tsx | Updated ItemProps type alias to extend DropdownMenu.DropdownMenuItemProps instead of DropdownMenu.MenuItemProps. |
| apps/web/src/components/FeatureFlag.tsx | Added overflow and truncation classes to value display; reformatted a template literal for readability. |
| apps/web/src/components/Modal.tsx | Limited modal content height to 60vh and enabled vertical scrolling for overflow. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant AddFeatureFlagModal
participant TextareaAutosize
User->>AddFeatureFlagModal: Open modal to add/edit flag
AddFeatureFlagModal->>TextareaAutosize: Render textarea for STRING flag value
User->>TextareaAutosize: Enter multi-line text
TextareaAutosize->>AddFeatureFlagModal: Auto-resize textarea as user types
AddFeatureFlagModal->>User: Display updated flag value
Estimated code review effort
๐ฏ 2 (Simple) | โฑ๏ธ ~7 minutes
[!NOTE]
โก๏ธ Unit Test Generation is now available in beta!
Learn more here, or try it out under "Finishing Touches" below.
๐ Recent review details
Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro
๐ฅ Commits
Reviewing files that changed from the base of the PR and between e763d1a9a46f8b3183e983ee1c826e7c5f80c8f2 and b1b5d1751b6e4e04ba759d33020d296a8e5d81d9.
โ Files ignored due to path filters (1)
-
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
๐ Files selected for processing (5)
-
apps/web/package.json(1 hunks) -
apps/web/src/components/AddFeatureFlagModal.tsx(2 hunks) -
apps/web/src/components/Dropdown.tsx(1 hunks) -
apps/web/src/components/FeatureFlag.tsx(4 hunks) -
apps/web/src/components/Modal.tsx(1 hunks)
๐ Additional comments (7)
apps/web/package.json (1)
118-118: LGTM! Dependency addition supports the UX improvements.The
react-textarea-autosizepackage addition is appropriate for implementing auto-resizing textareas in place of single-line inputs, which aligns with the PR's objective to improve remote config UX.apps/web/src/components/Modal.tsx (1)
53-55: Well-implemented scrollable modal solution.The addition of
max-h-[60vh] overflow-y-autoeffectively constrains modal height while enabling scrolling when content exceeds the viewport. The 60vh limit provides good balance between content visibility and preventing oversized modals.apps/web/src/components/Dropdown.tsx (1)
44-44: Good type system refinement.Updating the type alias to use
DropdownMenuItemPropsinstead ofMenuItemPropsimproves type precision and aligns with the current Radix UI type definitions.apps/web/src/components/FeatureFlag.tsx (2)
194-196: Good formatting improvement for readability.The multi-line template literal formatting improves code readability without changing the functionality of the JSON preview generation.
262-275: Excellent overflow prevention implementation.The addition of
overflow-hiddento container divs andmax-w-[150px] truncateto code elements effectively prevents layout breaking while maintaining content visibility. This directly addresses the PR objective of ensuring no overflow in preview sections.Also applies to: 287-300, 312-325
apps/web/src/components/AddFeatureFlagModal.tsx (2)
17-17: Appropriate import for textarea functionality.The import of
TextareaAutosizesupports the replacement of single-line inputs with auto-resizing textareas, which directly implements the PR's UX improvement objectives.
128-135: Excellent textarea implementation for improved UX.The replacement of the
Inputcomponent withTextareaAutosizeperfectly addresses the PR objective of accommodating longer text entries. The styling is comprehensive and consistent, including:
- Auto-resizing behavior with
resize-noneto prevent manual resize conflicts- Proper focus states and accessibility
- Overflow handling to prevent layout issues
- Consistent design system integration
โจ Finishing Touches
- [ ] ๐ Generate Docstrings
๐งช Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
improve-remote-config-ux
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
๐ชง Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>, please review it. -
Explain this complex logic. -
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:-
@coderabbitai explain this code block. -
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase. -
@coderabbitai read src/utils.ts and explain its main purpose. -
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format. -
@coderabbitai help me debug CodeRabbit configuration file.
-
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai generate docstringsto generate docstrings for this PR. -
@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR. -
@coderabbitai generate unit teststo generate unit tests for this PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.