Move results out of the `<Form>` they're in now
Not sure how complicated this will get, or even if we should do it. The results aren't really a form semantically, though they do have interactive elements. On the other hand, if we do this, all my plans for abstracting the duplication happening in the instantiation of the sections will be blown away! Well, some of it anyway. It may have other consequences too - the <Form> is currently being used as the container for every section and I'm not sure how much of the heavy lifting it's doing. It may be really easy, though, and beginner friendly...
Thoughts?
OK, so although I don't think it'll make any difference in appearance, I'm onboard with the idea of this for semantics. The first part of the predictions page where you enter future income is still a form, so I think that should be in a <Form>, but maybe the rest shouldn't.
Currently we have a <FormPartsContainer> nested inside a <Form> on each page. Based on some quick experimentation it looks like nothing breaks if we reverse this nesting, putting the <FormPartsContainer> on the outside. (This has to enclose everything on the page since it wraps the nav buttons around it.) So we could reverse that nesting on each page, and then exclude the warning message and tabbed graphs from the <Form> on the results page. It looks like this also doesn't mess up the styles.
Then, I'd guess, we'd want to rename <FormPartsContainer> to something more general.
Nice, thanks for trying that out! How about <ToolSection>, <Form/ToolPage> (since they will be pages not too long from now)? Or... <CESection>
Not sure exactly what renamings you're suggesting, but I think you should go with whatever seems right to you, at least to make the PR.
I'm talking about renaming FormPartsContainer. Of the options, I'm partial to FormPage right now, though I'm not a huge fan of any of them.
Hmm, this would make the abstraction of form sections more difficult - I was going to put the repeated code into <VisitPage>, containing each section's content...
So you're saying you were planning on pulling both the <Form> and <FormPartsContainer> as they are now out into <VisitPage>? Just to make sure I understand.
Yeah, that was my plan. Until now... though we could possibly use a Surrounder...?
Not sure how exactly yet.