generated from lucas/rust-webserver-template
Column state in the query string; migrate wrap out of the cookie #40
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat/Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Tag/Good First Issue
Tag/Help Wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/logview#40
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of the dynamic-columns work. Depends on the grid layout / cell model / header issue.
Why
Column visibility, order and width need somewhere to live. The query string is the right place rather than the
viewcookie:viewcookie disappears, since query parameters are percent-encoded.AGENTS.mdinvariant 6 already requires internal view links to carry the current time range forward, so a mechanism for propagating view params throughhrefs is mandated regardless.Scope
Encoding. One parameter:
?cols=time,node,app:28,levelname:widthoverrides the view's declared default; barenameuses itch, meaning text capacityfitis a valid width value (app:fit), resolved server-side at renderWidths are optional by design, so a view can retune its defaults later without every saved link pinning stale values.
Hide and reorder are server-side re-renders, deliberately. CSS
orderanddisplay: nonewould both work visually, butorderleaves text selection and copy following DOM order — so copying a reordered row yields the fields in the wrong sequence. Omitting the cell server-side is correct and also emits less markup.wrapmoves from the cookie to the query. It is presentation of this view and belongs in a shared link. Note it is not a navigation: nothing about wrap is server-side (it already toggles client-side today), so the control flips the class and callshistory.replaceState. The server renders it only for correct first paint.tzstays a cookie. It is a property of whose browser is looking, not of the view; a link shared with someone in another zone should render in theirs.--log-colsderives fromcolsandwraptogether, since the message track differs between modes.This leaves hide and reorder as the only operations needing a round trip.
Acceptance
?cols=controls which cells are emitted, in what order, at what width.wrapis read from the query, rendered into first paint, and toggled client-side with the URL kept in sync.ViewStateno longer carrieswrap.Out of scope
Resize and
fitgestures (separate issue). A scroll/entry anchor in the URL — it is only durable once a pinned time range exists, so it belongs with the time-range work.Known gap
Hide and reorder are full navigations and therefore lose scroll position. Accepted for now; the entry anchor that would fix it is deferred. A client-side swap of the rendered
contentblock would also fix it and would reuse the same template via askama's block rendering, but it is not worth the tail-stream teardown complexity for the two rarest operations.Follow-up noted while writing this
The comment in
assets/js/view-state.jsjustifies a synchronous cookie write with "callers reload immediately after writing", but its only caller does not reload. Removingwrapfrom the cookie forces a decision there —tzwould be the sole remaining value.