From 7cab3c1794058980bd8b99b7767d11e47ade31d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B8egh?= Date: Fri, 24 Feb 2023 14:56:26 +0100 Subject: [PATCH] docs: remove `smoothscroll-polyfill` as a recommendation --- packages/dnb-design-system-portal/gatsby-browser.js | 3 --- packages/dnb-design-system-portal/package.json | 3 +-- .../docs/uilib/components/global-status/demos.md | 2 -- .../src/docs/uilib/components/global-status/info.md | 13 +------------ yarn.lock | 8 -------- 5 files changed, 2 insertions(+), 27 deletions(-) diff --git a/packages/dnb-design-system-portal/gatsby-browser.js b/packages/dnb-design-system-portal/gatsby-browser.js index 63aa37f016c..a21ac74d39e 100644 --- a/packages/dnb-design-system-portal/gatsby-browser.js +++ b/packages/dnb-design-system-portal/gatsby-browser.js @@ -9,9 +9,6 @@ import { rootElement, pageElement, } from './src/core/PortalStylesAndProviders' -import smoothscroll from 'smoothscroll-polyfill' - -smoothscroll.polyfill() if (typeof window !== 'undefined') { setIsTest(window.location) diff --git a/packages/dnb-design-system-portal/package.json b/packages/dnb-design-system-portal/package.json index 5ed9d6e3fd2..d20cf83252b 100644 --- a/packages/dnb-design-system-portal/package.json +++ b/packages/dnb-design-system-portal/package.json @@ -48,8 +48,7 @@ "history": "5.1.0", "react": "17.0.2", "react-dom": "17.0.2", - "react-live-ssr": "workspace:*", - "smoothscroll-polyfill": "0.4.4" + "react-live-ssr": "workspace:*" }, "devDependencies": { "@babel/core": "7.16.0", diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/demos.md b/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/demos.md index f511a31ce96..808bb913c1b 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/demos.md +++ b/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/demos.md @@ -37,6 +37,4 @@ GlobalStatusScrolling, ### To showcase the scrolling -Some browsers (Safari, Edge) will need a polyfill like `smoothscroll-polyfill`. - diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/info.md b/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/info.md index c6fd431504b..c956d87231b 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/info.md +++ b/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/info.md @@ -44,17 +44,6 @@ But You can also make use of the [FormSet](/uilib/components/form-set) or [FormR ``` -### Smooth scrolling - -Not every browser (e.g. Safari, Edge, and IE) supports smooth scrolling. Therefore, add the [smoothscroll-polyfill](https://github.com/iamdustan/smoothscroll) to your project: - -```js -import smoothscroll from 'smoothscroll-polyfill' - -// kick off the polyfill! -smoothscroll.polyfill() -``` - ### Manually updates Besides the automated connection between the error states of form components ([FormStatus](/uilib/components/form-status)), you can update messages from everywhere in your application at any time: @@ -132,4 +121,4 @@ import { GlobalStatus } from '@dnb/eufemia/components' // 3. and remove it again -``` \ No newline at end of file +``` diff --git a/yarn.lock b/yarn.lock index 9cc37567caf..312ca5b3316 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14488,7 +14488,6 @@ __metadata: remark-gfm: 1.0.0 repo-utils: "workspace:*" sass: 1.43.4 - smoothscroll-polyfill: 0.4.4 start-server-and-test: 1.15.4 storybook-utils: "workspace:*" stylelint: 15.1.0 @@ -31571,13 +31570,6 @@ __metadata: languageName: node linkType: hard -"smoothscroll-polyfill@npm:0.4.4": - version: 0.4.4 - resolution: "smoothscroll-polyfill@npm:0.4.4" - checksum: b99ff7d91689d563ec69cb1d29713b332a24c88ac3dc4ef9ef9fbe4137305336e67253211067c5f786478dbdabd2aa6c2033709d4d8feca327b09eca8d5a0e7b - languageName: node - linkType: hard - "snake-case@npm:^2.1.0": version: 2.1.0 resolution: "snake-case@npm:2.1.0"