fix: height & width of survey preview when loading#3234
Conversation
WalkthroughThe changes in the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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! 🙏 |
| : "shrink" | ||
| } | ||
| className="relative flex items-center justify-center rounded-lg border border-slate-300 bg-slate-200"> | ||
| className="relative flex h-full w-[95%] items-center justify-center rounded-lg border border-slate-300 bg-slate-200"> |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Consider using responsive width utilities for better adaptability
Setting a fixed width with w-[95%] may not provide optimal responsiveness across all screen sizes. Using responsive utility classes or maximum width constraints can enhance the component's adaptability on different devices.
You could modify the className as follows:
-className="relative flex h-full w-[95%] items-center justify-center rounded-lg border border-slate-300 bg-slate-200">
+className="relative flex h-full w-full max-w-4xl items-center justify-center rounded-lg border border-slate-300 bg-slate-200">This change uses w-full for full width and max-w-4xl to set a maximum width, allowing the component to be responsive while maintaining a reasonable maximum size.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| className="relative flex h-full w-[95%] items-center justify-center rounded-lg border border-slate-300 bg-slate-200"> | |
| className="relative flex h-full w-full max-w-4xl items-center justify-center rounded-lg border border-slate-300 bg-slate-200"> |
|
@jobenjada is attempting to deploy a commit to the formbricks Team on Vercel. A member of the Team first needs to authorize it. |
|
Awarding SatyanarayanPrashar: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/SatyanarayanPrashar |
Fixes #3210
What does this PR do?
fixed the height of the preview window, when the survey editor was loading.
Screen.Recording.2024-10-01.at.1.12.26.PM.mov
How should this be tested?
Checklist
Required
pnpm buildconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit
New Features
Bug Fixes
Improvements