h2oai / h2oai/wave

Ability to scroll to a particular location on a page

Open
#1,053 5 comments 0 reactions 0 assignees View on GitHub
feature ui
Dominant language
Python
Stars
4.3k
Forks
371
Avg merge
26d 1h
Merged PRs (30d)
1

Description

**Problem**

On pages longer the browser's viewport, when a chunk of the page is overwritten, sometimes the browser scrolls to the top of the page. To improve UX, apps should be able to specify a location to "jump to" after an update.

**Proposal**

(Not sure if we can actually make this work reliably)

- Introduce a `ui.bookmark(name='foo')` API that can be used in a `form_card` to specify a "jump location" (rendered as `` internally).
- Introduce `meta_card.bookmark='foo'` that specifies a bookmark to "jump to" after an update (processed using `element.scrollIntoView()`).

Via @psinger

Open to other solutions @mturoci

Contributor guide

Open the contributing guide

Research direction

Start by tracing the form_card and meta_card entry points and the existing page-update scroll behavior. The issue proposes a ui.bookmark API, a meta_card.bookmark value, and scrollIntoView(); done means an update reliably lands at the requested bookmark without unexpectedly returning to the page top.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
api, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.