Skip to content
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: preview bugs #2134

Merged
merged 5 commits into from
Feb 28, 2024
Merged

fix: preview bugs #2134

merged 5 commits into from
Feb 28, 2024

Conversation

Dhruwang
Copy link
Contributor

What does this PR do?

Fixes 1937

Fixes below mentioned issues

Slide up animation not working

Screen.Recording.2024-02-27.at.4.46.04.PM.mov

Broken Rating question (scale: star)

Screenshot 2024-02-27 at 4 46 43 PM

Double scroll bar for multi-choice question, file upload, picture select and cal question

Screen.Recording.2024-02-27.at.4.48.33.PM.mov

Broken rating question (scale:smiley)

Screenshot 2024-02-27 at 4 46 58 PM

Missing min width

Screenshot 2024-02-27 at 4 49 06 PM

How should this be tested?

Survey editor preview

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read How we Code at Formbricks
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Formbricks Docs if changes were necessary

Copy link

vercel bot commented Feb 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
formbricks-cloud ⬜️ Ignored (Inspect) Visit Preview Feb 28, 2024 5:43am
formbricks-com ⬜️ Ignored (Inspect) Visit Preview Feb 28, 2024 5:43am

Copy link
Contributor

github-actions bot commented Feb 27, 2024

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

apps/web/app/(app)/environments/[environmentId]/surveys/components/Modal.tsx

Consider using a switch statement instead of multiple if-else statements to improve the readability of the code.
Create Issue
See the diff
Checkout the fix

    // Use a switch statement
    let placementClass = "";
    switch (placement) {
      case "bottomLeft":
        placementClass = "bottom left";
        break;
      case "bottomRight":
        placementClass = "bottom right";
        break;
      case "topLeft":
        placementClass = "top left";
        break;
      case "topRight":
        placementClass = "top right";
        break;
    }
git fetch origin && git checkout -b ReviewBot/Impro-j1dgdgv origin/ReviewBot/Impro-j1dgdgv

apps/web/app/(app)/environments/[environmentId]/surveys/components/PreviewSurvey.tsx

The variable name 'shrink' is not very descriptive and does not clearly convey its purpose. A more descriptive name like 'isFullScreenShrink' would make the code easier to understand.
Create Issue
See the diff
Checkout the fix

    const [isFullScreenShrink, setIsFullScreenShrink] = useState(false);
git fetch origin && git checkout -b ReviewBot/Impro-b60fot9 origin/ReviewBot/Impro-b60fot9

packages/surveys/src/components/general/Smileys.tsx

Consider adding a CSS class to the SVG elements and use CSS to control their size. This will make the SVGs more flexible and easier to control from a central location.
Create Issue
See the diff
Checkout the fix

    <svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg" className="svg-icon">
    ```
    And in your CSS file:
    ```css
    .svg-icon {
      width: 48px;
      height: 48px;
    }
git fetch origin && git checkout -b ReviewBot/Remov-3ctjzd2 origin/ReviewBot/Remov-3ctjzd2

Copy link
Member

@mattinannt mattinannt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dhruwang thanks a lot for the fixes 😊💪🚀

@mattinannt mattinannt added this pull request to the merge queue Feb 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2024
@mattinannt mattinannt added this pull request to the merge queue Feb 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2024
@mattinannt
Copy link
Member

@Dhruwang It seems like there's an e2e error. Can you please take a look? 😊

@Dhruwang Dhruwang added this pull request to the merge queue Feb 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2024
@Dhruwang Dhruwang added this pull request to the merge queue Feb 28, 2024
Merged via the queue into main with commit 078c5db Feb 28, 2024
14 checks passed
@Dhruwang Dhruwang deleted the smiley-issue-fix branch February 28, 2024 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants