Skip to content

Conversation

ShadeWyrm
Copy link
Contributor

Closes #3976

Passes the formId across the application to be able to route to the logic view - so just a quick test to make sure options don't return "undefined" in the URL at the top.

To test:
-> Open or Create a form.
-> Add a question that can have options.
-> Click an option to show "add rules"
-> Click the "add rules", and then click the "Have a complex form? Try branching instead +"

Double check the form has all the stuff you had, and the URL matches. eg: "en/form-builder/0000/edit" vs "en/form-builder/undefined/edit"

Copy link
Contributor

@@ -147,7 +147,9 @@ export const Edit = ({ formId }: { formId: string }) => {
if (element) {
const questionNumber = getQuestionNumber(element, elementTypes);
const item = { ...element, index, questionNumber };
return <ElementPanel elements={sortedElements} item={item} key={item.id} />;
return (
<ElementPanel elements={sortedElements} item={item} key={item.id} formId={formId} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Hopefully in the future we can use a react context for situations like this (lots in the app). Just a future refactoring note when/if we get around to refactoring the app state management and definitely something for outside of this PR.

@ShadeWyrm ShadeWyrm enabled auto-merge July 22, 2024 18:16
Copy link
Contributor

@thiessenp-cds thiessenp-cds left a comment

Choose a reason for hiding this comment

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

Nice work! LGTM :)

@ShadeWyrm ShadeWyrm merged commit 138cb5f into develop Jul 24, 2024
13 checks passed
@ShadeWyrm ShadeWyrm deleted the feat/small-link-to-logic branch July 24, 2024 18:53
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.

Moving people over to the logic view
2 participants