-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Vue devtools #1708
Comments
Ok, I just saw it is already like that in the Vue iframe file, but is not working for me. Checking why... |
I see Events are getting registered, but no components. Can somebody confirm this or say it does work for him? |
related: |
So to answer here, Currently this does not work, It's a remote issue being addressed inside the vue-devtools. There's progress being made to resolve the issue. The reason it's not working, is because the preview and vue binding is happening in an iframe. |
any updates on this ? |
curiously, vue-devtools works fine with vue-play, which also uses an iframe: |
Wow, that IS curious! @kazupon any idea how that'd work? @davidm-public are you able to view the components inside the iframe? because vue-play's manager UI is written in Vue, maybe that's what's being picked up? Debugging that isn't too valuable for developers I imagen.. But if they indeed are somehow able to pull off letting vue devtools connect to the vue instance inside the iFrame, we'd really like to know how to do that in storybook too. |
@davidm-public, @ndelangen assumption is correct, vue-devtools is picking up the VuePlay app and totally ignoring the components from the stories, which are inside an iFrame. |
That might be useful to note that one is able to use devtools if they take the iframe link from the DOM and open it in a separate tab |
That's a stopgap solution, but it's pretty cumbersome. #1376 added the hook to be able to support switching the default iframe. vuejs/devtools-v6#361 is opened and labeled as a discussion of how to handle iframe switching, but if that PR was merged as is it would at least have this functionality working. Please drop by that issue and pitch in to the discussion or give your support if it's something you're interested in. |
still no update on that issue ? is there a way to make it work temporarly ? |
@ynk The issue from vue-devtools side hasn't been merged yet. I pinged one of the maintainers... hopefully it'll get merged. 🤞 |
Try https://github.com/asvae/vue-component-tree It's excellent |
@ndelangen, didn't you fix this? |
@igor-dv vue-component-tree has been renamed vue-book: |
@zephraph shouldn't it be like vue-devtools should add a manual "please select an iframe to inspect" kindof feature ? |
That's a possibility. vuejs/devtools-v6#361 really already does everything that's needed though. Sure, if they wanted, they could actually support it in the UI. Ultimately this would be enough... unfortunately, it doesn't look like there's any movement from that side. |
@zephraph i'll try my luck and ask ; in the meantime, what are the possibilities to fix this issue on storybook side ? |
@y-nk In the next version I'll introduce an eject button to 'eject' the iframe from the manager. This will give the dev tools direct access there. Hope that helps. |
@zephraph @ndelangen I kinda made the devtools work with iframes, at least in its dev environment. I commented my progress here : vuejs/devtools-v6#361 My next goal is to try to build this devtools version to make it testable with storybook. hopefully it should work fine. |
@y-nk that is freaking awesome! |
@ndelangen, maybe it worth fixing it for the v4? |
@ndelangen sadly the Vue team doesn't seem to respond, i wonder if they have seen the post. |
following this storybookjs/storybook#1708 (comment) installed devtools globally (`yarn global add @vue/devtools`) because it requires electron which seems overkill to add in dev deps
* chore: add storybook custom head tag for dev tools following this storybookjs/storybook#1708 (comment) installed devtools globally (`yarn global add @vue/devtools`) because it requires electron which seems overkill to add in dev deps * chore: add storybook to now.sh build * fix: remove specific polygon mark render logic already contained in mixin * feat: add Area mark * feat: add prevRow/nextRow to forEachRow * chore: rename width to strokeWidth * chore: consistent stroke/fill prop naming Fixes #36 * feat: add opacity/strokeOpacity/fillOpacity props * docs: minimal Area prop documentation * chore: `style` in `CreateElement` not `attrs` * fix: update color/opacity props in `createScale` * refactor: optional options object to parseAesthetic.js * refactor: replaced sortX by sort prop * rename: MultiLine mixin to Path * refactor: Area mark render logic * docs: added docs for Area mark * fix: typo * refactor: set Mark aes defaults as component props
@jackkoppa global install isn't required, running fine here on a dev dependency |
Automention: Hey @backbone87 @elevatebart, you've been tagged! Can you give a hand here? |
In the meantime, zero-code/zero-conf hack: inspect the iframe in devtools, and right-click on "Open in new tab" on its "src" attribute, and you get the inspected component with the working devtools. Of course, you'll need to do it again every time you want to inspect another component. |
the latest versions of storybook have a "pop out" mode, which basically
does this for you
…On Wed, Dec 4, 2019 at 11:30 AM Frédéric G. MARAND ***@***.***> wrote:
In the meantime, zero-code/zero-conf hack: inspect the iframe in devtools,
and right-click on "Open in new tab" on its "src" attribute, and you get
the inspected component with the working devtools. Of course, you'll need
to do it again every time you want to inspect another component.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1708?email_source=notifications&email_token=AAAKROROGQQRKIKWA5ZMKY3QW7LLDA5CNFSM4DXZQUZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF5TRXI#issuecomment-561723613>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAKROU32Y6IUMWBS3Z36NTQW7LLDANCNFSM4DXZQUZA>
.
|
|
it does...it opens up the iframe in a new window.
…On Wed, Dec 4, 2019 at 1:18 PM Frédéric G. MARAND ***@***.***> wrote:
That's what I thought, and was my first idea, but it doesn't actually
enable the Vue devtools, for some reason I couldn't guess.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1708?email_source=notifications&email_token=AAAKROWXI7Y5274G3R4YYRTQW7X7XA5CNFSM4DXZQUZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF574GY#issuecomment-561774107>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAKRORJDDCZPYQW43IYAGLQW7X7XANCNFSM4DXZQUZA>
.
|
Allows use of standalone Vue dev tools to get around issue with Vue not detecting components in iframes. See: storybookjs/storybook#1708 See: https://github.com/vuejs/vue-devtools/blob/master/shells/electron/README.md
Is this still open? |
I'd be OK closing, after we can update the docs section here to explain the "Pop Out" mode, which does indeed solve the problems described here much more simply than enabling a local dev tools, for example https://github.com/storybookjs/storybook/blob/next/docs/src/pages/guides/guide-vue/index.md |
it's still annoying to have to go into popout mode. Is it not possible to
do at all when it's in an iframe? Do react dev tools have the same issue in
storybook?
…On Mon, Jun 22, 2020 at 6:26 PM Jack Koppa ***@***.***> wrote:
I'd be OK closing, after we can update the docs section here to explain
the "Pop Out" mode, which does indeed solve the problems described here
much more simply than enabling a local dev tools, for example
https://github.com/storybookjs/storybook/blob/next/docs/src/pages/guides/guide-vue/index.md
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1708 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAKROXVKFCLTN23ZYNMMYDRX6A3RANCNFSM4DXZQUZA>
.
|
@blocka i think react devtools works using this hook: somebody also added a hook for Vue devtools, but I guess Vue devtools doesn't support it |
So something has to be done in vue devtools for this to work? |
I'm not familiar with Vue devtools, but that's my guess. I believe the way we support React devtools is through an API that they provide and we write to, since there is no general way to solve this iframe issue without security implications. |
Link seems to be broken now, what is this "Pop Out" mode mentioned? |
@braddialpad I eventually found it through several other discussions on the same thing. They meant "pop out" the iframe, as in view the iframe source directly. This will let you use vue dev tools. |
@braddialpad @unr @domyen I feel like this feature should have a proper name to avoid confusion. WDYT? Currently it says "open canvas in a new tab", some people say "pop out", others say "eject"... |
Yann is correct, that button is for this purpose exactly. Storybook will make sure all args and globals will be set correctly. |
Good news If you download the latest beta of Vue devtools and open the storybook main page you'll see this: As you can see that's the main storybook page, not the bare iframe view. This works for both Vue 2/3-based storybooks If you want to quickly jump in to check it out, here are repro steps with a repro script that didn't work on beta.13 for me and now works on beta.14: vuejs/devtools-v6#353 (comment) |
Awesome. Going to close this issue! Thanks for the heads up @3nuc !!! |
I have devtools version 6.2.1, vue 3 and @storybook/vue3: ^6.5.12 |
Similar to the React devtools issue with iframes Vue devtools doesn't recognize the Storybooks components. Seems the solution is also similar using the
__VUE_DEVTOOLS_GLOBAL_HOOK__
, although I'm actually not sure if that's up to date.Anyhow, if finally Vue devtools is not compatible with Storybooks there should be a BIG warning about that.
The text was updated successfully, but these errors were encountered: