Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashboard: when a new job is added, don't scroll the stopped log window being hovered over #563

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Conversation

ivan
Copy link
Contributor

@ivan ivan commented Nov 9, 2023

This fixes:

"when you hover over a log window, it stops scrolling as intended, but each time a new job is added at the top of the dashboard, the log window scrolls to the bottom. I'm pretty sure this wasn't the case before [...]."

Reported by @JustAnotherArchivist

Diagnosis:

JobsRenderer._createLogContainer calls this.applyFilter(); applyFilter was scrolling all the log windows (with the intention of scrolling log windows made newly visible by the filter), but neglected to check whether they were log-window-stopped.

… hovered over

This fixes:

"when you hover over a log window, it stops scrolling as intended, but
each time a new job is added at the top of the dashboard, the log window
scrolls to the bottom. I'm pretty sure this wasn't the case before [...]."

Diagnosis:

`JobsRenderer._createLogContainer` calls `this.applyFilter()`; `applyFilter`
was scrolling all the log windows (with the intention of scrolling log windows
made newly visible by the filter), but neglected to check whether they were
`log-window-stopped`.
@ivan
Copy link
Contributor Author

ivan commented Nov 9, 2023

Merging after testing:

Chrome 119 on Windows: before fix, confirmed that setTimeout(() => ds.jobsRenderer.applyFilter(), 3000); causing a stopped logged window to scroll down; no more scrolling after the fix.

Firefox 119 on Windows: confirmed no more scrolling after the fix.

Performance considerations: there might be a better way to do this without querying classList, but it should be fine and applyFilter isn't called very often.

@ivan ivan merged commit df5ccbe into ArchiveTeam:master Nov 9, 2023
@ivan ivan deleted the stopped-logged-window branch November 9, 2023 18:45
@ivan ivan changed the title When a new job is added, don't scroll the stopped logged window being hovered over Nov 9, 2023
@ivan ivan changed the title dashboard: when a new job is added, don't scroll the stopped logged window being hovered over Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant