-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use the url hash of the renderer to manage code objects visibility #121
base: master
Are you sure you want to change the base?
Conversation
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 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 Querying a non-existent code ID should show nothing, as we ask for a non-existing ressource An empty Query string Useful references: |
@juliendorra I did the switch to a code query form. I decided to interpret the 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 ? |
A renderer that does not render anything is arguably not very useful. How about using |
Don't you think that this PR is ready to be merged ? |
91a4a0b
to
6c094f0
Compare
… code objects' visibility
…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.
6c094f0
to
52abdcf
Compare
…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
52abdcf
to
e28705b
Compare
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 ?