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

Linking TDs to Playground #85

Closed
egekorkan opened this issue Dec 14, 2022 · 4 comments · Fixed by #89
Closed

Linking TDs to Playground #85

egekorkan opened this issue Dec 14, 2022 · 4 comments · Fixed by #89

Comments

@egekorkan
Copy link
Contributor

With @fexpal we have discussed the posibility to transfer TDs from Editdor to Playground and vice versa. TD Links in Playground are generated via https://www.npmjs.com/package/lz-string (also see eclipse-thingweb/playground#359) which has some advantages to usual URL encoding. A button can be placed that simply does the same encoding to the TD in the JSON Editor part and open a new tab with playground in it for future tests on the TD.

It might be also worthwhile to use the same compression here but we can do a more objective comparison first.

@spf00
Copy link
Contributor

spf00 commented Mar 10, 2023

When sharing a TD via the TD Playground and using the compressed string as input for the ediTDor I always end up with a "tdjson" prefix. @egekorkan do you know why that's the case? It seems to me that the Playground does some extra steps when compressing and decompressing a TD/TM via lz-string.

image

@egekorkan
Copy link
Contributor Author

That is added since we have a single way to share TDs and TMs and we use this to distinguish whether the intention is to create a TD or TM. As to why finding a TM or TD is not automatic in playground, see eclipse-thingweb/playground#223

@spf00
Copy link
Contributor

spf00 commented Mar 14, 2023

Okay so for the time being I think we should do the same thing. Do you agree with that @egekorkan?

@egekorkan
Copy link
Contributor Author

Okay so for the time being I think we should do the same thing. Do you agree with that @egekorkan?

Sorry for the late reply. I think that editdor also never tries to guess whether there is a TD or TM, so the same approach works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants