Issue 5530/add grant application form#5586
Open
vushu wants to merge 6 commits into
Open
Conversation
added 6 commits
May 12, 2026 09:36
Tiggles
reviewed
May 22, 2026
Comment on lines
+199
to
+209
| let formSections: Grants.FormField[] = []; | ||
| if (templateKey === "newProject") { | ||
| formSections = templates.flatMap((it) => it.structured.newProject); | ||
| } | ||
| if (templateKey === "existingProject") { | ||
| formSections = templates.flatMap((it) => it.structured.existingProject); | ||
| } | ||
| if (templateKey === "personalProject") { | ||
| formSections = templates.flatMap((it) => it.structured.personalProject); | ||
| } | ||
| return formSections |
Contributor
There was a problem hiding this comment.
Suggested change
| let formSections: Grants.FormField[] = []; | |
| if (templateKey === "newProject") { | |
| formSections = templates.flatMap((it) => it.structured.newProject); | |
| } | |
| if (templateKey === "existingProject") { | |
| formSections = templates.flatMap((it) => it.structured.existingProject); | |
| } | |
| if (templateKey === "personalProject") { | |
| formSections = templates.flatMap((it) => it.structured.personalProject); | |
| } | |
| return formSections | |
| return templates.flatMap((it => it.structured[templateKey] ?? [])); |
Tiggles
reviewed
May 22, 2026
| | {type: "Reset"} | ||
| ; | ||
|
|
||
| function extractFormFields(templateKey: string, templates: Grants.Templates[]): Grants.FormField[] { |
Contributor
There was a problem hiding this comment.
Suggested change
| function extractFormFields(templateKey: string, templates: Grants.Templates[]): Grants.FormField[] { | |
| function extractFormFields(templateKey: Exclude<keyof Grants.Templates, "type">, templates: Grants.Templates[]): Grants.FormField[] { |
Contributor
There was a problem hiding this comment.
This change might require more work where this function is called, rather than just changing it in the function definition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed template structure from plain_text to a structured form [Acc/Grant] Add structured grant application forms #5530,
There are still some work in the front-end that needs to be done for this structured way of defining a template [Acc/Grant] Manage grant templates in project settings #5532,
I have made some retrofitting function so that we don't break the frontend.
I have moved parsing of markdown from frontend to the backend.
Sorry about the size of the PR :)