Closed Bug 1289651 Opened 9 years ago Closed 9 years ago

Only scroll the job into view if it's not already visible

Categories

(Tree Management :: Treeherder, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KWierso, Assigned: KWierso)

References

Details

Attachments

(1 file)

Scrolling the job into view is useful when the job is not visible, but I'm frequently getting annoyed because I somewhat scroll around the page after jumping to the next/prev job so that I can see commit/push information in addition to the job information, and hitting n/p makes the page jump around, even though the job is quite clearly still visible on the page. I'd argue we should only scroll the job into view if the job is not currently in the viewport (with the reduced height viewport because the bottom panel is open).
Assignee: nobody → wkocher
Comment on attachment 8774982 [details] [review] [treeherder] KWierso:scrollintoviewonlyifneeded > mozilla:master This should do it. One thing I've noticed is that occasionally, the height of the bottom panel is something silly like 35 pixels, causing jobs eventually hidden by the bottom panel to not scroll into view. I guess that's while the bottom panel is first loading? I guess I can maybe either do a very slight delay in the isOnScreen() function to give it time to fully load, or maybe just hardcode a guess of the bottom panel height if it's below a certain value?
Attachment #8774982 - Flags: review?(cdawson)
Comment on attachment 8774982 [details] [review] [treeherder] KWierso:scrollintoviewonlyifneeded > mozilla:master One minor tweak requested. But other than that, looks good to go.
Attachment #8774982 - Flags: review?(cdawson) → review+
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/5219f00e7af7b52e66e362d20bb5d4b0ceb84bfa Bug 1289651 - Only scroll job into view if it's not already visible (#1735) r=camd
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: