Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor formschema logic from LeftAndMain into its own abstract class #1762

Closed
GuySartorelli opened this issue May 30, 2024 · 2 comments
Closed

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented May 30, 2024

Currently LeftAndMain is bloated with logic for setting up formschema, but that isn't needed by most of its subclasses. This should be moved into its own class so the logic is only available where it's needed, and to make LeftAndMain easier to maintain.

Related

Notes

  • The exact name of the class isn't important - if you think of a better name, feel free.

Acceptance Criteria

  • A new abstract FormSchemaController class is created, and is a subclass of AdminRouteController (see Refactor admin/* routing logic from LeftAndMain into its own abstract class #1761)
  • Methods, properties, and configuration required for formschema functionality are moved from LeftAndMain to the new class (see this comment for recommendations about this)
  • ModalController is a subclass of the new controller
  • ModalController handles the routes which currently require creating a singleton of LeftAndMain for formschemas
  • Any controller in supported modules that currently subclasses LeftAndMain but only needs the formschema logic is made to subclass the new class instead (e.g. LinkFieldController)
  • Documentation is updated to indicate best practice for form schema controllers

PRs

CMS 5 PRs

After merging reassign to Guy so they can merge up and rebase the CMS 6 PRs

CMS 6 PRs

Kitchen sink CI

@GuySartorelli GuySartorelli added this to the Silverstripe CMS 6 milestone May 30, 2024
This was referenced Nov 12, 2024
@GuySartorelli GuySartorelli removed their assignment Nov 14, 2024
@emteknetnz emteknetnz removed their assignment Nov 14, 2024
@emteknetnz
Copy link
Member

@GuySartorelli Thinks are looking good, could you just do a final updated kitchen sink run just to make sure everything integrated correctly

@GuySartorelli
Copy link
Member Author

That's massive overkill considering the scope of the changes since the last run:

  • some docs
  • some comments
  • subsites specifically got rebased on top of some innocuous changes

I'll do it just to avoid ping pong, but it's really not necessary here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants