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

specify multiple components on URI #98

Open
carandraug opened this issue Jul 15, 2020 · 0 comments
Open

specify multiple components on URI #98

carandraug opened this issue Jul 15, 2020 · 0 comments

Comments

@carandraug
Copy link
Member

Requested by @iandobbie:

I also tried to set both a setup and dye from the URL, ie

https://www.micron.ox.ac.uk/software/spekcheck/?setup=4Pi#setup=4Pi%20Farred#dye=CF-660c

The setup list is restricted but neither the dye not setup are
selected. However each appears to work by themselves, eg

https://www.micron.ox.ac.uk/software/spekcheck/?setup=4Pi#dye=CF-660c

or

https://www.micron.ox.ac.uk/software/spekcheck/?setup=4Pi#setup=4Pi%20Farred

Could this be enabled to allow a complete config including dye to be
selected from the URL?

I believe that the code that matters for this is in SpekCheck.route_hash. Basically, it looks at the fragment/hash component of the URI. In the case of #setup=foo it looks for a setup named foo and in the case of #setup=foo#dye=bar, it will look for a setup named foo#dye=bar. It's typical to split the fragment component with & so that's a solution.

However, to note that a setup includes a dye (although in most cases we have it empty) so it's a bit weird to specify both a setup and dye. I guess that we could have it so that #setup=4pi&dye=gfp will apply gfp on top of the 4pi setup and dye=gfp&setup=4pi will apply the 4 pi setup on top of the gfp dye (possibly setting the dye to something else).

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

No branches or pull requests

1 participant