Page MenuHomeSoftware Heritage

assets/revision: Fix a couple of bugs related to events handling
ClosedPublic

Authored by anlambert on Dec 11 2020, 4:05 PM.

Details

Summary

When browsing a content through the revision view, the click event handlers
for highlighting content lines or diff lines in the Changes tab were in
conflict leading to weird GUI behavior. So ensure each click handler is
executed only when needed.

Also modifying URL fragment when resetting diff highlighting triggers the
hashchange handler for code highlighting so avoid processing the fragment
if it does not match line numbers regexp.

Finally, prevent unwanted document scrolling when modifying URL fragment
after the cancellation of diff highlighting.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D4727 (id=16739)

Rebasing onto 7bd24236ab...

Current branch diff-target is up to date.
Changes applied before test
commit 14db3f25cb533018101f39c27db75d6b17f7544e
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Dec 10 16:00:52 2020 +0100

    assets/revision: Fix a couple of bugs related to events handling
    
    When browsing a content through the revision view, the click event handlers
    for highlighting content lines or diff lines in the Changes tab were in
    conflict leading to weird GUI behavior. So ensure each click handler is
    executed only when needed.
    
    Also modifying URL fragment when resetting diff highlighting triggers the
    hashchange handler for code highlighting so avoid processing the fragment
    if it does not match line numbers regexp.
    
    Finally, prevent unwanted document scrolling when modifying URL fragment
    after the cancellation of diff highlighting.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/531/ for more details.

This revision is now accepted and ready to land.Dec 11 2020, 4:35 PM
This revision was landed with ongoing or failed builds.Dec 11 2020, 5:19 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D4727 (id=16744)

Rebasing onto 350c89d2ab...

Current branch diff-target is up to date.
Changes applied before test
commit ed7a4a3705fde729c3fff4a72e2e76c70698229f
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Dec 10 16:00:52 2020 +0100

    assets/revision: Fix a couple of bugs related to events handling
    
    When browsing a content through the revision view, the click event handlers
    for highlighting content lines or diff lines in the Changes tab were in
    conflict leading to weird GUI behavior. So ensure each click handler is
    executed only when needed.
    
    Also modifying URL fragment when resetting diff highlighting triggers the
    hashchange handler for code highlighting so avoid processing the fragment
    if it does not match line numbers regexp.
    
    Finally, prevent unwanted document scrolling when modifying URL fragment
    after the cancellation of diff highlighting.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/533/ for more details.