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

Add project form questions #335

Merged
merged 6 commits into from
Jan 15, 2025
Merged

Add project form questions #335

merged 6 commits into from
Jan 15, 2025

Conversation

juancwu
Copy link
Contributor

@juancwu juancwu commented Jan 7, 2025

Description

All the questions from Notion have been added.

Explanation of new columns added to the project_questions table.

sub_section_order is the order for the questions to be rendered inside a sub section.

input_type is not an enum because of the need to allow multiple types for one question. Such as allowing users to input a URL to a google drive with documents or just uploading files. So having a varchar which allows the syntax A|B would make more sense and it would be more flexible.

options is a nullable column which contains the options for input types select, checkbox, radio.

Possible improvements is to store the order of sections too and these can be in a separate table or just defined in the frontend.

Linked Issues

Testing

  • Migrations are ran in test action

Checklist

Before opening this PR, make sure the PR:

  • Has an assignee or group of assignees.
  • Has a reviewer or a group of reviewers.
  • Is labelled properly.
  • Has the SPUR project assigned to it.
  • Has an assigned milestone.

Additionally, make sure that:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

@juancwu juancwu added enhancement New feature or request backend Related to the backend of the project labels Jan 7, 2025
@juancwu juancwu added this to the Complete the project MVP milestone Jan 7, 2025
@juancwu juancwu self-assigned this Jan 7, 2025
@juancwu juancwu linked an issue Jan 7, 2025 that may be closed by this pull request
4 tasks
add some questions and alter the project_questions table to be more
robust
the enum for input type was removed because the option to include
multiple inputs, such as url or file(s)
@juancwu juancwu force-pushed the feat/189/seed-db-with-questions branch from 2c5145a to b94ba9d Compare January 11, 2025 18:45
@juancwu juancwu marked this pull request as ready for review January 11, 2025 19:15
Copy link
Member

@AmirAgassi AmirAgassi left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@AmirAgassi AmirAgassi left a comment

Choose a reason for hiding this comment

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

just the tests need updating

the tests relied on the questions added by migration files which makes
this method not reliable. The migration questions change all the time so
it's better to remove the migrated questions and seed sample questions
for testing.
Copy link
Member

@AmirAgassi AmirAgassi left a comment

Choose a reason for hiding this comment

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

lgtm 🔥

@juancwu juancwu merged commit e5362a2 into main Jan 15, 2025
4 checks passed
@juancwu juancwu deleted the feat/189/seed-db-with-questions branch January 15, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to the backend of the project enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BE Feat] Seed database with company creation questions
2 participants