Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

2.0 Release plan #1076

@zamotany

Description

@zamotany
  • Upgrade react-router to version 4 Upgrade React Router from version 3 to 4 #1072
    • rename gsBeforeRoutes to onEnter
    • use routes config instead of components
    • ❓ call onEnter and await the results on server, but on client navigate and call other hooks
    • ❓ leverage HOC for data loading and other routes related tasks, sth like:
    function getRoutes(store, httpClient) {
      return [
        {
          component: MasterLayout,
          routes: [
            {
              path: '/',
              exact: true,
              component: withDataLoader({
                async onEnter(match, request) { /* ... */ },
                shouldReloadData() { return true; },
                Loading: Spinner
                onError(error) { /* handle error */ }
                /* ... */
              })(HomeApp)
            },
          ],
        },
      ];
    }
    • integrate scrolling behaviour
    • extend withDataLoader options
    • update templates
    • final touches
  • Unify configuration
    module.exports = [
      {
        name: 'main',
        path: '/',
        Document: './apps/main/Index.js',
        reducers: .'/apps/main/reducers',
        routes: './apps/main/routes',
        config: { /* .... */ },
      },
      {
        name: 'test',
        path: '/test',
        Document: './apps/test/Index.js',
        reducers: './apps/test/reducers',
        routes: './apps/test/routes',
      },
    ];
    • fully app specific configuration (eg to configure redux, httpClient and so on)
    • single file for gluestick config, webpack configs, caching, plugins, hooks
  • Revamp plugin system and concat it with hooks
    • hooks will be a plugins
    • plugins will need to implement hook method if they want to plug itself in:
    class MyPlugin {
      constructor(/* initial data + helpers/utils */) { /* ... one-time setup */}
      exampleHook(/* args */) {},
      async exampleHook2(/* args */) {}
    }
    // or 
    function MyPlugin(/* initial data + helpers/utils */) {
       /* ... one-time setup */
      return {
        exampleHook(/* args */) {},
        async exampleHook2(/* args */) {}
      }
    }
    • support for both async and sync plugin hooks
    • more hooks
    • each plugin can execute other plugins
  • modularize commands - each command will have it's own lifecycle:
    module.exports = {
      setup(commander) {
        // define itself
      },
      run() {
        // do sth
      }
      // ...
    };
    This will allows us to support more advanced scenarious where we need to alter the command
    behaviour + commands plugins
  • guides and full documentation
  • presets Project presets #992
  • updates to default project template
  • ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions