ProjectEvergreen / greenwood

Greenwood is your workbench for the web, embracing web standards from the ground up to empower your stack from front to back.
https://greenwoodjs.dev
MIT License
99 stars 10 forks source link

Roadmap To 1.0 And Beyond #418

Closed thescientist13 closed 3 years ago

thescientist13 commented 4 years ago

This issue is intended to outline a the short and long term planning of the project for review and consensus gathering. It is broken down into the following milestones as part of the discovery done as part of the NoNo POC and the work to port that to Greenwood here in #417.

This will also serve as a way to update current GitHub Issues, Projects, Milestones

Questions

Feature Parity (relatively) by 12/31/2020

This is work needed to accomplish the bulk of the work necessary to get #355 merged without much disruption to existing users. Merged into an ongoing release/1.0.0 release branch and tracked in the Architecture Digest Project / MVP Milestone.

Will want to validate these using an rc or next branch release before merging into master

Main thing here should be ensure that performance improves significantly and a number of existing issues in the backlog can be resolved. Each of the below numbered items would be a PR and tracked in the release branch PR.

  1. PR and associated TODOs from #417
  2. Refactor serve.js into plugin based architecture bring done as part of #185
  3. SPA support - delegated to #354
  4. GraphQL as a package, or something simpler
  5. Handle loading prismjs - delegated to #427
  6. How to handle user context options / default CLI templates/ - tracked in #428
  7. Refactor serve.js into middleware based design - #519
  8. create JSON and CSS plugins using import.meta.url - see #185
  9. Smarter handling of <title></title> tag, takes a function? - deferred to #304
  10. !Restore Polyfill and Google Plugins - will be deferred to #185
  11. Babel / PostCSS / Browserslist support - created #426
    • restore nested styles
    • enable for dev mode
  12. Enable / get all specs passing - tracked in #428
  13. Rollup refactoring - tracked #428
    • bundle everything from www/?
    • how to handle empty chunks warning from rollup?
    • avoid style.js file being generated by rollup CSS plugin
  14. figure out why I can't use pages/blog/index.html fixed by #417
  15. confirm body[unresolved] is still an issue - see #433
  16. confirm import-map support shim needed (for local dev) #485
  17. handling paths in templates, e.g. ./, ../, normalize everything to /?, also associated with route misses with using / - tracked in #435
  18. Revisit all documentation tracked in #430
  19. Test more dependencies to ensure proper handling of CJS vs ESM based - tracked in #429
  20. Publish to next branch and test in critical consumer projects - #485

Roadmap to 1.0 by 12/31/2021

Things we should try and complete by end of year to achieve a 1.0. The aim is to complete low effort features that introduce / exercise new APIs, rounds out certain key features needed as part of the Feature Parity work.

  1. [x] Noticed that the CSS puppeteer (and whitespace from us?) puts into an index.html page is almost 10KB!!! This may be causing style collisions colliding with styles šŸ‘† ? Either way, we should control the HTML output. If want to support inlining CSS great, but then we also shouldn't ship it over the network either. One or the other. Will make an issue to track this specific issue of junk in the trunk, and another to track optimizing for inlining CSS (may not work "work" for CSS-in-JS or else you get the FOUC thought...). - see #453 for more context
    • will leave this the way it is for now
  2. [x] Right now we have to process everything twice to support the user's PostCSS / Babel (once in serve and again in bundle / rollup since we read from file, not the server) in Rollup . It would be nice if Rollup could start from the processed output of the serve lifecycle so we don't have to re-run userland PostCSS again. In general, Rollup is doing a lot of inefficient work, would be great to refactor the whole thing from top to bottom. - see #453 for more context
    • not sure what exactly would was actionable here so not sure anything is needed here. I think by disabling pre-rendering as part of #518 , this duplication concern would be avoided.
  3. [x] better lockstepping between serve and rollup for knowing all pages, e.g. sharing graph.json, but still try and keep it async?
    • not sure what exactly would was actionable here, assuming the input for Rollup could just point to src/>. Nothing worth tracking for now, IMO.
  4. [x] Query Sorting / Filtering - do this server side and inject current page for grapqhl side / slimmer fetching? do this through the client instead (filter out the "dead pages" at the response level)?'
    • I think this was meant to be along the lines of a getServerSideProps type thing from NextJS. I think this is better captured as a 2.0 discussion topic instead of window.location.
  5. [x] unit testing development
  6. [x] Determine Node version and use of import, also (node:82640) ExperimentalWarning: The fs.promises API is experimental
    _nodemodules[(https://twitter.com/pikapkg/status/1306643472804278272).
  7. [x] https://www.reddit.com/r/node/comments/fidzj9/fdir_the_fastest_directory_crawler_for_nodejs_10k - not sure if the extra dep is worth it, tbh
  8. [x] replace JSDOM with something lighter / faster? - does it matter, only used for tests? - refactored a bit in #497
  9. [x] Can be run via npx (0CJS - zero config JS) - confirmed as part of #499
  10. [x] Good First Issues for Hacktoberfest - N / A
  11. [x] GitHub backlog
  12. [x] Validate if better HTML rendering is possible for second case - https://github.com/thegreenhouseio/www.thegreenhouse.io/issues/133
    • No special indentation
    • No restrictions on whitespace
    • Settings?
  13. [x] 1.0 Release Blog Post on project evergreen website
  14. [x] Make sure all TODOs in code are resolved or tracked - done in #497
  15. [x] eslint-plugin-lint - N / A
  16. [x] refactor develop vs prod server and to use standard plugins (if applicable) - https://github.com/ProjectEvergreen/greenwood/issues/519
  17. [x] refactor liveServer into its own plugin. also, how to handle reloading for custom files e.g. .foo? - done as part of #471
  18. [x] we need to add support for more font / icon types - https://github.com/ProjectEvergreen/greenwood/issues/521
  19. [x] should Greenwood standard plugins be pushed to plugins array? - https://github.com/ProjectEvergreen/greenwood/issues/520
  20. [x] Handle inline <script> and <style> tags for develop (and prod, of course). Not sure if this can wait until post 1.0, but putting it on this roadmap for now. - https://github.com/ProjectEvergreen/greenwood/issues/534
  21. [x] Favicons plugin, and add one to getting started repo - https://github.com/ProjectEvergreen/greenwood/issues/194
  22. [x] add support for @apollo/client in client.js - https://github.com/ProjectEvergreen/greenwood/issues/535
  23. [x] need to ensure a clear distinction between when file extensions are / aren't needed when using import as the spec says they should always be there but for now, will make it so _nodemodules can be bare, and can make an issue to add support for bare module specifier as a plugin - https://github.com/ProjectEvergreen/greenwood/issues/536
  24. [x] should implement shared package.json dependency walker for importMaps like in plugin-babel / regenerator-runtime - https://github.com/ProjectEvergreen/greenwood/issues/537
  25. [x] Currently need to have distinction between common and server client's until we can get to node v14 where we can use import on NodeJS code - https://github.com/ProjectEvergreen/greenwood/issues/532
  26. [x] Make plugin-graphql DRY for importMap and rollupAlias - https://github.com/ProjectEvergreen/greenwood/issues/538
  27. [x] Should really implement server.stop handling on process end - https://github.com/ProjectEvergreen/greenwood/issues/539
  28. [x] try and avoid need for createCache round-robin? šŸ¦ - https://github.com/ProjectEvergreen/greenwood/issues/541
  29. [x] Upgrade Node v14 - https://github.com/ProjectEvergreen/greenwood/issues/532
  30. [x] eject functionality - done!
  31. [x] refactor plugin-babel to not have to require manual installation of Babel deps like regenerator-runtime
  32. [x] top level pages don't merge their own <title> / <meta> tags (bug) - https://github.com/ProjectEvergreen/greenwood/issues/530
  33. [x] improve coverage coverage - get these branches up! and develop / serve tasks (+ server plugin / interface) - https://github.com/ProjectEvergreen/greenwood/issues/47
  34. [x] imports from markdown frontmatter - https://github.com/ProjectEvergreen/greenwood/issues/529
  35. [x] default command should be build? (for npx) - discussion - https://github.com/ProjectEvergreen/greenwood/discussions/528
  36. [x] extract front matter contents from remark-frontmatter instead of separate frontmatter lib - https://github.com/ProjectEvergreen/greenwood/issues/531
  37. [x] rollup refactoring - hardcoded paths to .greenwood/, public/, path references, lot of (nested) loops - https://github.com/ProjectEvergreen/greenwood/issues/542
  38. [x] copy assets from code, or general copy plugin - https://github.com/ProjectEvergreen/greenwood/issues/543
  39. [x] In the Getting Started repo (npm), seeing this warning from Rollup - https://github.com/ProjectEvergreen/greenwood/issues/526
     @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
  40. [x] Should create an issue to track determining best optimization settings based on mode setting (at least by default). Not all scripts are created equally, preload vs prefetch. Router and GraphQL should probably use prefetch. - https://github.com/ProjectEvergreen/greenwood/discussions/545
  41. [x] Should make an issue to tracking adding per <link> / <script> overrides for inline and static optimization settings
  42. [x] Should make an issue to track adding per <link> / <script> overrides for preload or prefetch hints - https://github.com/ProjectEvergreen/greenwood/issues/546
  43. [x] For partial route filename hashing, might require a refactoring of how HTML optimization happens, since when doing it during serialization, you only assume that that one individual page has been built (since we are in a loop), and not the entire set, which means you can't use the graph to operate on the whole group to generate the same <routes for all pages. Saved a WIP branch here and will track as a follow up discussion. https://github.com/ProjectEvergreen/greenwood/issues/547
  44. [x] Lighthouse test all pages - https://github.com/ProjectEvergreen/greenwood/issues/524
  45. [x] Start a discussion about how to scale and apply a consistent design system over time to the website on pace for 1.0 release, to account for new features intended to be added that can be incorporated - https://github.com/ProjectEvergreen/greenwood/discussions/503
  46. [x] Would be good start a discussion on investigating opportunities to make pre-rendering less dependent on Puppeteer like creating a HydrateElement or looking into things like Declarative Shadow DOM - https://github.com/ProjectEvergreen/greenwood/discussions/548
  47. [x] Browserslist: caniuse-lite is outdated. - https://github.com/ProjectEvergreen/greenwood/issues/525
    Please run: npx browserslist@latest --update-db
  48. [x] On content change, need to refresh graphql server in development and generate new _graph.json) (Use mutations to patch on the fly???) - https://github.com/ProjectEvergreen/greenwood/issues/549
  49. [x] Make id unique to the route - https://github.com/ProjectEvergreen/greenwood/issues/552
  50. [x] There is a double item.item in children query? - https://github.com/ProjectEvergreen/greenwood/issues/552
  51. [x] Should only used Named exports - https://github.com/ProjectEvergreen/greenwood/issues/551
  52. [x] eliminate rollup plugin and use intercept? - https://github.com/ProjectEvergreen/greenwood/discussions/550
  53. [x] Starter kits (discussion) - https://github.com/ProjectEvergreen/greenwood/discussions/523

Post 1.0

These are tasks that can be worked on in the normal course of maintaining Greenwood and shouldn't require introducing any breaking changes. Really valuable features should have the Post 1.0 Milestone assigned so that contributors can get some visibility into where help could be applied. Post 1.0, we would probably moved to quarterly time boxed projects to track our status.

Maybe when we get to this point, we can all pick a couple tasks and start from there? We can keep this list flexible. 1, Image loading plugin

  1. Explore strict mode for Greenwood website
  2. generate import map as JSON file and import from a Githubissues.
  3. Githubissues is a development platform for aggregating issues.