Repository navigation
JSON viewer: Open in SolidOS link that names the thing the document is about - #51
Merged
Merged
Conversation
…bout; viewer 0.0.2 (#50)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #50.
Adds an "Open in SolidOS" link to the JSON viewer, beside the Viewer / Raw switch.
What changes
src/json-viewer-start.js: the viewer is started withsolidosLink: true.vendor/json-viewer/json-viewer.js: viewer 0.0.2 from solid-panes/json at44c440e, with its SHA-256 inPINS.json(scripts/vendor-json-viewer.jsupdated to that commit). 0.0.2 adds the rule for what the link names.What the link does
https://solidos.org/docs/browser/?uri=<address>in a new tab. Nothing is requested unless it is clicked; the "no added requests" check in the browser test still passes.mainEntity/primaryTopic,mainEntityOfPage/isPrimaryTopicOf), else#me, else#this. Only things inside the same document; an identifier elsewhere is never followed. Example:…/people/alex.jsonldopens as…/people/alex.jsonld#me, so SolidOS shows the Profile pane.What does not change
Checked
npm test486 pass,npm run lintclean,npm run build.alex.jsonld→#me; a multi-thing document and plain JSON → the document; an address with a fragment keeps it).One thing for the maintainers to weigh: the link is shown whenever the viewer is on. If you would rather it were its own setting, that is a small follow-up.