Skip to content

Conversation

@etienneCharignon
Copy link
Collaborator

All this started with the issue #113, about helping users to find their code object among others in the programmer view.

In the process of introducing a "solo" mode we identified the need of an interface between the programmer view and the renderer.

This PR is about implementing this interface using the URL of the renderer.
Here are the supported options, as an example with a playground named pg:

https://paysage.xyz/playground/pg#only=myCodeId to show only one code,
https://paysage.xyz/playground/pg# to show all codes,
https://paysage.xyz/playground/pg#only= to show none.
This PR is also providing a mean to show a specific list of codeIds what is not necessary for implementing the solo mode, but might be useful for more advanced behaviours:
https://paysage.xyz/playground/pg#only=codeId1,codeId2

This last point is open to comment (among any other review comments). Do we want to keep this ?

@jonathanperret jonathanperret temporarily deployed to paysage-test-pr-121 September 26, 2018 20:07 Inactive
@juliendorra
Copy link
Collaborator

juliendorra commented Oct 22, 2018

I find this really cool, as it opens a new complex editing and preview behavior and still keeps the parts independent. I tested it on the test deployment playground. I love the simplicity and how it's web-oriented as a solution.

I think we can do better in term of URL, making it fully respectful of URL conventions.

If we draw inspiration from the Media Fragments spec— that use #t=13,500— we should have something like #code= instead of #only.

That is: we use the type of the ressource we are targeting and not a command.

Fragment IDs are at their core a ressource querying mechanism, so in essence we say: "please query the /playground with ID /playgroundID and in this Playground query #code with codeIDs codeid1, codeid2.

Querying a non-existent code ID should show nothing, as we ask for a non-existing ressource

An empty Query string #code= should be an error, if I understand the various fragment specs correctly. How are we treating this error? By showing everything or showing nothing? I'm not sure, but I think I would favor fallback to show everything in this case.

Useful references:
https://en.wikipedia.org/wiki/Fragment_identifier#Examples
https://www.w3.org/TR/media-frags/

@jonathanperret jonathanperret temporarily deployed to paysage-test-pr-121 October 23, 2018 11:43 Inactive
@etienneCharignon
Copy link
Collaborator Author

@juliendorra I did the switch to a code query form.

I decided to interpret the #code= as the mean for querying none of the objects because we need this for the "switch off preview".

This is unusual to need a query for returning no object so it's a little bit strange but I don't see any other way to do it. Do you have a better idea ?

@jonathanperret
Copy link
Owner

A renderer that does not render anything is arguably not very useful. How about using about:blank as an URL for that case?

@jonathanperret jonathanperret temporarily deployed to paysage-test-pr-121 October 28, 2018 19:58 Inactive
@jonathanperret jonathanperret temporarily deployed to paysage-test-pr-121 October 28, 2018 20:02 Inactive
@etienneCharignon
Copy link
Collaborator Author

Don't you think that this PR is ready to be merged ?

@jonathanperret jonathanperret temporarily deployed to paysage-test-pr-121 November 11, 2018 17:59 Inactive
@jonathanperret jonathanperret temporarily deployed to paysage-test-pr-121 November 11, 2018 18:01 Inactive
…t submission.

Keep the list of selected code object ids so that, for example, new code
objects would not appear when the preview is off.
…ects.

Useful references:
https://en.wikipedia.org/wiki/Fragment_identifier#Examples
https://www.w3.org/TR/media-frags/

The specification recommand to adresse '#code=' as an error. I did use this
form for expressing a "return no object" query because we actualy need it.
@jonathanperret jonathanperret temporarily deployed to paysage-test-pr-121 December 5, 2018 21:05 Inactive
…view

Since we do not need anymore a renderer url for rendering none of the objects
I made the query '#code=' (without any code) to render all codes
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 this pull request may close these issues.

4 participants