Add opt-in capture mode for full-page screenshot stability#77
Open
Andrey1771 wants to merge 4 commits into
Open
Add opt-in capture mode for full-page screenshot stability#77Andrey1771 wants to merge 4 commits into
Andrey1771 wants to merge 4 commits into
Conversation
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.
Motivation
fixed/stickyoverlays (notably.header-navwithbackdrop-filterand blog stickies) duplicated or compositing-broken, while normal runtime UX must remain unchanged.Description
tale-gameshop/src/styles/capture-mode.cssthat activates whenhtml[data-capture-mode="true"]is set and disables animations, transitions and smooth scrolling, removesbackdrop-filtereffects and other compositing-sensitive properties, and converts selected floating elements to document flow..header-navis temporarily renderedposition: static(no permanent runtime change), the runtime spacer.main-page-down-header-paddingis hidden, and visual appearance is preserved via a simple background/shadow fallback.staticbehavior:.blog-toolbar-wrap,.blog-post-aside,.support-chat,.cookie-banner,.catalog-sidebar,.checkout-page-aside,.game-details-tabs,.account-sidebarand provided a generic hookdata-capture-safe="disable-floating"for future overlays.tale-gameshop/src/index.cssand added a small dev helpertale-gameshop/src/utils/capture-mode.tsexposingenableCaptureMode()anddisableCaptureMode()that set/remove the attribute ondocument.documentElement(the mode is opt-in and does not change normal runtime behavior unless enabled).Testing
pythonone-liner) to findposition: fixed|stickyoccurrences and used its output to choose selectors included in capture mode, and the scan completed successfully.npm run lintin the app; the command failed in this environment due to missingtslint(sh: 1: tslint: not found), so lint could not be validated here.Codex Task