Skip to content
New issue

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

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

Already on GitHub? # to your account

Add isolatorURL to action outputs #277

Closed
ndelangen opened this issue Feb 9, 2021 · 8 comments
Closed

Add isolatorURL to action outputs #277

ndelangen opened this issue Feb 9, 2021 · 8 comments
Assignees
Labels
bug Classification: Something isn't working tiny Estimate: <= 2 hours

Comments

@ndelangen
Copy link
Member

ndelangen commented Feb 9, 2021

The output could be added, the isolatorURL (where the iframe.html is hosted) is saved on the 'context' here:

ctx.isolatorUrl = url;

The resulting context can be extracted here:

code: ctx.exitCode,

Then set as an output for the action here:

const [{ url, code }] = await Promise.all([chromatic]);
setOutput('url', url);

┆Issue is synchronized with this Asana task by Unito

@deebov
Copy link

deebov commented Feb 12, 2021

may I know why this issue was closed? Because the storybookUrl that's exposed to the output is wrong (empty).

image

This should be ctx.isolatorUrl instead of ctx.build.isolatorUrl:

storybookUrl: ctx.build?.isolatorUrl,

Where (I suppose) the actual link to isolatorUrl is set:

ctx.isolatorUrl = new URL('/iframe.html', domain).toString();

@ghengeveld
Copy link
Member

ghengeveld commented Feb 15, 2021

This should be ctx.build?.cachedUrl

isolatorUrl isn't guaranteed to be around forever (i.e. when using a tunnel).

@ndelangen
Copy link
Member Author

ow! no!

@ndelangen
Copy link
Member Author

should be an easy fix then right @ghengeveld ?

@ghengeveld
Copy link
Member

Yes, just use cachedUrl. isolatorUrl isn't something that should be used after the build is done.

@deebov
Copy link

deebov commented Feb 16, 2021

Thanks for reopening this.

Should I make a PR?

@tmeasday tmeasday added bug Classification: Something isn't working tiny Estimate: <= 2 hours labels Feb 18, 2021
@tmeasday tmeasday added this to the Q1 Improvements milestone Feb 18, 2021
@ndelangen
Copy link
Member Author

I'll do it today!

@ndelangen
Copy link
Member Author

@ghengeveld I think that was released now?

@tmeasday tmeasday removed this from the Q1 Improvements milestone Apr 1, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Classification: Something isn't working tiny Estimate: <= 2 hours
Projects
None yet
Development

No branches or pull requests

4 participants