Page MenuHomeSoftware Heritage

templates/content-display: Check content rendering for mime type first
ClosedPublic

Authored by anlambert on May 6 2022, 2:35 PM.

Details

Summary

The webapp can render some special content types (images, pdf) based on the
mimetype of the currently browsed content object.

However the checks of these mime types were done after the check for source
code rendering which could lead to errors client side.

Fixes SWH-WEBAPP-3T3

Diff Detail

Repository
rDWAPPS Web applications
Branch
image-pdf-rendering-fixes
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29142
Build 45561: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 45560: arc lint + arc unit

Event Timeline

Update years in license headers

Build is green

Patch application report for D7757 (id=28065)

Rebasing onto 54e679c461...

Current branch diff-target is up to date.
Changes applied before test
commit 6d8239214f58e9bd687f18ef1a4c7a5333123ee3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri May 6 14:31:59 2022 +0200

    templates/content-display: Check content rendering for mime type first
    
    The webapp can render some special content types (images, pdf) based on the
    mimetype of the currently browsed content object.
    
    However the checks of these mime types were done after the check for source
    code rendering which could lead to errors client side.

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

Build is green

Patch application report for D7757 (id=28066)

Rebasing onto 54e679c461...

Current branch diff-target is up to date.
Changes applied before test
commit 5e679a19ccd9ea45e4aa51fd61374f0464f77d8c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri May 6 14:31:59 2022 +0200

    templates/content-display: Check content rendering for mime type first
    
    The webapp can render some special content types (images, pdf) based on the
    mimetype of the currently browsed content object.
    
    However the checks of these mime types were done after the check for source
    code rendering which could lead to errors client side.

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

Build is green

Patch application report for D7757 (id=28071)

Rebasing onto e6a8303eef...

Current branch diff-target is up to date.
Changes applied before test
commit 47b142d181c0c5e3b0447a27c368f100b63a6241
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri May 6 14:31:59 2022 +0200

    templates/content-display: Check content rendering for mime type first
    
    The webapp can render some special content types (images, pdf) based on the
    mimetype of the currently browsed content object.
    
    However the checks of these mime types were done after the check for source
    code rendering which could lead to errors client side.

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

This revision is now accepted and ready to land.May 9 2022, 9:55 AM

Build is green

Patch application report for D7757 (id=28095)

Rebasing onto 96cc635cab...

Current branch diff-target is up to date.
Changes applied before test
commit ae7c33ec99efed523a80ed3b50ee17778cb1dc2a
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri May 6 14:31:59 2022 +0200

    templates/content-display: Check content rendering for mime type first
    
    The webapp can render some special content types (images, pdf) based on the
    mimetype of the currently browsed content object.
    
    However the checks of these mime types were done after the check for source
    code rendering which could lead to errors client side.

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