Skip to content

fix: wrong tooltip in survey copy form#3341

Merged
mattinannt merged 3 commits intoformbricks:mainfrom
jonas-hoebenreich:fix-tooltip
Oct 11, 2024
Merged

fix: wrong tooltip in survey copy form#3341
mattinannt merged 3 commits intoformbricks:mainfrom
jonas-hoebenreich:fix-tooltip

Conversation

@jonas-hoebenreich
Copy link
Contributor

@jonas-hoebenreich jonas-hoebenreich commented Oct 9, 2024

What does this PR do?

removes "This product is not compatible with the survey type." tooltip form survey copy form

Fixes #3335

How should this be tested?

  • Hover over environment headlines in survey copy form
  • Click on environment headlines in survey copy form

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
  • First PR at Formbricks? Please sign the CLA! Without it we wont be able to merge it 🙏

Appreciated

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

Summary by CodeRabbit

  • New Features

    • Simplified the CopySurveyForm by removing the tooltip for product compatibility, enhancing the user interface.
  • Bug Fixes

    • Addressed potential confusion by eliminating the tooltip that indicated compatibility issues.

@vercel
Copy link

vercel bot commented Oct 9, 2024

@jonas-hoebenreich is attempting to deploy a commit to the formbricks Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2024

Walkthrough

The pull request modifies the CopySurveyForm component by removing the TooltipRenderer that displayed compatibility issues for product environments. This change eliminates the tooltip that appeared next to the product name, addressing a bug where misleading compatibility messages were shown. The form's submission logic and field rendering remain unchanged, ensuring that the overall functionality is preserved.

Changes

File Change Summary
packages/ui/components/SurveysList/components/CopySurveyForm.tsx Removed TooltipRenderer component from the form.

Assessment against linked issues

Objective Addressed Explanation
No tooltip displayed for environment names (Issue #3335)
Form not submitted on environment name click (Issue #3335)

Possibly related PRs

Suggested labels

bug, 🙋🏻‍♂️help wanted, 🕹️ oss.gg, 🕹️ 50 points

Suggested reviewers

  • jobenjada

Poem

In the form where surveys play,
Tooltips vanished, hip-hip-hooray!
No more whispers of compatibility,
Just smooth sailing, that's the key!
Click away, no fear of a trap,
Happy surveys, with a joyful clap! 🐰✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c01c00c and 04837ec.

📒 Files selected for processing (1)
  • packages/ui/components/SurveysList/components/CopySurveyForm.tsx (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
packages/ui/components/SurveysList/components/CopySurveyForm.tsx (2)

Line range hint 1-138: Thoroughly test form submission behavior.

While the tooltip issue has been addressed, please ensure that the form submission behavior, especially when interacting with environment names, works as expected. Consider adding specific test cases to verify that clicking on environment names no longer triggers unexpected form submissions.

Consider adding unit tests.

To ensure the changed behavior is maintained in future updates, consider adding unit tests that specifically cover the rendering of product names without tooltips and the correct handling of environment name interactions.


73-75: Tooltip removal looks good.

The removal of the TooltipRenderer component addresses the issue of the misleading tooltip mentioned in the PR objectives. This change aligns with the goal of removing the incorrect compatibility message.

Verify unexpected form submission issue.

While the tooltip issue has been addressed, the PR objectives also mentioned an unexpected form submission when clicking on environment names. Can you confirm if this issue has been resolved with these changes?

To check if the unexpected form submission issue still exists, we can search for click event handlers on environment names:

✅ Verification successful

Tooltip removal looks good.

Unexpected form submission issue is resolved.

The search confirmed that there are no click handlers or form submission logic related to environment names in CopySurveyForm.tsx. This indicates that the unexpected form submission issue has been addressed effectively.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for click handlers or form submission logic related to environment names
rg -i '(onClick|onSubmit|handleSubmit).*environment' --type typescript

Length of output: 107


Script:

#!/bin/bash
# Search for click handlers or form submission logic related to environment names in .ts and .tsx files
rg -i '(onClick|onSubmit|handleSubmit).*environment' --glob '*.ts' --glob '*.tsx'

Length of output: 447


Script:

#!/bin/bash
# Search for click handlers or form submission logic related to environment names in CopySurveyForm.tsx
rg -i '(onClick|onSubmit|handleSubmit).*environment' packages/ui/components/SurveysList/components/CopySurveyForm.tsx

Length of output: 119


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?

❤️ Share
🪧 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.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in 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 generate unit testing code.
    • @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.

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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file 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.

@github-actions github-actions bot added bug Something isn't working hacktoberfest complete these issues to gather points for Hacktoberfest 🕹️ 50 points 🕹️ oss.gg Community issue via oss.gg labels Oct 9, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2024

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

@vivek-gorantla2005
Copy link

/assign

@oss-gg
Copy link

oss-gg bot commented Oct 11, 2024

Assigned to @vivek-gorantla2005! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

@vdhruvannaidu
Copy link

/assign

@oss-gg
Copy link

oss-gg bot commented Oct 11, 2024

This issue is already assigned to another person. Please find more issues here.

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.

@jonas-hoebenreich thanks for the fix :-) 🎉

@mattinannt mattinannt enabled auto-merge October 11, 2024 10:03
@mattinannt mattinannt added this pull request to the merge queue Oct 11, 2024
Merged via the queue into formbricks:main with commit aeec821 Oct 11, 2024
@oss-gg
Copy link

oss-gg bot commented Oct 11, 2024

Awarding jonas-hoebenreich: 50 points 🕹️ Well done! Check out your new contribution on oss.gg/jonas-hoebenreich

@jonas-hoebenreich jonas-hoebenreich deleted the fix-tooltip branch October 11, 2024 19:00
@oss-gg
Copy link

oss-gg bot commented Oct 12, 2024

@vivek-gorantla2005, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

1 similar comment
@oss-gg
Copy link

oss-gg bot commented Oct 14, 2024

@vivek-gorantla2005, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

@oss-gg
Copy link

oss-gg bot commented Oct 16, 2024

@vivek-gorantla2005, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

@coderabbitai coderabbitai bot mentioned this pull request Jul 3, 2025
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working hacktoberfest complete these issues to gather points for Hacktoberfest 🕹️ oss.gg Community issue via oss.gg 🕹️ 50 points

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] All Survey Types are not "compatible" now in Survey Copy Form

4 participants