Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Add Layout, Placement, and Component Models #92

Open
3 tasks
alexfinnarn opened this issue Jul 1, 2021 · 0 comments
Open
3 tasks

Add Layout, Placement, and Component Models #92

alexfinnarn opened this issue Jul 1, 2021 · 0 comments

Comments

@alexfinnarn
Copy link
Contributor

The "Custom Fund Landing Page" content type on the Giving site is really just a page with a "listing component" that displays funds. To complete the migration of that content type, a separate "Landing Page" model would need to be created, or probably better yet, it's time to add the concept of layouts.

The Page model can have a Layout attached to it in a one-to-one relationship where a Layout belongs to a Page and a Page has one Layout. The layout will be displayed at /pages/[slug]/layout.

The Layout consists of Components through a Placement relationship. A Placement can store positional information not specific to any component. This also allows components to be placed in many layouts.

Acceptance Criteria

  • Layout model added with relationships to Page and also Component via Placement
  • Component model created with type:string props:jsonb and relationship to Placement. Will need to flesh out how components are created and stored better, but a form into JSON can work and be flexible for now.
  • Placement model created with relationship to Component and Page.

Next Issue

I'm sure the way layouts work will change as the concepts and code are fleshed out, but too murky to tell anything more right now.

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

No branches or pull requests

1 participant