Giter Site home page Giter Site logo

thebuilder / react-scroll-percentage Goto Github PK

View Code? Open in Web Editor NEW
230.0 2.0 12.0 6.94 MB

Monitor the scroll percentage of a component inside the viewport, using the IntersectionObserver API

Home Page: https://thebuilder.github.io/react-scroll-percentage/

License: MIT License

JavaScript 26.68% TypeScript 73.32%

react-scroll-percentage's Introduction

react-scroll-percentage

Version Badge GZipped size dev dependency status License Downloads

React component that reports the current scroll percentage of a element inside the viewport. Contains both a Hooks, render props and plain children implementation.

Features

  • 🎣 Hooks or Component API - With useScrollPercentage it's easier than ever to monitor elements
  • ⚡️ Optimized performance - Uses React Intersection Observer to only update when elements are inside the viewport
  • 🌳 Tree-shakeable - Only include the parts you use

Installation

Install using Yarn:

yarn add react-scroll-percentage

or NPM:

npm install react-scroll-percentage --save

⚠️ You also want to add the intersection-observer polyfill for full browser support. Check out adding the polyfill for details about how you can include it.

Usage

Hooks 🎣

useScrollPercentage

const [ref, percentage] = useScrollPercentage(options)

Call the useScrollPercentage hook, with the (optional) options you need. It will return an array containing a ref, the current scroll percentage and the current IntersectionObserverEntry. Assign the ref to the DOM element you want to monitor, and the hook will report the status.

import React from 'react'
import { useScrollPercentage } from 'react-scroll-percentage'

const Component = () => {
  const [ref, percentage] = useScrollPercentage({
    /* Optional options */
    threshold: 0,
  })

  return (
    <div ref={ref}>
      <h2>{`Percentage scrolled: ${percentage.toPrecision(2)}%.`}</h2>
    </div>
  )
}

Render props

To use the <ScrollPercentage> component, you pass it a function. It will be called whenever the user scrolls the viewport, with the new value of percentage. In addition to the percentage, children also receives a ref that should be set on the containing DOM element.

If you need it, you can also access the IntersectionObserverEntry on entry, giving you access to all the details about the current intersection state.

import { ScrollPercentage } from 'react-scroll-percentage'

const Component = () => (
  <ScrollPercentage>
    {({ percentage, ref, entry }) => (
      <div ref={ref}>
        <h2>{`Percentage scrolled: ${percentage.toPrecision(2)}%.`}</h2>
      </div>
    )}
  </ScrollPercentage>
)

export default Component

Plain children

You can pass any element to the <ScrollPercentage />, and it will handle creating the wrapping DOM element. Add a handler to the onChange method, and control the state in your own component. Any extra props you add the <ScrollPercentage /> will be passed to the HTML element, allowing you set the className, style, etc.

import { ScrollPercentage } from 'react-scroll-percentage'

const Component = () => (
  <ScrollPercentage
    as="div"
    onChange={(percentage, entry) => console.log('Percentage:', percentage)}
  >
    <h2>Plain children are always rendered. Use onChange to monitor state.</h2>
  </ScrollPercentage>
)

export default Component

⚠️ When rendering a plain child, make sure you keep your HTML output semantic. Change the as to match the context, and add a className to style the <ScrollPercentage />. The component does not support Ref Forwarding, so if you need a ref to the HTML element, use the Render Props version instead.

Options

Provide these as props on the <ScrollPercentage /> component and as the options argument for the hooks.

Name Type Default Required Description
root Element window false The Element that is used as the viewport for checking visibility of the target. Defaults to the browser viewport (window) if not specified or if null.
rootMargin string '0px' false Margin around the root. Can have values similar to the CSS margin property, e.g. "10px 20px 30px 40px" (top, right, bottom, left).
threshold number 0 false Number between 0 and 1 indicating the percentage that should be visible before triggering.
triggerOnce boolean false false Only trigger this method once

ScrollPercentage Props

The <ScrollPercentage /> component also accepts the following props:

Name Type Default Required Description
as string 'div' false Render the wrapping element as this element. Defaults to div.
children ({ref, percentage, entry}) => React.ReactNode, ReactNode true Children expects a function that receives an object containing the percentage boolean and a ref that should be assigned to the element root. Alternatively pass a plain child, to have the <InView /> deal with the wrapping element. You will also get the IntersectionObserverEntry as `entry, giving you more details.
onChange (percentage, entry) => void false Call this function whenever the in view state changes. It will receive the percentage value, alongside the current IntersectionObserverEntry.

Intersection Observer

Intersection Observer is the API is used to determine if an element is inside the viewport or not. Browser support is pretty good - With Safari adding support in 12.1, all major browsers now support Intersection Observers natively.

Polyfill

You can import the polyfill directly or use a service like polyfill.io to add it when needed.

yarn add intersection-observer

Then import it in your app:

import 'intersection-observer'

If you are using Webpack (or similar) you could use dynamic imports, to load the Polyfill only if needed. A basic implementation could look something like this:

/**
 * Do feature detection, to figure out which polyfills needs to be imported.
 **/
async function loadPolyfills() {
  if (typeof window.IntersectionObserver === 'undefined') {
    await import('intersection-observer')
  }
}

react-scroll-percentage's People

Contributors

dependabot[bot] avatar dmokruso avatar greenkeeper[bot] avatar javiermartinz avatar julianjorgensen avatar lpmi-13 avatar prettierci-commits avatar renisalcedo avatar ryee-dev avatar smdern avatar thebuilder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-scroll-percentage's Issues

An in-range update of @typescript-eslint/eslint-plugin is breaking the build 🚨

The devDependency @typescript-eslint/eslint-plugin was updated from 2.19.0 to 2.19.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/eslint-plugin is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v2.19.1

2.19.1 (2020-02-10)

Bug Fixes

  • eslint-plugin: [unbound-method] blacklist a few unbound natives (#1562) (4670aab)
  • typescript-estree: ts returning wrong file with project references (#1575) (4c12dac)
Commits

The new version differs by 5 commits.

  • 1c8f0df chore: publish v2.19.1
  • 4c12dac fix(typescript-estree): ts returning wrong file with project references (#1575)
  • e9cf734 docs(eslint-plugin): fix typo in readme
  • 10d86b1 docs(eslint-plugin): [no-dupe-class-members] fix typo (#1566)
  • 4670aab fix(eslint-plugin): [unbound-method] blacklist a few unbound natives (#1562)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of storybook is breaking the build 🚨

There have been updates to the storybook monorepo:

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the storybook group definition.

storybook is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v5.3.14

Bug Fixes

  • Centered: remove typesVersions attribute (#9907)
  • Props: Fix typescript unspecified default value (#9873)
  • Core: Use telejson for websockets channel (#9867)
  • Storyshots: Fix support for jsx/tsx config files (#9834)
  • MDX: Fix custom classes getting stripped (#8897)
  • Typescript: Add downlevel dts for 3.5 (#9847)
Commits

The new version differs by 41 commits.

  • 91d9c0c v5.3.14
  • 01ab760 Update peer dependencies to 5.3.14
  • bb222fa Prettier changelog
  • 1ddadfd 5.3.14 changelog
  • 5d2c9bf Merge pull request #9907 from storybookjs/fix-ts-export-for-addon-centered
  • 0395223 Merge pull request #9873 from storybookjs/9827-ts-default-values
  • 7ab4626 Merge pull request #9867 from storybookjs/websocket-cyclic-support
  • 57dd1e0 Merge pull request #9834 from davidgoli/support-jsx-preview-files
  • dd47540 Merge pull request #8897 from fraincs/#8504
  • c25cb3f Merge pull request #9906 from SoloJiang/chore-supplement-rax
  • d28e4a3 Merge pull request #9874 from dmartinjs/patch-3
  • 1995d87 Merge pull request #9894 from davidenglishmusic/docs-configuration-file-typos
  • 654aeb9 Merge pull request #9885 from gaguirre/patch-3
  • 853c72a Merge pull request #9857 from pchr-srf/patch-4
  • c2e39d2 Merge pull request #9844 from tskarhed/patch-4

There are 41 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Any chance of returning the scroll percentage before the ref enters the viewport?

It would be really useful for my use case if the percentage could be returned before the ref element enters the viewport, because I am setting the app theme based on scroll position of a certain element. It works perfectly fine when the element is in the viewport, however when it sits above or below the viewport upon mounting, then the percentage isn't returned and therefore I can't set the theme without implementing some manual solution.

Incorrect use of babelrc

After using react-scroll-percentage, I am getting below issue in running jest test cases
Couldn't find preset "./.babelrc.js" relative to directory "/node_modules/react-intersection-observer"

react-scroll-percentage has a babelrc in that, which might be causing issue while transpiling the react-intersection-observer. Below link has detailed explanation of this.

parcel-bundler/parcel#482

An in-range update of @types/storybook__addon-knobs is breaking the build 🚨

The devDependency @types/storybook__addon-knobs was updated from 5.0.4 to 5.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/storybook__addon-knobs is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Offset magic number

Hi, thanks for building this, I was looking at the code and I have a question regarding the part in which to calculate the percentage of scrolling you multiply by 0.25, why so?

const offsetTop = threshold * vh * 0.25

Thanks in advance!

An in-range update of eslint-plugin-react-hooks is breaking the build 🚨

The devDependency eslint-plugin-react-hooks was updated from 2.4.0 to 2.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-react-hooks is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of styled-components is breaking the build 🚨

The devDependency styled-components was updated from 4.3.0 to 4.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

styled-components is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.3.1
  • Revert #2586; breaks rehydration in dev for certain runtimes like next.js

We'll explore reintroducing it in v5 but better safe than sorry.

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.14.2 to 1.14.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.14.3

2019-06-06

Bug Fixes

  • Generate correct external imports when importing from a directory that would be above the root of the current working directory (#2902)

Pull Requests

Commits

The new version differs by 4 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of react-intersection-observer is breaking the build 🚨

The dependency react-intersection-observer was updated from 6.2.3 to 6.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

react-intersection-observer is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.9.2 to 1.9.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.9.3

2019-04-10

Bug Fixes

  • Simplify return expressions that are evaluated before the surrounding function is bound (#2803)

Pull Requests

  • #2803: Handle out-of-order binding of identifiers to improve tree-shaking (@lukastaegert)
Commits

The new version differs by 3 commits.

  • 516a06d 1.9.3
  • a5526ea Update changelog
  • c3d73ff Handle out-of-order binding of identifiers to improve tree-shaking (#2803)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Scroll percentage starts at 33%?

I am using it as the outer-most component in my app, but the scroll percentage only goes from 0.33 to 0.66 -- any idea why that might be?

      <ScrollPercentage>
        {({percentage}) => (
        <AnimatedBg>      
          <Transition from="#111" to="#eee" position={0}>
            <LandingPage 
              scrollToNextPage={this.scrollToNextPage}
              percentage={percentage}/>        
          </Transition>
          <div 
            ref={(section) => { this.pageTwo = section; }} 
            style={{ height: '100vh' }} />
          <h1 style={{top: 0, right: 0, position: 'fixed', color: 'red'}}>{percentage}</h1>
        </AnimatedBg>
        )}
      </ScrollPercentage>

An in-range update of styled-components is breaking the build 🚨

The devDependency styled-components was updated from 4.2.0 to 4.2.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

styled-components is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

reset scrollPosition method?

I have this issue where if I scroll all the way down a component to 100% and then I change routes with react-router, then return back the original route while forcing it to scroll all the way up with window.scrollTo(0, 0) on componentDidMount, the component will remount, with its topPosition at 0, but the onChange method of the ScrollPercentage node will also be triggered with the retained scrollPosition value of 100% from before I originally had changed routes... this is causing several animation transitions that are supposed to happen based on scroll % to render in its final state even though it rendered at the top of the page...

my question is, why, even if the parent component is remounting, would the ScrollPercentage element seem to be the same one with its original state with the percentage value of 100% and why would the onChange method be triggering on route change if it's still reporting the same value as before?

hope this makes sense

Needs some love

I haven't used this library in a while, and it's starting to lack behind.
Needs an overhaul so it becomes synced with react-intersection-observer, and exposes a hook version.

Maybe also rewrite in TypeScript.

An in-range update of flow-copy-source is breaking the build 🚨

The devDependency flow-copy-source was updated from 2.0.2 to 2.0.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

flow-copy-source is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @typescript-eslint/parser is breaking the build 🚨

The devDependency @typescript-eslint/parser was updated from 1.9.0 to 1.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/parser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @typescript-eslint/parser is breaking the build 🚨

The devDependency @typescript-eslint/parser was updated from 2.19.0 to 2.19.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/parser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v2.19.1

2.19.1 (2020-02-10)

Bug Fixes

  • eslint-plugin: [unbound-method] blacklist a few unbound natives (#1562) (4670aab)
  • typescript-estree: ts returning wrong file with project references (#1575) (4c12dac)
Commits

The new version differs by 5 commits.

  • 1c8f0df chore: publish v2.19.1
  • 4c12dac fix(typescript-estree): ts returning wrong file with project references (#1575)
  • e9cf734 docs(eslint-plugin): fix typo in readme
  • 10d86b1 docs(eslint-plugin): [no-dupe-class-members] fix typo (#1566)
  • 4670aab fix(eslint-plugin): [unbound-method] blacklist a few unbound natives (#1562)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.12.5 to 1.13.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.13.0

2019-05-31

Features

  • Omit exports and module from SystemJS wrapper if possible (#2880)
  • Try to use the first letters of names when mangling exports (#2885)

Bug Fixes

  • Avoid conflicts with local variables when using format specific globals to render dynamic imports and file URLs (#2880)
  • Do not produce undefined reexports when reexporting from entry points (#2885)

Pull Requests

  • #2880: Deconflict global variables used inside format-specific code (@lukastaegert)
  • #2885: Do not produce undefined reexports when reexporting from entry points and refactor chunk linking (@lukastaegert)
Commits

The new version differs by 5 commits.

  • df11753 Fix linting
  • a630866 1.13.0
  • 52268a9 Update changelog
  • b006d13 Deconflict global variables used inside format-specific code (#2880)
  • 70b0844 Do not produce undefined reexports when reexporting from entry points and refactor chunk linking (#2885)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

A dependency breaks the build (hooks in alpha)

FOA, thank you for this bright idea.
Because you added support to hooks in react-intersection-observer which got updated to version ^6.1.0, it breaks a project using 16.6.3.

screenshot 2018-12-06 at 15 31 04

Do you think you can lock it? Or it is preferable to users using your lib to shrinkwrap the package? What's your suggestion?

An in-range update of storybook is breaking the build 🚨

There have been updates to the storybook monorepo:

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the storybook group definition.

storybook is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v5.2.2

Bug Fixes

  • Storyshots: First-class CSF support (#8000)
  • UI: Move addon dependencies to devDependencies (#8206)
  • Addon-docs: CSS classes for escape-hatch theming wrapper/content (#8061)
  • CLI: Fix variable collisions in storiesof-to-csf (#8106)
  • Addon-knobs: Add missing type def #8105 (#8118)
  • Dependencies: add @types/webpack-env to apps that depend on it (#8119)
  • Core: Show exception rather than error on react error boundary (#8100)
  • UI: Fix inline code styling for dark theme (#8260)
  • Addon-ondevice-notes: Validate the state content (#8261)
  • Telejson: New version with typings and bugfixes (#8228)
  • React: Add DecoratorFn type to exports (#8121)
  • Addon-knobs: Handle undefined array value (#8006)
  • Preact: Allow JSX.Element story (#8159)
  • Storyshots: Fix STORYBOOK_HOOKS_CONTEXT error (#8163)
  • Update react-draggable to 4.0.3 (#8145)
Commits

The new version differs by 64 commits.

  • fc0e18c v5.2.2
  • 611ee74 5.2.2 changelog
  • d852091 Revert "Update read-pkg-up usage to work with version 7 (#8299)"
  • 8e0ac7c Update snapshots
  • 3065f8c Don't use global package in templates (#8281)
  • 39b8c80 Storyshots: First-class CSF support (#8000)
  • fd3b297 Update yarn.lock
  • f5ed2f6 UI: Move addon dependencies to devDependencies (#8206)
  • a39f2f4 Add tests and src to npmignore (#7824)
  • d14f2d5 Addon-docs: CSS classes for escape-hatch theming wrapper/content (#8061)
  • d7ec320 CLI: Fix variable collisions in storiesof-to-csf (#8106)
  • 9bf9150 add missing type def to addon-knobs fixes #8105 (#8118)
  • dbc0442 fix: add @types/webpack-env to apps that depend on it, fixes #8… (#8119)
  • 49ee0ca Update read-pkg-up usage to work with version 7 (#8299)
  • aeda584 Core: Show exception rather than error on react error boundary (#8100)

There are 64 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of babel7 is breaking the build 🚨

There have been updates to the babel7 monorepo:

    • The devDependency @babel/cli was updated from 7.8.3 to 7.8.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.

babel7 is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

npm package does not contain /es folder

The ES6 build is missing in both 1.0.0 and 1.0.1, rendering these versions unusable in a Webpack 2 setup. (Version 0.6.0 is the last published version that contains the /es folder.)

It looks as if the prepublish script wasn't executed at all. AFAIK prepublish is deprecated and has been replaced by prepare and prepublishOnly but I guess it should still work though? There is also a yarn-error.log in the published packages, but this also seems to be unrelated.

Percentage didn't update on resize

Just wondering if we could get the percentage to update on resize of the monitored elements, and resize of encompassing top and bottom elements as well (environment height change) which should effect the percentage in view of the monitored elements. For better usability with responsive layouts.

Seems to works great on react-intersection-observer for visibility status.

Easiest test could be done with the Storybook demo, grab the 'Scroll Down' section and decrease its height.

An in-range update of @typescript-eslint/eslint-plugin is breaking the build 🚨

The devDependency @typescript-eslint/eslint-plugin was updated from 1.9.0 to 1.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/eslint-plugin is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Still alive?

Is this project still alive, can't really find any good alternative for it?

An in-range update of react is breaking the build 🚨

There have been updates to the react monorepoundefined

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the react group definition.

react is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v16.5.1

16.5.1 (September 13, 2018)

React

  • Improve the warning when React.forwardRef receives an unexpected number of arguments. (@andresroberto in #13636)

React DOM

  • Fix a regression in unstable exports used by React Native Web. (@aweary in #13598)
  • Fix a crash when component defines a method called isReactComponent. (@gaearon in #13608)
  • Fix a crash in development mode in IE9 when printing a warning. (@link-alex in #13620)
  • Provide a better error message when running react-dom/profiling with schedule/tracking. (@bvaughn in #13605)
  • If a ForwardRef component defines a displayName, use it in warnings. (@probablyup in #13615)

Schedule (Experimental)

  • Add a separate profiling entry point at schedule/tracking-profiling. (@bvaughn in #13605)
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

support horizontal scroll percentage?

Hey there,

Just wondering if this package does/could support horizontal scrolling as well.

I didn't see it in the demo so I assume it doesn't.

Thanks!

An in-range update of rollup-plugin-terser is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency rollup-plugin-terser was updated from 5.2.0 to 5.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup-plugin-terser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.