Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

v7 #1012

Closed
14 of 20 tasks
wheresrhys opened this issue Jul 5, 2017 · 1 comment
Closed
14 of 20 tasks

v7 #1012

wheresrhys opened this issue Jul 5, 2017 · 1 comment

Comments

@wheresrhys
Copy link
Contributor

wheresrhys commented Jul 5, 2017

  • tidy up namespacing
    • tidy up where props of window.FT get defined
  • sort out the ridiculous paths generated in source maps
  • get rid of bootstrap() ?
    • revisit perfMark('appJsExecuted'); dispatchLoadedEvent();
  • remove preact
    • add mechanism for apps to extend build config (so they can still use preact)
    • do something with typeahead (remove and precompile, or rewrite)
  • n-ui config just passed in to app/res.locals in app
  • rename all n-ui’s internal partials to not include n-ui/ (?)
  • don't output o-header subnav
  • main-without-n-ui.js -> main.js
  • Could n-ui be an npm dep only?
  • make it possible for apps not to have their own js
  • remove tooltip
  • enforce having flags turned on
  • Think about mechanism for selecting stylesheets per page
    • Should n-ui sheets & main.css be included by default/via a special app setting, or explicitly set per controller (same as any other stylesheet)
    • bundle n-ui shared styles, so that apps no longer have to build them
    • move n-ui styles to different path
@wheresrhys wheresrhys mentioned this issue Oct 10, 2017
Merged
@wheresrhys
Copy link
Contributor Author

wheresrhys commented Oct 12, 2017

n-ui v7 upgrade guide

  • main-without-n-ui -> main in .gitignore
  • instead of
import { bootstrap } from 'n-ui';
bootstrap(({ flags, allStylesLoaded, appInfo} ) => {
   // your app code
})

use

import { flags, allStylesLoaded, appInfo, onAppInitialized } from 'n-ui';

// your app code

onAppInitialized();

Rather than passing flags around, you can import from n-ui wherever you want to use them

  • delete client/n-ui-config.js and assign its contents (server side) to app.locals.nUiConfig
  • where preact is used (only the article app now, possibly kat stuff too) explicitly use preact-compat instead of React and React-Dom - the build no longer does clever stuff around this
  • o-header subnav styles (only used on stream page and myFT page AFAIK) need to be output explicitly
  • import tracking from 'n-ui/components/n-ui/tracking' -> import { tracking } from 'n-ui'
  • import ads from 'n-ui/components/n-ui/ads' -> import { ads } from 'n-ui'

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

2 participants