-
Notifications
You must be signed in to change notification settings - Fork 523
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: Responsiveness issue of ratelimit page #2710
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@BadriVishalPadhy is attempting to deploy a commit to the Unkey Team on Vercel. A member of the Team first needs to authorize it. |
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces modifications to enhance the responsive design of the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you for following the naming conventions for pull request titles! 🙏 |
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
apps/dashboard/components/ui/code.tsx (1)
7-7
: Consider documenting padding requirements for consumersThe removal of default padding (
px-2.5 py-2
) from the base component shifts the responsibility to consumers. While this allows for more flexibility, it could lead to inconsistent padding across different usages.Consider adding a comment in the code to document that padding should be handled by the consumer, or create usage examples in the component's documentation.
apps/dashboard/components/dashboard/empty-placeholder.tsx (1)
18-18
: Simplify width classesThe combination of
w-full
andmax-w-full
is redundant asw-full
already sets the width to 100%.- <div className="overflow-hidden w-full max-w-full flex flex-col items-center justify-center text-center"> + <div className="overflow-hidden w-full flex flex-col items-center justify-center text-center">apps/dashboard/app/(app)/ratelimits/[namespaceId]/page.tsx (1)
216-216
: Simplify spacing classes and ensure consistent text sizeThe spacing and text size classes could be simplified for better maintainability.
- <Code className="flex items-start gap-0 sm:gap-8 p-4 my-8 text-xs sm:text-xxs text-start overflow-x-auto max-w-full"> + <Code className="flex items-start gap-0 sm:gap-8 p-4 my-8 text-xs sm:text-sm text-start overflow-x-auto max-w-full">Note: Consider if
text-xxs
was intended as it's smaller thantext-xs
. Usually, text should be larger on bigger screens for better readability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
apps/dashboard/app/(app)/ratelimits/[namespaceId]/page.tsx
(2 hunks)apps/dashboard/components/dashboard/empty-placeholder.tsx
(1 hunks)apps/dashboard/components/ui/code.tsx
(1 hunks)
🔇 Additional comments (2)
apps/dashboard/app/(app)/ratelimits/[namespaceId]/page.tsx (2)
155-157
: LGTM! Good responsive design practice
Hiding the "Requests" header on mobile screens (hidden sm:block
) is a good practice for improving space utilization on smaller devices while maintaining the header on larger screens.
Line range hint 155-216
: Verify responsive behavior across different devices
The responsive design changes look good, but please ensure testing across various devices and screen sizes to verify:
- The header visibility transition at the
sm
breakpoint - Code snippet readability and overflow behavior
- Text size changes across breakpoints
✅ Verification successful
Responsive design implementation verified with no issues found
The code scan reveals that all responsive classes in the file follow Tailwind's best practices:
- Header visibility uses
hidden sm:block
for proper breakpoint transition - Grid layout uses responsive classes (
grid-cols-2 lg:grid-cols-4
) - Text sizing is properly handled with responsive utilities (
text-xs sm:text-xxs
) - No problematic fixed-width classes that could break the layout
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for any hardcoded pixel values or non-responsive classes that might affect layout
rg -g '*.tsx' -g '*.css' 'px-\[.*?\]|w-\[.*?\]|h-\[.*?\]' apps/dashboard/
Length of output: 15630
@perkinsjr this wasn't required i guess |
@ogzhanolguncu Do checkout . . . |
Great work @BadriVishalPadhy. If you are willing fix one more issue on this page after this is resolved: Feel free to open a ticket and do this. Don't forget to move separators as well don't do it like the SS 😄 |
should it become vertically aligned in mobile view or in all views . . . |
What does this PR do?
This fixes responsiveness problem in ratelimit page.
Fixes #2409
If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists
Type of change
How should this be tested?
Checklist
Required
pnpm build
pnpm fmt
console.logs
git pull origin main
Appreciated
Screen.Recording.2024-12-06.at.08.04.01.mov
] If a UI change was made: Added a screen recording or screenshots to this PR
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Style