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 empty what happens next markdown field #371

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

DavidBiddle
Copy link
Contributor

@DavidBiddle DavidBiddle commented Nov 16, 2023

What problem does this pull request solve?

Trello card: https://trello.com/c/AbPj2LRr/1191-allow-markdown-on-confirmation-page-what-happens-next-content

Adds a null what_happens_next_markdown field to the form. Also adds this null field to the most recent made_live_form.

To do in other PRs:

  • add logic in the runner (Render what happens next markdown if it's present forms-runner#496) and admin to use the markdown field if it's present, and the HTML if not
  • convert the HTML content in the API into markdown and store it in this new field
  • cleanup: delete the old field and all the logic related to it which we no longer need

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Has all relevant documentation been updated?

@DavidBiddle DavidBiddle force-pushed the add-what-happens-next-markdown-field branch 2 times, most recently from bb55502 to cd2ba71 Compare November 17, 2023 11:13
@DavidBiddle DavidBiddle changed the title Add empty WHN markdown field Add empty what happens next markdown field Nov 20, 2023
@DavidBiddle DavidBiddle force-pushed the add-what-happens-next-markdown-field branch from cd2ba71 to 273bc81 Compare November 20, 2023 10:31
@DavidBiddle DavidBiddle marked this pull request as ready for review November 20, 2023 11:49
@DavidBiddle DavidBiddle force-pushed the add-what-happens-next-markdown-field branch from 273bc81 to c49d665 Compare November 20, 2023 15:17
@DavidBiddle DavidBiddle force-pushed the add-what-happens-next-markdown-field branch from c49d665 to cd93c71 Compare November 20, 2023 15:18
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@aliuk2012
Copy link
Contributor

@DavidBiddle
Copy link
Contributor Author

@aliuk2012 I don't think so at the moment - the seed still works and sets what_happens_next_markdown to null in the database, which is the default value (which we want because that's the state the forms in prod will be in after the migration). Good spot though - I'll add a note to the card so that I remember to update the seed when we do the conversion to markdown.

Copy link
Contributor

@aliuk2012 aliuk2012 left a comment

Choose a reason for hiding this comment

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

I've tested this locally and everything looks good. I tried using form-runner from main branch and also the feature branch and both cases worked perfectly.

@DavidBiddle DavidBiddle added this pull request to the merge queue Nov 21, 2023
Merged via the queue into main with commit 26cdfee Nov 21, 2023
4 checks passed
@DavidBiddle DavidBiddle deleted the add-what-happens-next-markdown-field branch November 21, 2023 16:33
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.

2 participants