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

Feature/populate voyage submission form #131

Merged
merged 12 commits into from
Apr 12, 2024

Conversation

timDeHof
Copy link
Collaborator

@timDeHof timDeHof commented Apr 6, 2024

Description

This PR introduces a series of changes aimed at enhancing the codebase's maintainability, readability, and overall organization. Specifically, it focuses on the standardization of form titles and the introduction of a new form submission seed. Below is a summary of the key modifications and their impact on the project:

  • Imported the FormTitles constants across various modules (checkinform.ts, solo-project.ts, voyage-app.ts, and forms) to replace hard-coded strings with constants. This will improve the readability and maintainability of the code by centralizing form titles in one location, while ensuring consistency across the application.

  • Introduced a seed file voyage-project-submission.ts for the 'Voyage Project Submission form. This file contains a populateVoyageSubmissionForm` function that facilitates the creations and population of a new form in the database. This form is designed for submitting and sharing finished Chingu projects and includes fields for project details, experience feedback, and a rating scale for recommending Chingu to others

Issue link

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature updates / changes
  • Tests
  • 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 requires a documentation update

How Has This Been Tested?

run the script yarn seed to verify that there isn't any problems in the form that are using FormTiltle's constants. Then run the usual unit and e2e tests.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • 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 tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the change log

…stants/formTitles to improve code readability and maintainability

The import statement has been added to import the FormTitles constant from the src/global/constants/formTitles module. This change improves code readability and maintainability by using a constant instead of a hard-coded string for the title of the check-in form.
…itles to improve maintainability

The title field in the solo-project.ts file has been updated to use the constant FormTitles.soloProjectSubmission instead of the hard-coded string "Solo Project Submission Form". This change improves maintainability by centralizing the form title in a separate file and allows for easier updates in the future.
…constant from formTitles

The title of the voyage application form has been updated to use the constant `FormTitles.voyageApplication` from the `formTitles` module. This improves maintainability and ensures consistency across the application.
… readability and maintainability

fix(forms): update title of a form to use FormTitles.sprintPlanning constant for consistency and easier maintenance

The import statement has been added to import the FormTitles constant from the global constants file. This improves code readability and maintainability by using a constant instead of a hard-coded string.

The title of a form has been updated to use the FormTitles.sprintPlanning constant instead of a hard-coded string. This change improves consistency and makes it easier to update the title in the future.
A new form title "Voyage Submission Form" has been added to the FormTitles constant. This allows for better organization and clarity when referencing the Voyage Submission Form in the codebase.
…roject submission form

The new file `projectsubmission.ts` contains a seed function `populateVoyageSubmissionForm` that creates a form in the database for submitting and sharing finished Chingu projects. The form includes various questions such as the project name, description, Github repo link, deployed project link, project showcase video link (optional), positive aspects of the experience (optional), comments on the experience (optional), and a rating scale for suggesting Chingu to others. This seed file allows for easy population of the Voyage project submission form in the database.
…jectSubmission for clarity

The form title for the voyageSubmission form has been updated to voyageProjectSubmission to provide more clarity and accurately reflect the purpose of the form.
@timDeHof timDeHof marked this pull request as ready for review April 9, 2024 00:14
…orm seed

The CHANGELOG.md file has been updated to include an entry for the addition of a voyage project submission form seed. This seed was added as part of pull request #131.
@timDeHof timDeHof self-assigned this Apr 9, 2024
siasktv
siasktv previously approved these changes Apr 11, 2024
Copy link
Contributor

@siasktv siasktv left a comment

Choose a reason for hiding this comment

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

Looks all good and tests all passed!

@cherylli
Copy link
Collaborator

@siasktv did you run prisma db seed did it work for you?

The import paths for the FormTitles module in the seed files have been updated to reflect the correct file location. The previous import paths were incorrect and caused errors when running the seed scripts. This change ensures that the seed files can access the FormTitles module correctly and populate the forms with the correct data.
@timDeHof
Copy link
Collaborator Author

@siasktv did you run prisma db seed did it work for you?

Sorry, it was a mistake on my part. I didn't have the correct import path for FormTitles constants.I'll add testing for it in the PR description.

@cherylli
Copy link
Collaborator

I ran db seed but it wasn't populating the database I think the function wasn't called

…ed data

The voyage project submission form is added to the list of forms to be populated in the seed data. This form allows users to submit their project details for a voyage. The form includes fields for project description, Github repo link, deployed project link, project showcase video link, positive aspects of the experience, and any additional comments or feedback. This form is necessary to collect project information from users applying for a voyage.
@timDeHof
Copy link
Collaborator Author

I ran db seed but it wasn't populating the database I think the function wasn't called

yes, sorry about that. I forgot to add it to the forms index.ts then there was typos in the seed form but its should be fixed now.

Copy link
Collaborator

@cherylli cherylli left a comment

Choose a reason for hiding this comment

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

rerun seed and database is populated properly now, all existing tests passed as well. Thanks!

Copy link
Contributor

@JoshuaHinman JoshuaHinman left a comment

Choose a reason for hiding this comment

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

e2e and unit tests passed - looks good!

@timDeHof timDeHof merged commit 6d29726 into dev Apr 12, 2024
1 check passed
@timDeHof timDeHof deleted the feature/populate-voyage-submission-form branch April 12, 2024 14:08
@timDeHof timDeHof removed the request for review from curtwl April 12, 2024 14:09
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

4 participants