Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control node width #3

Merged
merged 33 commits into from
Feb 21, 2018
Merged

Control node width #3

merged 33 commits into from
Feb 21, 2018

Conversation

jfschwarz
Copy link
Contributor

This PR sets the width of the stick node so that it always stretches exactly to the screen limit. This will give the maximum available space to the node content while preventing that it reaches off-screen.

It also adds support for sameWidth prop, which will set the stick node width to the width of the anchor element. This is useful for building dropdown select fields, for example.

It also removes support of the unofficial nodeWidth prop. It allowed to explicitly pass in a with for the stick node, but the same can be achieved by setting a width directly on the passed stick node.

@workflow-bot
Copy link

Demo page for commit added more node width tests has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Demo page for commit fix lint error has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Demo page for commit trial to fix test on ci has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Demo page for commit use scrollWidth instead of clientWidth has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Demo page for commit fixed test for devices with scrollbars has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@codecov-io
Copy link

codecov-io commented Feb 14, 2018

Codecov Report

Merging #3 into master will increase coverage by 7.61%.
The diff coverage is 87.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
+ Coverage   85.71%   93.33%   +7.61%     
==========================================
  Files           4        7       +3     
  Lines         147      180      +33     
==========================================
+ Hits          126      168      +42     
+ Misses         21       12       -9
Impacted Files Coverage Δ
src/getModifiers.js 100% <100%> (ø) ⬆️
src/getDefaultAlign.js 100% <100%> (ø)
src/defaultPosition.js 100% <100%> (ø)
src/StickInline.js 100% <100%> (ø) ⬆️
src/scroll.js 66.66% <66.66%> (ø)
src/StickPortal.js 93.15% <83.33%> (+16.4%) ⬆️
src/Stick.js 94.25% <89.74%> (-3.71%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53c0473...2e34757. Read the comment docs.

@workflow-bot
Copy link

Demo page for commit fixed linter errors has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Demo page for commit added some more tests to increase coverage has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Demo page for commit fixed lint errors has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Demo page for commit circle syntax fix has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@signavio signavio deleted a comment from jfschwarz Feb 15, 2018
@workflow-bot
Copy link

Demo page for commit fix host authenticity for github.com has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Demo page for commit fixed a bug when page is scrolled horizontally has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@jfschwarz
Copy link
Contributor Author

There are still some problems when the page is resized so that there are horizontal scrollbars.

@jfschwarz jfschwarz removed the request for review from frontendphil February 15, 2018 16:55
@jfschwarz jfschwarz assigned jfschwarz and unassigned frontendphil Feb 15, 2018
@workflow-bot
Copy link

Demo page for commit Merge branch 'master' into feature/control-node-width has been published at:
https://signavio.github.io/react-stick/feature/control-node-width

@workflow-bot
Copy link

Merging this PR will not publish a release.

@jfschwarz jfschwarz assigned frontendphil and unassigned jfschwarz Feb 16, 2018
@jfschwarz jfschwarz merged commit c78c48d into master Feb 21, 2018
@jfschwarz jfschwarz deleted the feature/control-node-width branch February 21, 2018 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants