Skip to content

Releases: newscorp-ghfb/NewsKit

v6.1.0

20 Sep 13:58
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

Bug Fixes πŸ›

Other Changes 🧱

New Contributors

Full Changelog: v6.0.0...v6.1.0

v6.0.0

29 Aug 12:09
Compare
Choose a tag to compare

What's Changed

Breaking Changes πŸ› 

New Features πŸŽ‰

Bug Fixes πŸ›

Other Changes 🧱

Full Changelog: v5.7.0...v6.0.0

New Contributors

NewsKit v6 Migration Guide

NewsKit Provider

NewsKitProvider replaces the top-level ThemeProvider, internally this provider includes:

  • ThemeProvider
  • MediaQueryProvider
  • InstrumentationProvider
  • LayerManager

That means if your current app looks like this

<InstrumentationProvider {...instrumentation provider props..}>
  <ThemeProvider theme={theme}>
    <App />
  </ThemeProvider />
</InstrumentationProvider>

Needs to be updated to this:

<NewsKitProvider theme={theme} instrumentation={...instrumentation provider props..}>
  <App />
</NewsKitProvider>

When you create sub-themes the <ThemeProvider /> still can be nested to facilitate that.

We also introduced a new LayerManager that handles stacking context ( z-index ) depending on the way you build the custom components you might need to adjust NewsKitProvider as passing zIndex value so that newskit components like Modal and Drawer render above your custom components.

<NewsKitProvider layer={{zIndex: 999}}> .... </NewsKitProvider>

Emotion packages as peer dependencies

Starting from version 6, newskit does not include @emotion/styled & @emotion/react libraries, which means you need to install these separately:

// npm
npm install newskit@6.0.0 @emotion/react @emotion/styled
// or yarn
yarn add newskit@6.0.0 @emotion/react @emotion/styled

Icons

Starting from version 6, newskit does not include emotion icons, you have to install @emotion-icons/material and @emotion-icons/material-outlined and import them manually.

You can also search for the corresponding icon here https://emotion-icons.dev/ and follow the example below:

// Old way
import { IconFilledAccountTree } from 'newskit';

// New way
import {toNewsKitIcon} from 'newskit';
import {AccountTree} from '@emotion-icons/material/AccountTree';
const IconFilledAccountTree = toNewsKitIcon(AccountTree);

We also provide a codemod for that transformation, so you don’t have to do it manually.

npx @newskit/codemod emotion-icons 'components/**/*.+(ts|tsx|json)'

From Enum to Union Types

We removed all typescript Enum from newskit and replaced them with Union types.
For example:

// Old
<Button size={ButtonSize.Small}>Button</Button>

// New
<Button size="small">Button</Button>

We also provide a codemod for that transformation, so you don’t have to do it manually.

npx @newskit/codemod enum-to-union 'components/**/*.+(ts|tsx|json)'

UnorderedList has a circle icon as a marker by default

Before version 6, UnorderedList component did not include any marker icon by default, from v6.
If you still need that behaviour you can remove the icon by passing null to listItemMarker prop.
For example:

<UnorderedList listItemMarker={null} />

We also provide a codemod for that transformation, so you don’t have to do it manually.

npx @newskit/codemod update-list-item-marker-ul-value 'components/**/*.+(ts|tsx|json)'

Codemods

For most of the breaking changes, we provide codemods which would provide an easy migration to v6, checkout @newskit/codemod package at NPM for the complete list of scripts.

v5.7.0

18 Jul 11:41
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

Bug Fixes πŸ›

Other Changes 🧱

New Contributors

Full Changelog: v5.6.0...v5.7.0

v5.6.0

27 Jun 09:08
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

Bug Fixes πŸ›

Other Changes 🧱

New Contributors

  • @khadirkilo92 made their first contribution in #216

Full Changelog: v5.5.0...v5.6.0

v5.5.0

13 Jun 12:31
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

Bug Fixes πŸ›

Other Changes 🧱

Full Changelog: https://github.com/newscorp-ghfb/newskit/compare/v5.4.6...trigger-release@5.5.0

V5.4.6

30 May 12:44
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

Bug Fixes πŸ›

Other Changes 🧱

Full Changelog: https://github.com/newscorp-ghfb/newskit/compare/v5.4.5...trigger-release@5.4.6

V5.4.5

12 May 14:49
Compare
Choose a tag to compare

What's Changed

Bug Fixes πŸ›

  • Fix/ppdsc 2160 Fixed NewsKit package release by @Vanals in #197

Full Changelog: https://github.com/newscorp-ghfb/newskit/compare/v5.4.4...trigger-release@5.4.5

V5.4.4

12 May 14:31
Compare
Choose a tag to compare

VERSION DEPRECATED -- PLEASE USE V5.4.5 INSTEAD

What's Changed

Bug Fixes πŸ›

  • fix(PPDSC-2160): Fixed pipeline error, which did not allow proper NewsKit package publishment by @Vanals in #196

Other Changes 🧱

Full Changelog: https://github.com/newscorp-ghfb/newskit/compare/v5.4.3...trigger-release@5.4.4

v5.4.3

11 May 14:02
Compare
Choose a tag to compare

VERSION DEPRECATED -- USE 5.4.5 INSTEAD

What's Changed

New Features πŸŽ‰

Bug Fixes πŸ›

Other Changes 🧱

Full Changelog: https://github.com/newscorp-ghfb/newskit/compare/v5.4.2...trigger-release@5.4.3

v5.4.2

26 Apr 14:56
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

Bug Fixes πŸ›

Other Changes 🧱

New Contributors

Full Changelog: https://github.com/newscorp-ghfb/newskit/compare/v5.4.0...trigger-release@5.4.2