Add URL syntax to set specific UI settings #1060
Labels
No Label
backend
critical
defect
duplicate
enhancement
fixed
frontend
general
invalid
major
minor
normal
oxjs
pandora_client
python-ox
task
trivial
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: 0x2620/pandora#1060
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[link to edit/play view of an item specific timeline]was:
sometimes it would be nice to be able to link to a specific timeline of an item, like look at the slit-scan timeline at /id/editor...
This could set the timeline for all items or temporarily overwrite it. Both options seem wrong, possibly there is a third.
Should set the timeline UI preference to the given timeline type.
A similar enhancement would be to allow for links to a grid view with frames (as opposed to posters).
But currently, there's no URL pattern for this type of link (which is, basically: set a specific UI setting). Query syntax makes no sense (ui_timelines=slitscan|title=foo), so we would have to introduce a third set of magic keywords (like for view and sort), likely composed of key and value (as the value may not be unique across keys).
The least complicated solution may be to use the hash, i.e. ...#showAnnotations=false,videoTimeline=slitscan
There is potential competition for the hash though (section in about/faq, eventually map place).
This looks good:
#section?key=value&foo.bar=baz
Could be swallowed before invoking the URL controller.
Additionally, we could generate site.org/#?XYZ URLs that link to a complete UI state.
link to edit/play view of an item specific timelineto Add URL syntax to set specific UI settingsAlso see #1078
#?reset may be useful too
How do we deal with types?
Not at all? showAnnotations = "true"?
Automatically coerce to boolean or number? item = 60304?
Determine types by parsing pandora.site.user.ui? (hard)
Require quotes for string values? #?videoTimeline="slitscan"?
Require quotes for string values only if there is an ambiguity?
Whitelist + custom code for supported keys? (hard to maintain)
Use JSON.parse to allow for ?#listSort=[{"key": "title", "operator": "+"}]?
Replying to [rlx]comment:7:
For now: JSON.parse(str), or str if JSON.parse throws.
Also see #1474 (can corrupt UI settings via URL).