nextjs-wordpress-starter icon indicating copy to clipboard operation
nextjs-wordpress-starter copied to clipboard

Break frontend into packages

Open ravewebdev opened this issue 4 years ago • 5 comments

Similar to the new monorepo plugin setup, break the NextJS frontend into packages, such as the following:

  • [ ] Core - next/auth, ACF custom settings (to be moved out of ACF at a later time per #635)
  • [ ] Block Handler - include in core for 1.0.0, break out into separate package at a later time
  • [ ] Algolia
  • [ ] Gravity Forms
  • [ ] ACF - custom blocks, fields
  • [ ] SEO
  • [x] LazyBlocks, CPTs - remove entirely

ravewebdev avatar Aug 31 '21 21:08 ravewebdev

9/1 EOD

  • Discussion with @gregrickaby to narrow down frontend packages and clarify plan for moving forward.
  • Continued setting up core package structure.

ravewebdev avatar Sep 01 '21 21:09 ravewebdev

9/2 EOD

  • core package:
    • Added Apollo client handling
    • Added WP config handling to allow for dynamic WP-related env var usage
    • Added WP Apollo client handling
    • Added auth handling: user login, registration, refresh token queries and function calls
    • Added post comment fragment
    • Added function to dynamically create single post data fragment

ravewebdev avatar Sep 02 '21 21:09 ravewebdev

9/3 EOD

  • core package:
    • Added remaining post handling (single, archive, category archive, tag archive)
    • Added single page handling (standard dynamic pages)
    • Added generic post type retrieval handling (single, archive, taxonomy archive)

ravewebdev avatar Sep 03 '21 21:09 ravewebdev

9/7 EOD

  • core package:
    • Added displayBlock function with dynamic imports
    • Added all currently-supported core block components with dependent components and functions
    • Started adding route helper functions:
      • getPropTypes
      • getNextStaticPaths (single pages/posts only)
      • getNextStaticProps (single pages/posts, archives, category/tag archives, next/auth frontend routes)
    • Added query for error 404 page with function to retrieve a specified custom page set via headless config

ravewebdev avatar Sep 07 '21 21:09 ravewebdev

9/8 EOD

  • core package:
    • Expanded handling getNextStaticPaths and getNextStaticProps
    • Misc fixes
  • Started working on basic example to work with core package
  • Troubleshooting package imports

ravewebdev avatar Sep 08 '21 22:09 ravewebdev