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

Restore viewport behaviour #5829

Merged
merged 7 commits into from
Mar 4, 2019
Merged

Restore viewport behaviour #5829

merged 7 commits into from
Mar 4, 2019

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Mar 4, 2019

Issue: #5757 and #5818

A few things were going on here:

  • You no longer got a set of viewports by default by just registering the addon
  • You couldn't set the defaultViewport any more

What I did

(Partially) restored the old API (still via the parameter API), added warnings for no-longer supported stuff, and documented it.

NOTE: we lost the onViewportChange option. I'm not sure that was very widely used? Maybe we'll hear about it if so 🤷‍♂️

Tom Coleman added 5 commits March 4, 2019 12:22
Also restore using the `viewport` key, and enforce the viewport parameter to be a object.
Not sure why you'd want this, but it makes sense to support it.
@vercel
Copy link

vercel bot commented Mar 4, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

@codecov
Copy link

codecov bot commented Mar 4, 2019

Codecov Report

Merging #5829 into next will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #5829      +/-   ##
==========================================
- Coverage   34.28%   34.24%   -0.05%     
==========================================
  Files         651      651              
  Lines        9473     9482       +9     
  Branches     1344     1374      +30     
==========================================
- Hits         3248     3247       -1     
- Misses       5611     5617       +6     
- Partials      614      618       +4
Impacted Files Coverage Δ
addons/viewport/preview.js 100% <ø> (ø) ⬆️
addons/viewport/src/legacy_preview/withViewport.js 0% <ø> (ø) ⬆️
addons/viewport/src/Tool.js 0% <0%> (ø) ⬆️
addons/viewport/src/legacy_preview/index.js 0% <0%> (ø) ⬆️
addons/viewport/src/constants.js 0% <0%> (ø) ⬆️

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 9e7952e...a0ade4a. Read the comment docs.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tmeasday, this is awesome!

@shilman shilman merged commit 112b9f4 into next Mar 4, 2019
@shilman shilman deleted the 5757-restore-viewport branch March 4, 2019 02:41
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Mar 4, 2019
shilman added a commit that referenced this pull request Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: viewport bug patch:done Patch/release PRs already cherry-picked to main/release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants