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

Show active viewport dimensions & button to rotate #6045

Merged
merged 3 commits into from
Mar 25, 2019

Conversation

lucas-carl
Copy link
Contributor

@lucas-carl lucas-carl commented Mar 12, 2019

Issue: #5879

What I did

  • Show active pixel dimensions in viewport widget when a viewport is selected
  • Added button to flip the viewport
  • Show title of active view in button
  • Added functionality to reset the viewport by double-clicking the button

@backbone87
Copy link
Contributor

If i click the rotate button, the button keeps being highlighted until i click somewhere else.

Additional feature wishes:

  • Display size when no viewport is selected (basically the iframes body size)
  • Display the name of the selected view (if any)
  • Append P (Portrait) or L (Landscape) to the viewport name

@shilman
Copy link
Member

shilman commented Mar 22, 2019

@lucas-carl This is awesome. Could use some visual treatment (cc @domyen) but we can do that before the 5.1 release. Great work! Are you up for tackling any of the improvements suggested by @backbone87?

@lucas-carl
Copy link
Contributor Author

@shilman @backbone87 I will try to implement these suggestions.
Also, I had the idea that you can double-click on the active viewport's name to reset the viewport.

@codecov
Copy link

codecov bot commented Mar 25, 2019

Codecov Report

Merging #6045 into next will decrease coverage by 0.89%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             next    #6045     +/-   ##
=========================================
- Coverage   35.78%   34.89%   -0.9%     
=========================================
  Files         648      648             
  Lines        9520     9503     -17     
  Branches     1380     1337     -43     
=========================================
- Hits         3407     3316     -91     
- Misses       5536     5553     +17     
- Partials      577      634     +57
Impacted Files Coverage Δ
addons/viewport/src/Tool.js 0% <0%> (ø) ⬆️
lib/ui/src/components/layout/draggers.js 9.09% <0%> (-81.82%) ⬇️
lib/ui/src/components/layout/container.js 20.37% <0%> (-62.97%) ⬇️
lib/ui/src/components/layout/persist.js 27.27% <0%> (-27.28%) ⬇️
lib/ui/src/components/layout/desktop.js 75% <0%> (-25%) ⬇️
lib/ui/src/components/layout/layout.stories.js 77.35% <0%> (-5%) ⬇️
lib/ui/src/app.js 35.71% <0%> (-4.29%) ⬇️
lib/router/src/utils.ts 55.17% <0%> (-1.08%) ⬇️
lib/ui/src/core/stories.js 87.23% <0%> (-0.27%) ⬇️
lib/ui/src/keyboard/keyCodes.ts 0% <0%> (ø) ⬆️
... and 48 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 017b18e...9c23aa7. Read the comment docs.

@ndelangen ndelangen merged commit 8a6346e into storybookjs:next Mar 25, 2019
@backbone87
Copy link
Contributor

sadly

Display size when no viewport is selected (basically the iframes body size)

is missing

@lucas-carl lucas-carl deleted the lucas-carl/viewport-usability branch March 25, 2019 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants