Skip to content

fix: back-to-top button jumps instantly — add smooth scroll transition #131

@Tushar8466

Description

@Tushar8466

Describe the bug

The back-to-top (↑) button on the landscape guide page teleports
the user instantly to the top of the page with zero animation.
This feels abrupt and disorienting, especially on longer sections
where the user has scrolled far down.

A smooth scroll transition is a standard UX expectation on modern
web pages — most users expect a gentle glide back to the top rather
than a sudden jump. This is a small change with a noticeable
improvement to the reading experience.

Steps To Reproduce

  1. Open the landscape guide page in any browser
  2. Click on any category/section from the left sidebar
    (e.g. one with long content)
  3. Scroll down manually until the ↑ back-to-top button
    appears in the bottom-right corner
  4. Click the ↑ button
  5. Page instantly jumps to the top with no animation

Expected Behavior

Page should smoothly scroll back to the top with a transition
(~300–500ms ease), giving the user visual continuity.

Actual Behavior

Page teleports directly to the top — no scroll animation,
no easing, abrupt UX.

Suggested Fix

Since landscape2 strips <style> tags from guide.yml,
this should be applied the same way as the target="_blank"
patch in #130 — by injecting it into build/index.html
via build.sh after the build.

Screenshots

Screen.Recording.2026-03-22.at.8.55.55.PM.mov

Device Information [optional]

- OS:MacOS
- Browser:Chrome
- version:

Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions