Page MenuHomeSoftware Heritage

Add link to extrinsic metadata API from the browse view
ClosedPublic

Authored by vlorentz on Mon, Sep 6, 3:24 PM.

Details

Summary

This partially replaces the existing 'Show metadata' that only works for
metadata written directly on revision objects.

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 D6190 (id=22418)

Rebasing onto ea485ffd9e...

Current branch diff-target is up to date.
Changes applied before test
commit 381b4a87e9536b9b2024a5ec086270006b489c40
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Sep 6 15:24:51 2021 +0200

    Add link to extrinsic metadata API from the browse view
    
    This partially replaces the existing 'Show metadata' that only works for
    metadata written directly on revision objects.

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

anlambert added a subscriber: anlambert.

While testing, I noticed the dropdown items for the Browse extrinsic metadata button are the same as the Download one.
To add multiple dropdowns in a bootstrap btn-group, you need to wrap each dropdown in a new btn-group, see related post on stackoverflow.

swh/web/templates/includes/top-navigation.html
133–149 ↗(On Diff #22418)

You should move that code in the includes/show-metadata.html file.

This revision now requires changes to proceed.Mon, Sep 6, 4:37 PM

move to show-metadata.html + wrap in btn-group

oops, good catch. I did it, but now the layout is all weird.

Build is green

Patch application report for D6190 (id=22426)

Rebasing onto ea485ffd9e...

Current branch diff-target is up to date.
Changes applied before test
commit 0da16d888f0fc219665a3a1eb11cd005adc11760
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Sep 6 15:24:51 2021 +0200

    Add link to extrinsic metadata API from the browse view
    
    This partially replaces the existing 'Show metadata' that only works for
    metadata written directly on revision objects.

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

anlambert added inline comments.
swh/web/templates/includes/show-metadata.html
35

Maybe this could be simply named Extrinsic metadata ?

swh/web/templates/includes/vault-create-tasks.html
40

You must remove that btn-group, only the one above is required. This is why the layout looks weird.

This revision now requires changes to proceed.Tue, Sep 7, 11:25 AM
swh/web/templates/includes/vault-create-tasks.html
40

Thanks. It fixes the layout of the dropdown, but not the revision "card"

fix dropdown + use smaller label

Build is green

Patch application report for D6190 (id=22443)

Rebasing onto 8c8550a08a...

First, rewinding head to replay your work on top of it...
Applying: Add link to extrinsic metadata API from the browse view
Changes applied before test
commit ce0d39853befabe00e3ecdb795f970bf289bb06e
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Sep 6 15:24:51 2021 +0200

    Add link to extrinsic metadata API from the browse view
    
    This partially replaces the existing 'Show metadata' that only works for
    metadata written directly on revision objects.

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

swh/web/templates/includes/show-metadata.html
15–19

You can rename to Intrinsic metadata for consistency.

swh/web/templates/includes/vault-create-tasks.html
40

yes, because the btn-group div is not closed (missing </div>)

fix label and add missing </div>

swh/web/templates/includes/show-metadata.html
15–19

hmm actually it doesn't show intrinsic metadata, I need to rename it entirely

This revision is now accepted and ready to land.Wed, Sep 8, 3:58 PM

Build has FAILED

Patch application report for D6190 (id=22489)

Rebasing onto 95440eca99...

First, rewinding head to replay your work on top of it...
Applying: Add link to extrinsic metadata API from the browse view
Using index info to reconstruct a base tree...
M	swh/web/templates/includes/vault-create-tasks.html
Falling back to patching base and 3-way merge...
Auto-merging swh/web/templates/includes/vault-create-tasks.html
CONFLICT (content): Merge conflict in swh/web/templates/includes/vault-create-tasks.html
Patch failed at 0001 Add link to extrinsic metadata API from the browse view

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".

Rebase failed (ret=1)!

Could not rebase; Attempt merge onto 95440eca99...

Already up to date.
Changes applied before test
commit a93dab45eea4073166a3adea98340ff719e86230
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Sep 6 15:24:51 2021 +0200

    Add link to extrinsic metadata API from the browse view
    
    This partially replaces the existing 'Show metadata' that only works for
    metadata written directly on revision objects.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1094/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1094/console

Build is green

Patch application report for D6190 (id=22490)

Rebasing onto 95440eca99...

Current branch diff-target is up to date.
Changes applied before test
commit ec19895012abf02a212cd140f184df8835f457a5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Sep 6 15:24:51 2021 +0200

    Add link to extrinsic metadata API from the browse view
    
    This partially replaces the existing 'Show metadata' that only works for
    metadata written directly on revision objects.

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