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

links should navigate in the parent window #1650

Merged
merged 3 commits into from Aug 15, 2017

Conversation

blairanderson
Copy link
Contributor

@blairanderson blairanderson commented Aug 13, 2017

Issue:

fixes #1122

What I did

I found that creating normal <a target="_blank" href="https://www.google.com">foo</a> links inside of a story would update the iframe and not actually take the user out to the external link

<base>tag is supported by all browsers https://stackoverflow.com/a/2656798/1536309

How to test

before:
add a link to a component and click on it.
<a href="https://www.google.com">google</a>
will only update the iframe

after:
link moves on the parent window.

I found that creating normal `<a target="_blank" href="https://www.google.com">foo</a>` links inside of a story would update the iframe and not actually take the user out to the external link

`<base>`tag is supported by all browsers https://stackoverflow.com/a/2656798/1536309 

fixes storybookjs#1122
@blairanderson
Copy link
Contributor Author

fyi users can temporarily fix with using their own head tags:

https://storybook.js.org/configurations/add-custom-head-tags/

@Hypnosphi
Copy link
Member

Good fix! Please update it in app/vue as well

@codecov
Copy link

codecov bot commented Aug 14, 2017

Codecov Report

Merging #1650 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1650   +/-   ##
=======================================
  Coverage   21.14%   21.14%           
=======================================
  Files         247      247           
  Lines        5575     5575           
  Branches      675      663   -12     
=======================================
  Hits         1179     1179           
- Misses       3890     3907   +17     
+ Partials      506      489   -17
Impacted Files Coverage Δ
app/react/src/server/iframe.html.js 63.15% <ø> (ø) ⬆️
lib/ui/src/modules/api/configs/init_api.js 40.47% <0%> (ø) ⬆️
addons/knobs/src/components/PropForm.js 8.51% <0%> (ø) ⬆️
addons/notes/src/react.js 0% <0%> (ø) ⬆️
lib/codemod/src/transforms/update-addon-info.js 53.65% <0%> (ø) ⬆️
...ponents/left_panel/stories_tree/tree_decorators.js 32.98% <0%> (ø) ⬆️
lib/ui/src/modules/shortcuts/actions/shortcuts.js 6.25% <0%> (ø) ⬆️
lib/ui/src/modules/ui/components/layout/usplit.js 38.7% <0%> (ø) ⬆️
lib/ui/src/modules/api/actions/api.js 50.47% <0%> (ø) ⬆️
...react-native/src/manager/components/PreviewHelp.js 0% <0%> (ø) ⬆️
... and 17 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 f3fa02f...976a0c7. Read the comment docs.

Copy link
Member

@danielduan danielduan left a comment

Choose a reason for hiding this comment

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

If you can update app/vue, think we're good to merge. Thanks for fixing!

@blairanderson
Copy link
Contributor Author

@danielduan I updated app/vue file as well 👍

@Hypnosphi Hypnosphi merged commit db69a10 into storybookjs:master Aug 15, 2017
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.

None yet

3 participants