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

Demo where steps can be set via URL hash #91

Closed
jywarren opened this issue Aug 10, 2017 · 16 comments
Closed

Demo where steps can be set via URL hash #91

jywarren opened this issue Aug 10, 2017 · 16 comments
Assignees

Comments

@jywarren
Copy link
Member

jywarren commented Aug 10, 2017

So it looks in window.location.hash to find a comma delimited set of steps, like #steps=ndvi,threshold, and adds them to the reconfigurable demo.

As you remove/add steps, we update the URL hash to reflect this.

That way, we can pass around almost any imaginable demo sequencer as a fixed URL -- very useful!

This would come after #82 (completed!). Some example of reading/writing the URL hash can be found at https://github.com/jywarren/fisheyegl/blob/master/example/urlHash.js

@jywarren
Copy link
Member Author

jywarren commented Aug 10, 2017

So, for example, if someone says "I wish there were a fast way to crop and threshold these images", you could send them a link to the demo with the right steps configured, and they'd go and it'd be all set up for them, with no having to change the demo code :-)

@ccpandhare
Copy link
Collaborator

Yes, I agree to this. I shall do that. Now working on #82 :-)

@jywarren
Copy link
Member Author

awesome!

@jywarren
Copy link
Member Author

This will be great. I think we can even embed a customized sequencer into a wiki page or research note on PublicLab.org -- it'll be a great way to put the library into use!

@ccpandhare
Copy link
Collaborator

Hope to do that soon :-)
Will get the demo done by tomorrow, and then we can work on this (#91) and then the wiki page!
This will be good documentation too.

@ccpandhare
Copy link
Collaborator

The demo is pretty much done for now, so I shall start working on this

@jywarren
Copy link
Member Author

Great. Sorry for being offline much of this week, it was a vacation I really needed! I'll be back online this coming week.

@ccpandhare
Copy link
Collaborator

What if the user wants to set any options? I think that should be included in the hash as well.

@jywarren
Copy link
Member Author

jywarren commented Aug 20, 2017 via email

@jywarren
Copy link
Member Author

should we add a distinct button called "generate permalink" to this? Or is it clear?

@ccpandhare
Copy link
Collaborator

This is pretty clear.
I am just skeptical about adding options to steps via the hash, and if we don't, the incompleteness of the same.

Yes, we should start including them.

@jywarren
Copy link
Member Author

What do you think about a syntax more like:

examples/#steps=ndvi,threshold[40] -- although this starts to get a bit weird, and we'd have to specify the keyname too, so [value=40] ... just brainstorming here.

@jywarren
Copy link
Member Author

also I added you on npmjs.org - you should be able to npm publish now, but please take care to do so only from the master branch.

@jywarren
Copy link
Member Author

Now that I think of it, let's just break this in two. First version should have just steps, no options. It'll just use the defaults. Let's open another issue (which we can think about a bit longer) that has options presets too. That more extended version shouldn't stop us from doing the initial version first.

@ccpandhare
Copy link
Collaborator

Looks cool. Will do!

@jywarren
Copy link
Member Author

jywarren commented Oct 2, 2017

Completed and split off new issue!

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

No branches or pull requests

2 participants