Page MenuHomeSoftware Heritage

save-code-now: Extract the checkbox filtering into a js template
ClosedPublic

Authored by ardumont on Mar 25 2022, 10:37 AM.

Details

Summary

This will allow to reuse that filtering functionality inside the add-forge-now form as well.
Incoming diff about this.

Related to T4011

Test Plan

tests ok
manual check in docker

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

assets/src/bundles/common/index.js
6 ↗(On Diff #26882)

That empty file is needed to make the js tool happy.

Build is green

Patch application report for D7427 (id=26882)

Could not rebase; Attempt merge onto d5e3f98417...

Updating d5e3f984..d55a55d1
Fast-forward
 assets/src/bundles/common/index.js                    |  6 ++++++
 .../src/bundles/common/requests-filter-checkbox.ejs   | 17 +++++++++++++++++
 assets/src/bundles/save/index.js                      | 19 ++++++++-----------
 swh/web/templates/add_forge_now/create-request.html   |  8 +++++++-
 4 files changed, 38 insertions(+), 12 deletions(-)
 create mode 100644 assets/src/bundles/common/index.js
 create mode 100644 assets/src/bundles/common/requests-filter-checkbox.ejs
Changes applied before test
commit d55a55d15026eff54371f86cea90afececb5016c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Mar 25 10:34:10 2022 +0100

    save-code-now: Extract the checkbox filtering into a js template
    
    This will allow to reuse that part inside the add-forge-now form as well.
    
    Related to T4011

commit 349c7e5f4e30f4f4b216c7f1f028fd01a1c4d01b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Mar 24 17:21:21 2022 +0100

    add-forge-now: Fix login link depending on the oidc context
    
    This makes sure we use the right keycloak login link when deployed on staging and
    production webapps. This does not change anything for docker and dev makefile targets.
    
    Related to T4075

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

anlambert added a subscriber: anlambert.

You should put the template in the utils folder instead, no need to create a new bundle for that.

assets/src/bundles/save/index.js
11

You can remove the ../, import paths are already known by webpack .

This revision now requires changes to proceed.Mar 25 2022, 11:10 AM

Adapt according to review (move template into existing common "utils" folder)

assets/src/bundles/save/index.js
11

cool, thx and ack on the utils stuff.

Build is green

Patch application report for D7427 (id=26888)

Rebasing onto 349c7e5f4e...

Current branch diff-target is up to date.
Changes applied before test
commit 3fd564be6f01e42cda397e0b5745395c17240b42
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Mar 25 10:34:10 2022 +0100

    save-code-now: Extract the checkbox filtering into a js template
    
    This will allow to reuse that part inside the add-forge-now form as well.
    
    Related to T4011

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

assets/src/bundles/common/index.js
6 ↗(On Diff #26882)

You can remove it now.

assets/src/bundles/common/index.js
6 ↗(On Diff #26882)

d'oh! i forgot...

Build is green

Patch application report for D7427 (id=26892)

Rebasing onto 8d5f258e31...

Current branch diff-target is up to date.
Changes applied before test
commit 1ffff63f70226bd41eb59803b8d47a5d7dcbeb06
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Mar 25 10:34:10 2022 +0100

    save-code-now: Extract the checkbox filtering into a js template
    
    This will allow to reuse that part inside the add-forge-now form as well.
    
    Related to T4011

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

This revision is now accepted and ready to land.Mar 25 2022, 12:28 PM