aula icon indicating copy to clipboard operation
aula copied to clipboard

Remove redirectOf and FormPageResult?

Open np opened this issue 8 years ago • 5 comments

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.

np avatar Apr 22 '16 08:04 np

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.

andorp avatar Apr 22 '16 14:04 andorp

  • I like the separation of concerns we have.
  • I agree with if two things are really well connected they can be merged into one.

andorp avatar Apr 22 '16 14:04 andorp

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.

np avatar Apr 22 '16 15:04 np

I like this last simplification. @fisx wdyt?

andorp avatar Apr 22 '16 16:04 andorp

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.

fisx avatar Apr 22 '16 16:04 fisx