Skip to content

Add opt-in capture mode for full-page screenshot stability#77

Open
Andrey1771 wants to merge 4 commits into
feature_editors-picksfrom
codex/implement-capture-mode-for-full-page-screenshots
Open

Add opt-in capture mode for full-page screenshot stability#77
Andrey1771 wants to merge 4 commits into
feature_editors-picksfrom
codex/implement-capture-mode-for-full-page-screenshots

Conversation

@Andrey1771

Copy link
Copy Markdown
Owner

Motivation

  • Full-page/stitched screenshots show fixed/sticky overlays (notably .header-nav with backdrop-filter and blog stickies) duplicated or compositing-broken, while normal runtime UX must remain unchanged.
  • Need a clean, opt-in technical mode that temporarily makes floating UI safe for sequential captures without spreading hacks across many components.

Description

  • Added a centralized stylesheet tale-gameshop/src/styles/capture-mode.css that activates when html[data-capture-mode="true"] is set and disables animations, transitions and smooth scrolling, removes backdrop-filter effects and other compositing-sensitive properties, and converts selected floating elements to document flow.
  • In capture mode .header-nav is temporarily rendered position: static (no permanent runtime change), the runtime spacer .main-page-down-header-padding is hidden, and visual appearance is preserved via a simple background/shadow fallback.
  • Converted known problematic elements to capture-safe static behavior: .blog-toolbar-wrap, .blog-post-aside, .support-chat, .cookie-banner, .catalog-sidebar, .checkout-page-aside, .game-details-tabs, .account-sidebar and provided a generic hook data-capture-safe="disable-floating" for future overlays.
  • Imported the new stylesheet in tale-gameshop/src/index.css and added a small dev helper tale-gameshop/src/utils/capture-mode.ts exposing enableCaptureMode() and disableCaptureMode() that set/remove the attribute on document.documentElement (the mode is opt-in and does not change normal runtime behavior unless enabled).

Testing

  • Ran an automated CSS scan (python one-liner) to find position: fixed|sticky occurrences and used its output to choose selectors included in capture mode, and the scan completed successfully.
  • Ran npm run lint in the app; the command failed in this environment due to missing tslint (sh: 1: tslint: not found), so lint could not be validated here.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant