Coder Social home page Coder Social logo

localnerve / react-element-size-reporter Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.18 MB

Higher order React component to report contained DOM element sizes

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%
dom-element react-component size-calculation flux redux fluxible

react-element-size-reporter's Introduction

React Element Size Reporter

npm version Verify Coverage Status

Higher order React components to report size of contained DOM elements.

Uses element-size-reporter to report width, height, and top of contained DOM elements. Size Reports are logically group-able so that different components' DOM elements sizes can be accumulated together in a flux flow.

Demo and Example

If you are interested in seeing demo code usage and/or a staged demo, please review this brief thread covering this topic.

API

windowResizeReporter(Component, selector, options)

fluxibleWindowResizeReporter(Component, selector, sizeAction, options)

windowResizeReporter

Creates a higher order component that reports on window 'resize' event. Reports on the element found by the supplied selector. When the window 'resize' event occurs, a Size Report is delivered to an action creator supplied by one of three methods. The first viable action creator found is used, here is the search order:

  1. Action creator supplied in options, name actionCreator.

  2. Action creator supplied in props, name actionCreator.

  3. Action creator found on the higher order component instance (can supplied by a derived class, method named actionCreator).

Parameters

Component {ReactComponent} - The React Component to render.

selector {String} - Selects the DOM element to report the size about.

options {Object} - The window resize and reporting options.

  • actionCreator {Function} - Creates an action on window resize. Receives a Size Report.

  • resizeWait {Number} - Resize debouncer trailing wait in milliseconds. Defaults to 100ms.

  • sizeReporter {Object} - element-size-reporter options

fluxibleWindowResizeReporter

Same as windowResizeReporter, but for use with Fluxible. Creates a higher order component that reports on window 'resize' event. Reports on the element found by the supplied selector. When the window 'resize' event occurs, a Size Report is delivered to the supplied sizeAction creator.

Parameters

Component {ReactComponent} - The React Component to render.

selector {String} - Selects the DOM element to report the size about.

sizeAction {Function} - The action creator that receives the Size Report.

options {Object} - The window resize and reporting options. Same as windowResizeReporter, except the actionCreator option is ignored - it is supplied explicitly via sizeAction.

react-element-size-reporter's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar greenkeeperio-bot avatar localnerve avatar

Watchers

 avatar  avatar  avatar

react-element-size-reporter's Issues

An in-range update of babel-eslint is breaking the build 🚨

Version 8.2.0 of babel-eslint was just published.

Branch Build failing 🚨
Dependency babel-eslint
Current Version 8.1.2
Type devDependency

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

babel-eslint 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

Commits

The new version differs by 4 commits.

  • ef27670 8.2.0
  • eba5920 Add other parser plugins, update yarn.lock (#569)
  • e201fb4 Make 2018 the default ecmaVersion for rules relying on parserOptions (#556)
  • 1dedd1b update babel packages (#565)

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 jsdom is breaking the build 🚨

The devDependency jsdom was updated from 16.0.1 to 16.1.0.

🚨 View failing branch.

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

jsdom 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 Version 16.1.0
  • Added console.timeLog().
  • Changed Attr to extend Node, to align with specifications. (ExE-Boss)
  • Changed <noscript> children to be parsed as nodes, instead of as text, when runScripts is left as the default of undefined. (ACHP)
  • Upgraded cssstyle to v2.1.0, which brings along fixes to handling of rgba() and hsl() colors. (kraynel)
  • Fixed some selection-related issues when manipulating the value of <input>s and <textarea>s. (Matthew-Goldberg)
  • Fixed various issues with setTimeout(), setInterval(), and requestAnimationFrame(), particularly around window closing and recursive calls.
Commits

The new version differs by 12 commits.

  • b4b5a54 Version 16.1.0
  • 7597537 Remove ._parsedValue
  • ac497bb Refactor step handling in
  • a4c6144 Use null as "error" value for parseFloatingPointNumber
  • ad43220 Add console.timeLog()
  • 50101ed Replace alias with my actual name as contributor/maintainer
  • 1ebb1fc Re-do animation frame and timer callbacks
  • 7581dba Parse noscript children as nodes when runScripts is not "dangerously"
  • b8c7bb5 Make Attr extend Node
  • fbc4666 Bump cssstyle to fix rgba() and hsl() color handling
  • 27b7074 Fix some selection-related issues in input and textarea
  • 6928d6d Remove mutates-globals test reason (#2807)

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 element-size-reporter is breaking the build 🚨

The dependency element-size-reporter was updated from 0.6.3 to 0.6.4.

🚨 View failing branch.

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

element-size-reporter 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).

Commits

The new version differs by 5 commits.

  • 0b0c259 chore(copyright): 2019, [email protected]
  • f2b3fcc Merge pull request #47 from localnerve/greenkeeper/monorepo.react-16.6.3
  • 8449967 chore(package): update lockfile package-lock.json
  • 6590190 chore(package): update react-dom to version 16.6.3
  • 189e886 chore(package): update react to version 16.6.3

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.2.0 to 7.2.3.

🚨 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 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).
  • βœ… coverage/coveralls: First build on greenkeeper/monorepo.babel7-20190205004828 at 100.0% (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 🌴

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
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

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 🌴

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

The devDependency jsdom was updated from 15.1.0 to 15.1.1.

🚨 View failing branch.

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

jsdom 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).

Commits

The new version differs by 11 commits.

  • 0371215 Version 15.1.1
  • dd6c5a0 Do not reserialize XHR content-types unnecessarily
  • 7cd5329 Do not merge XHR preflight and response headers
  • 9f6b190 Keep track of style and event attribute changes in SVGElement
  • 1951a19 Use ASCII uppercase for tagName
  • 1c8e963 Add HTMLOrSVGElement interface mixin
  • 8533b57 Use interface mixins
  • c1b4591 Escape null in WebIDL2JSValueAsUnsupported
  • 93944f6 Update ESLint to v5
  • 9f273fe Update dependencies
  • 33798c9 Roll Web Platform Tests

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 eslint is breaking the build 🚨

The devDependency eslint was updated from 5.15.3 to 5.16.0.

🚨 View failing branch.

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

eslint 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).
  • βœ… coverage/coveralls: First build on greenkeeper/eslint-5.16.0 at 100.0% (Details).

Release Notes for v5.16.0
  • dfef227 Build: gensite passes rulesMeta to formatter rendering (#11567) (Kevin Partington)
  • c06d38c Fix: Allow HTML formatter to handle no meta data (#11566) (Ilya Volodin)
  • 87a5c03 Docs: func-style: clarify when allowArrowFunctions is used (#11548) (Oliver Joseph Ash)
  • bc3e427 Update: pass rule meta to formatters RFC 10 (#11551) (Chris Meyer)
  • b452f27 Chore: Update README to pull in reviewer data (#11506) (Nicholas C. Zakas)
  • afe3d25 Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550) (Vernon de Goede)
  • 4fe7eb7 Chore: use nyc instead of istanbul (#11532) (Toru Nagashima)
  • f16af43 Chore: fix formatters/table test (#11534) (Toru Nagashima)
  • 78358a8 Docs: fix duplicate punctuation in CLI docs (#11528) (Teddy Katz)
Commits

The new version differs by 11 commits.

  • ded2f94 5.16.0
  • ea36e13 Build: changelog update for 5.16.0
  • dfef227 Build: gensite passes rulesMeta to formatter rendering (#11567)
  • c06d38c Fix: Allow HTML formatter to handle no meta data (#11566)
  • 87a5c03 Docs: func-style: clarify when allowArrowFunctions is used (#11548)
  • bc3e427 Update: pass rule meta to formatters RFC 10 (#11551)
  • b452f27 Chore: Update README to pull in reviewer data (#11506)
  • afe3d25 Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550)
  • 4fe7eb7 Chore: use nyc instead of istanbul (#11532)
  • f16af43 Chore: fix formatters/table test (#11534)
  • 78358a8 Docs: fix duplicate punctuation in CLI docs (#11528)

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 nyc is breaking the build 🚨

The devDependency nyc was updated from 13.1.0 to 13.2.0.

🚨 View failing branch.

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

nyc 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).
  • βœ… coverage/coveralls: First build on greenkeeper/nyc-13.2.0 at 100.0% (Details).

Commits

The new version differs by 17 commits.

  • 29e6f5e chore(release): 13.2.0
  • e95856c chore: Update dependencies. (#978)
  • 921d386 fix: Create directory for merge destination. (#979)
  • df2730d feat: Option Plugins (#948)
  • 35cd49a feat: document the fact that cacheDir is configurable (#968)
  • ff834aa feat: avoid hardcoded HOME for spawn-wrap working dir (#957)
  • 35710b1 build: move windows tests to travis (#961)
  • 93cb5c1 tests: coverage for temp-dir changes (#964)
  • d566efe test: stop using LAZY_LOAD_COUNT (#960)
  • f23d474 chore: update stale bot config with feedback (#958)
  • 62d7fb8 chore: slight tweak to position of test
  • 28b6d09 fix: missing command temp-directory (#928)
  • 40afc5f fix: nyc processing files not covered by include when all is enabled. (#914)
  • ba22a26 docs(readme): Update to reflect .nycrc.json support (#934)
  • 2dbb82d chore: enable probot-stale

There are 17 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 react is breaking the build 🚨

There have been updates to the react monorepo:

    • The dependency react was updated from 16.7.0 to 16.8.0.
  • The devDependency react-dom was updated from 16.7.0 to 16.8.0.

🚨 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 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).
  • βœ… coverage/coveralls: First build on greenkeeper/monorepo.react-20190206090656 at 100.0% (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 babel7 is breaking the build 🚨

There have been updates to the babel7 monorepo:

    • The devDependency @babel/cli was updated from 7.1.0 to 7.1.1.
  • The devDependency @babel/core was updated from 7.1.0 to 7.1.1.

🚨 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 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).
  • βœ… coverage/coveralls: First build on greenkeeper/monorepo.babel7-7.1.1 at 100.0% (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 🌴

Demo & Example Code

Hi @localnerve, thank you for putting out this library! Could you share/publish some demos and examples of usage to understand better the functionality of the library?

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

The devDependency mocha was updated from 6.0.2 to 6.1.0.

🚨 View failing branch.

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

mocha 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).
  • βœ… coverage/coveralls: First build on greenkeeper/mocha-6.1.0 at 100.0% (Details).

Release Notes for v6.1.0

6.1.0 / 2019-04-07

πŸ”’ Security Fixes

  • #3845: Update dependency "js-yaml" to v3.13.0 per npm security advisory (@plroebuck)

πŸŽ‰ Enhancements

  • #3766: Make reporter constructor support optional options parameter (@plroebuck)
  • #3760: Add support for config files with .jsonc extension (@sstephant)

πŸ“  Deprecations

These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:

πŸ› Fixes

  • #3829: Use cwd-relative pathname to load config file (@plroebuck)
  • #3745: Fix async calls of this.skip() in "before each" hooks (@juergba)
  • #3669: Enable --allow-uncaught for uncaught exceptions thrown inside hooks (@givanse)

and some regressions:

πŸ“– Documentation

πŸ”© Other

  • #3830: Replace dependency "findup-sync" with "find-up" for faster startup (@cspotcode)
  • #3799: Update devDependencies to fix many npm vulnerabilities (@XhmikosR)
Commits

The new version differs by 28 commits.

  • f4fc95a Release v6.1.0
  • bd29dbd update CHANGELOG for v6.1.0 [ci skip]
  • aaf2b72 Use cwd-relative pathname to load config file (#3829)
  • b079d24 upgrade deps as per npm audit fix; closes #3854
  • e87c689 Deprecate this.skip() for "after all" hooks (#3719)
  • 81cfa90 Copy Suite property "root" when cloning; closes #3847 (#3848)
  • 8aa2fc4 Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
  • 586bf78 Update JS-YAML to address security issue (#3845)
  • d1024a3 Update doc examples "tests.html" (#3811)
  • 1d570e0 Delete "/docs/example/chai.js"
  • ade8b90 runner.js: "self.test" undefined in Browser (#3835)
  • 0098147 Replace findup-sync with find-up for faster startup (#3830)
  • d5ba121 Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
  • a3089ad update package-lock
  • 75430ec Upgrade yargs-parser dependency to avoid loading 2 copies of yargs

There are 28 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 eslint-plugin-react is breaking the build 🚨

The devDependency eslint-plugin-react was updated from 7.14.0 to 7.14.1.

🚨 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 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 v7.14.1

Fixed

  • Fix prop-types crash on multiple destructuring (#2319 @golopot)
Commits

The new version differs by 3 commits.

  • 62255af Update CHANGELOG and bump version
  • 655eb01 Merge pull request #2320 from golopot/issue-2319
  • 9639d82 [Fix] prop-types: fix crash on multiple destructuring

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 is breaking the build 🚨

There have been updates to the react monorepo:

    • The dependency react was updated from 16.6.1 to 16.6.2.
  • The devDependency react-dom was updated from 16.6.1 to 16.6.2.

🚨 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 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.