Skip to content

UI 7 Breaking changes

Jean-Michel FRANCOIS edited this page Feb 18, 2021 · 28 revisions

We want to prepare breaking changes for the next UI release.


Date


Brain storming

Yes all theses items need to be tested first using POC so we can prepare the future of our tooling.

infrastructure / tooling

  • UI mono repo in independant mode (version / lifecycle)
  • Storybook 6.1
  • ui-scripts support for storybook / remove storybook deps from ui
  • ui-scripts support dynamic import #39
  • cdn 2.0: custom UMDs builds for library used
  • sass lint track
  • remove es5 transpilation target only es6 browser
  • ui-scripts manage polyfills / remove all polyfills from components
  • Bundle sizing impacts on PR
  • Module federation from Webpack 5

Dependencies

  • redux major upgrade #3027
  • ** note here all the dependencies that need attentions, dead, replacement, upgrade, etc ...
  • d3 bundling alignement in recharts recharts#2343
  • popper.js to @popperjs #3157 + rewrite using hook
  • react
  • i18next/react-i18next

Features

  • Icons from Figma

Redux major upgrade #3027

We have changed all the tests because we were used to do {context: store} which is the old way to inject context.

So the new way is this one:

 import { mount } from 'enzyme';
+import { mock } from '../src';
 import { WaitForSettings } from '../src/settings';

                        const wrapper = mount(<WaitForSettings>Hello</WaitForSettings>, {
-                               context: {
-                                       ...
-                               },
+                               mock.Provider.getEnzymeOptions(context),
                        });

Redux-Saga

https://github.com/redux-saga/redux-saga/releases/tag/v1.0.0

-import { call, select } from 'redux-saga/effects';
-import { delay } from 'redux-saga';
+import { delay, call, select } from 'redux-saga/effects';

-yield call(delay, interval);
+yield delay(interval);

prepare a new pre release

export UI_SCRIPT_VERSION=7.0.0-alpha.1
git pull
git checkout -b tmp/$UI_SCRIPT_VERSION
git merge jmfrancois/chore/update-redux
yarn
git commit -am 'chore: prepare release'
git push --set-upstream origin tmp/$UI_SCRIPT_VERSION
lerna version $UI_SCRIPT_VERSION
lerna publish from-package --yes --no-verify-access --dist-tag next