Skip to content

Conversation

@gupta-piyush19
Copy link
Contributor

What does this PR do?

Added Picture selection question

Fixes #1256

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change adds a new database migration
  • This change requires a documentation update

How should this be tested?

  • Test A
  • Test B

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

@vercel
Copy link

vercel bot commented Oct 21, 2023

@gupta-piyush19 is attempting to deploy a commit to the formbricks Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2023

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

@github-actions github-actions bot added enhancement New feature or request formtribe-2023 hacktoberfest complete these issues to gather points for Hacktoberfest labels Oct 21, 2023
@review-agent-prime
Copy link
Contributor

The PR looks good overall, but there are a few areas that could be improved:

  1. In PictureSelectionForm.tsx, the updateSurvey function is declared but never used. If it's not needed, consider removing it to avoid confusion.

  2. In FileInput/index.tsx, the handleUpload function checks if all files are allowed, but it doesn't stop the upload process if some files are not allowed. Consider adding a return statement in the else block to stop the function execution when not all files are allowed.

  3. In LinkSurvey.tsx, the source state is set but never used. If it's not needed, consider removing it to avoid confusion.

  4. In FileInput/index.tsx, the handleRemove function is declared but never used. If it's not needed, consider removing it to avoid confusion.

Here are the suggested changes:

// PictureSelectionForm.tsx
// Remove unused function
// const updateSurvey = (prop) => {
//   // updateQuestion(questionIdx, updatedAttributes);
// };

// FileInput/index.tsx
// Stop function execution when not all files are allowed
if (areAllFilesAllowed) {
  // ...
} else {
  toast.error("Files not supported");
  return;
}

// LinkSurvey.tsx
// Remove unused state
// const [source, setSource] = useState<string>("");

// FileInput/index.tsx
// Remove unused function
// const handleRemove = async (idx: number) => {
//   const newFileUrl = fileUrl?.filter((_, i) => i !== idx);
//   onFileUpload(newFileUrl);
// };

Please consider these suggestions and apply them if they make sense in your context.

@gupta-piyush19 gupta-piyush19 changed the title Feat: picture selection question feat: picture selection question Oct 21, 2023
@Dhruwang Dhruwang self-assigned this Oct 27, 2023
Copy link
Contributor

@pandeymangg pandeymangg left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR @gupta-piyush19 ! Looks and works great 🥳
Just left a few comments, after that we can merge this 😊

@jobenjada jobenjada requested a review from pandeymangg October 29, 2023 23:23
@jobenjada
Copy link
Member

from my side, it's good to go :) @pandeymangg merge when you approve my changes

Copy link
Contributor

@pandeymangg pandeymangg left a comment

Choose a reason for hiding this comment

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

LGTM!

@pandeymangg pandeymangg enabled auto-merge October 30, 2023 03:52
@pandeymangg pandeymangg added this pull request to the merge queue Oct 30, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2023
@pandeymangg pandeymangg enabled auto-merge October 30, 2023 04:34
@pandeymangg pandeymangg added this pull request to the merge queue Oct 30, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2023
@Dhruwang Dhruwang assigned pandeymangg and unassigned Dhruwang Oct 30, 2023
@pandeymangg pandeymangg enabled auto-merge October 30, 2023 05:25
@pandeymangg pandeymangg added this pull request to the merge queue Oct 30, 2023
Merged via the queue into formbricks:main with commit b9a8e9d Oct 30, 2023
kevinkong91 added a commit to kevinkong91/formbricks that referenced this pull request Oct 30, 2023
* main: (28 commits)
  chore: Add Table of Contents to README (formbricks#1427)
  fix: account deletion failing issue (formbricks#1509)
  fix: remove welcome card from email preview (formbricks#1495)
  fix(bug): default role implemented (formbricks#1524)
  fix: changing description of Code Action (formbricks#1522)
  refactor: Migrate activity service (formbricks#1471)
  fix: Error in Docs navigation formbricks#1518 (formbricks#1521)
  feat: dynamic title and description (formbricks#1459)
  fix: Spelling Errors (formbricks#1517)
  fix: added scrollbar whenever overflowed in the settings/profile page (formbricks#1498)
  fix: long url not getting reset after closing modal (formbricks#1502)
  fix: Unexpected Behavior when Toggling Italics in Text Editor and improve clarity of formatting status (formbricks#1506)
  fix: zod pin validation failing (formbricks#1507)
  fix: Error message on Login not shown  (formbricks#1508)
  fix: downgrade nextjs to fix error with react email (formbricks#1516)
  chore: downgrade next version in formbricks-com (formbricks#1513)
  feat: picture selection question (formbricks#1388)
  feat: formtribe leaderboard update as per today (formbricks#1505)
  fix: Added if statement for preventing use of reserved word in question ID (formbricks#1435)
  fix: Disabling Welcome Card leads buggy preview (formbricks#1320)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hacktoberfest complete these issues to gather points for Hacktoberfest hacktoberfest-accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE][FormTribe 🔥][750 Points] Question Type: Picture Choice

5 participants