Doc screenshots: generator + captured shots#2
Draft
asg017 wants to merge 4 commits into
Draft
Conversation
…hots Self-contained Playwright screenshot system, modelled on datasette-paper's `shots`: `just shots` boots a throwaway Datasette (fresh internal + data DB), lets a throwaway plugins-dir plugin seed a demo "Q3 Revenue Plan" workbook (values, SUM formulas, currency/bold formatting) plus alice/bob/grace acl grants and friendly actor names, drives a headless browser, then tears it down. Three committed shots in docs/screenshots/, embedded in the README: - workbook-list — the per-database workbook index - editor — the grid with formulas, currency/bold formatting, sheet tabs - collaboration — alice's window with bob + grace present live over SSE (remote cursors, name labels, avatar strip), the headline feature on top of sharing-v2 Determinism: server pinned to PYTHONHASHSEED=0 (stable presence colours), volatile timestamps frozen, a stability stylesheet hides the caret/transitions and the dev-only datasette-debug-bar panel — so a re-run with no UI change produces no binary diff. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…+ gotham dev sharing demo Screenshots: - formula-editing — live signature-help tooltip + coloured highlight of the referenced range while typing =SUM(B2:B5 - autocomplete — merged suggestion list (built-in functions + the sheet's named ranges, e.g. TaxRate) on =T - sheet-tabs — the per-tab management menu (rename / colour / move / delete), captured as a padded union of the tab bar + its body-appended context menu - named-ranges — the Named ranges panel listing seeded ranges + a scalar The seed plugin now defines Q1Revenue / Q2Revenue / TaxRate on the Forecast sheet so the named-ranges + autocomplete shots have content. A shotUnion() helper (from datasette-paper) frames features with detached floating UI. just dev: adopt the sibling-plugin (places / kanban / acl) gotham sharing-demo pattern — load demo actors via datasette-debug-gotham, map each newsroom to an acl dynamic-group, and wire Bruce Wayne as the global acl admin, so per-workbook sharing is demoable locally by switching users. (Pre-existing, unrelated: the workbook *list* page 500s under `just dev` because datasette-sidebar passes a vite_dev_path kwarg the installed datasette-vite rejects — a dev-dep version mismatch, not touched here. Sheets pages themselves render fine.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Bump datasette-sidebar to >=0.0.1a3 (dev dep). a1/a2 call vite_css_urls(..., vite_dev_path=...), a kwarg datasette-vite>=0.0.1a4 (a hard dep) no longer accepts, which 500'd every page rendering the sidebar — incl. the workbook list under `just dev`. a3 drops the kwarg. `just dev` list + /-/plugins now 200. - Screenshots: drop the viewport from 1280x820 to 900x560 (autocomplete uses a taller 760 so its dropdown isn't clipped). The demo data only fills A–D, so the wide shots wasted space on empty columns A–L and ~20 empty rows; 900 is the narrowest width that still shows the full toolbar (A–H now). makeContext() takes an optional viewport for the tall variant. All 7 shots regenerated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…re shot The <datasette-acl-share-dialog> people list 403'd for everyone, including the owner: acl's read API gates on resource_exists, which runs the resource type's resources_sql against the internal DB. Sheets' workbooks live in *user* DBs, so SheetsWorkbookResource.resources_sql was stubbed to return nothing → every workbook read as non-existent. (Sibling plugins like places/kanban work because their resources live in the internal DB.) Fix: enumerate from acl's own internal acl_resources table — SELECT parent, child FROM acl_resources WHERE resource_type = 'sheets-workbook' Every workbook created through the normal flow seeds a creator Manager grant, which upserts an acl_resources row, so existence resolves correctly. resources_sql is an @AbstractMethod, so it can't be dropped, and acl deliberately doesn't fall back to its own tables (issue #43) — this delegates to that table explicitly. - tests/test_share_and_presence.py: end-to-end coverage of the acl read API (manager sees grants; non-manager 403s) + resource_exists, the gap that let this slip (existing tests only exercised grant()/list_grants directly). - screenshots: add the `share` shot back. The demo plugin's actors_from_ids now sets display_name (acl's read API reads that, not name) and uses tryfirst to win the firstresult race vs datasette-debug-gotham, so the dialog shows real names (Alice Ada / Bob Babbage / Grace Hopper) with their roles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Stacked on #1 (sharing-v2). Adds the documentation screenshot tooling and captured shots.
Commits
scripts/screenshots.mjs) +docs/screenshotsBase is
asg017/sharing-v2so this diff shows only the screenshot work. Rebase ontomainonce #1 merges.🤖 Generated with Claude Code