aula
aula copied to clipboard
Remove redirectOf and FormPageResult?
If we stick to form handlers which always redirect we can simplify our infrastructure by moving FormPageResult
and redirectOf
. Instead each form must return the redirect path (Path.Main
).
This would be simpler shorter and slightly less convoluted at the expense of making impossible to not redirect one day.
If we will implement preview markdown in server-side we need not a version that does not do redirect. That question is still undecided. I would wait for the Markdown implementation and make this change afterwards.
- I like the separation of concerns we have.
- I agree with if two things are really well connected they can be merged into one.
It occurred to me more than once, what should I put as the FomPageResult
? And realizing that so far its only purpose is to provide enough information for redirectOf
.
An alternative simplification is to change the default FormPageResult
to Path.Main
and change the default of redirectOf to const id
. we then get a compromise. We simplify the form handler which are only redirecting and leave the option for the others.
I like this last simplification. @fisx wdyt?
i like it, too. i don't want to do it now, but it's good that we have a record of the idea here.