From 23e1f57ea420274db337d38c244a40eab909c8ce Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 20 Oct 2022 11:35:30 +0100 Subject: [PATCH] Add a link to remove an author Refs #388 --- assets/style.css | 13 +++++++++++++ integration/posting-a-prereview.spec.ts | 4 ++-- ...s-to-the-PREreview-2-Desktop-Chrome-linux.png | 4 ++-- ...iew-2-Desktop-Chrome-no-JavaScript--linux.png | 4 ++-- ...-to-the-PREreview-2-Desktop-Firefox-linux.png | 4 ++-- ...ew-2-Desktop-Firefox-no-JavaScript--linux.png | 4 ++-- ...uthors-to-the-PREreview-2-iPhone-11-linux.png | 4 ++-- ...REreview-2-iPhone-11-no-JavaScript--linux.png | 4 ++-- ...s-to-the-PREreview-3-Desktop-Chrome-linux.png | 4 ++-- ...iew-3-Desktop-Chrome-no-JavaScript--linux.png | 4 ++-- ...-to-the-PREreview-3-Desktop-Firefox-linux.png | 4 ++-- ...ew-3-Desktop-Firefox-no-JavaScript--linux.png | 4 ++-- ...uthors-to-the-PREreview-3-iPhone-11-linux.png | 4 ++-- ...REreview-3-iPhone-11-no-JavaScript--linux.png | 4 ++-- ...add-another-author-1-Desktop-Chrome-linux.png | 4 ++-- ...hor-1-Desktop-Chrome-no-JavaScript--linux.png | 4 ++-- ...dd-another-author-1-Desktop-Firefox-linux.png | 4 ++-- ...or-1-Desktop-Firefox-no-JavaScript--linux.png | 4 ++-- ...d-to-add-another-author-1-iPhone-11-linux.png | 4 ++-- ...r-author-1-iPhone-11-no-JavaScript--linux.png | 4 ++-- ...add-another-author-2-Desktop-Chrome-linux.png | 4 ++-- ...hor-2-Desktop-Chrome-no-JavaScript--linux.png | 4 ++-- ...dd-another-author-2-Desktop-Firefox-linux.png | 4 ++-- ...or-2-Desktop-Firefox-no-JavaScript--linux.png | 4 ++-- ...d-to-add-another-author-2-iPhone-11-linux.png | 4 ++-- ...r-author-2-iPhone-11-no-JavaScript--linux.png | 4 ++-- src/write-review/write-review-add-authors.ts | 16 +++++++++++++++- 27 files changed, 78 insertions(+), 51 deletions(-) diff --git a/assets/style.css b/assets/style.css index d66b7c6d1..5fdb356cf 100644 --- a/assets/style.css +++ b/assets/style.css @@ -828,8 +828,21 @@ html-editor { padding-inline-start: 0; & > * { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + align-items: baseline; + column-gap: var(--space-s-m); border-block-end: var(--width-divider-narrow) solid var(--color-divider); padding-block: var(--space-3xs-2xs); + + & > :not(a) { + flex-grow: 1; + } + + @media (min-width: 40em) { + flex-wrap: nowrap; + } } & + * { diff --git a/integration/posting-a-prereview.spec.ts b/integration/posting-a-prereview.spec.ts index 332664c3f..15fd7e22b 100644 --- a/integration/posting-a-prereview.spec.ts +++ b/integration/posting-a-prereview.spec.ts @@ -459,7 +459,7 @@ test.extend(canAddAuthors)('can add other authors to the PREreview', async ({ fe await expect(page.locator('h1')).toHaveText('You have added 3 other authors') await expect(page).toHaveScreenshot() - await page.goto('/preprints/doi-10.1101-2022.01.13.476201/write-a-prereview/remove-author/1') + await page.click('role=link[name="Remove Otto Lidenbrock"]') await expect(page.locator('h1')).toHaveText('Are you sure you want to remove Otto Lidenbrock?') await expect(page).toHaveScreenshot() @@ -1411,7 +1411,7 @@ test.extend(canAddAuthors)( await page.click('text="Save and continue"') await page.fill('role=textbox[name="Name"]', 'Jean-Baptiste Botul') await page.click('text="Save and continue"') - await page.goto('/preprints/doi-10.1101-2022.01.13.476201/write-a-prereview/remove-author/0') + await page.click('role=link[name="Remove Jean-Baptiste Botul"]') await page.click('text="Save and continue"') diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Chrome-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Chrome-linux.png index 825e04bc9..0c50c9f25 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Chrome-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Chrome-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d1d02321d8ec59cab5a28172c8c8bc3e217b342a42f1ab72793cff20b7a6a94 -size 29987 +oid sha256:23b5e49d6edb01fb12d9e075f7f00f6c918b65dd5f3bb1b31b126e292f19515f +size 31358 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Chrome-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Chrome-no-JavaScript--linux.png index 825e04bc9..0c50c9f25 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Chrome-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Chrome-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d1d02321d8ec59cab5a28172c8c8bc3e217b342a42f1ab72793cff20b7a6a94 -size 29987 +oid sha256:23b5e49d6edb01fb12d9e075f7f00f6c918b65dd5f3bb1b31b126e292f19515f +size 31358 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Firefox-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Firefox-linux.png index f63dbd75c..1352188b7 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Firefox-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Firefox-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9554b7e5dab727b3aaee37d531b0390f63f67139c534fd9acbc4ad2ebd9bf11d -size 53489 +oid sha256:7f7fb63c4324e533636bdb1265bef40e784d19e22c548ea903589a9933e83a9f +size 55276 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Firefox-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Firefox-no-JavaScript--linux.png index f63dbd75c..1352188b7 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Firefox-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-Desktop-Firefox-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9554b7e5dab727b3aaee37d531b0390f63f67139c534fd9acbc4ad2ebd9bf11d -size 53489 +oid sha256:7f7fb63c4324e533636bdb1265bef40e784d19e22c548ea903589a9933e83a9f +size 55276 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-iPhone-11-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-iPhone-11-linux.png index 74df062de..836c3bbfd 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-iPhone-11-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-iPhone-11-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4beb3446d251e8b149ec872e1ebfc67d8a935ee5428551b7312303d25652046 -size 24125 +oid sha256:7f7dc0a44fd9f0a4c534ffb15b178d1e3a35f80537152f74f866ab45b1d25b9d +size 25328 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-iPhone-11-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-iPhone-11-no-JavaScript--linux.png index 74df062de..836c3bbfd 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-iPhone-11-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-2-iPhone-11-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4beb3446d251e8b149ec872e1ebfc67d8a935ee5428551b7312303d25652046 -size 24125 +oid sha256:7f7dc0a44fd9f0a4c534ffb15b178d1e3a35f80537152f74f866ab45b1d25b9d +size 25328 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Chrome-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Chrome-linux.png index 1f40b04ed..81361cf04 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Chrome-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Chrome-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ac94208040a65de8326b1fb358427fba9cc11110b8fc825092d760c89f071cb -size 36690 +oid sha256:2eee3d38bc82c0615e9173ff7f2f2576dc2b00c34a8ceb409ee632e762836b6d +size 40883 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Chrome-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Chrome-no-JavaScript--linux.png index 1f40b04ed..81361cf04 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Chrome-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Chrome-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ac94208040a65de8326b1fb358427fba9cc11110b8fc825092d760c89f071cb -size 36690 +oid sha256:2eee3d38bc82c0615e9173ff7f2f2576dc2b00c34a8ceb409ee632e762836b6d +size 40883 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Firefox-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Firefox-linux.png index f6bf2d2d9..18b6d252a 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Firefox-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Firefox-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be1c68c90c6f33cf6984a57cc7ca4b42065b9f3cb76a4fe7ee77c22476fa0ffe -size 61582 +oid sha256:75b99ddf88b46049d1447fea2fd3b12e98b9031455f4a52c7e4f8c8d36f4e95b +size 66851 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Firefox-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Firefox-no-JavaScript--linux.png index f6bf2d2d9..18b6d252a 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Firefox-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-Desktop-Firefox-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be1c68c90c6f33cf6984a57cc7ca4b42065b9f3cb76a4fe7ee77c22476fa0ffe -size 61582 +oid sha256:75b99ddf88b46049d1447fea2fd3b12e98b9031455f4a52c7e4f8c8d36f4e95b +size 66851 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-iPhone-11-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-iPhone-11-linux.png index f16bf026a..f245d331d 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-iPhone-11-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-iPhone-11-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a2b024631764f4b9491a66d17e8b7033bccf9bc77e471b46d7bc3532a4d7a2c -size 29565 +oid sha256:d644fa0dc5d6434a85a3fdafb5f2c49f1cd7c5a108e1981ca03ab78e16de641b +size 32721 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-iPhone-11-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-iPhone-11-no-JavaScript--linux.png index f16bf026a..f245d331d 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-iPhone-11-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/can-add-other-authors-to-the-PREreview-3-iPhone-11-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a2b024631764f4b9491a66d17e8b7033bccf9bc77e471b46d7bc3532a4d7a2c -size 29565 +oid sha256:d644fa0dc5d6434a85a3fdafb5f2c49f1cd7c5a108e1981ca03ab78e16de641b +size 32721 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Chrome-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Chrome-linux.png index f6ab810b1..f076c2c06 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Chrome-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Chrome-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f79153ab17304ffb279d3873e1fc24dffa0f753895a98199099eacded2ac425b -size 37945 +oid sha256:3301f43ff9c4474d8c53d89422b979879793faebcd1bbdd56952fad8efe6d6ea +size 39434 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Chrome-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Chrome-no-JavaScript--linux.png index 692c5e8a2..1afc49543 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Chrome-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Chrome-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:428f37e4bee7fd8d852b07bc2ca6e8bf59be47e08f091a18445ec64f3f65c837 -size 37883 +oid sha256:3da3cabc2bb1b78743e01ee47808bdbd9760f86f029ebbd3ff464443ada09d80 +size 39358 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Firefox-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Firefox-linux.png index c16b0e433..2a54ff120 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Firefox-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Firefox-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aae454d21e44b9029208d06510b61d03c5ee9e0b3577eead778224966461ad8f -size 68414 +oid sha256:b86dcacc7c0b2ed8b746433ee10b9264ec6d9cacd43e7816bd25344e90f82f26 +size 70165 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Firefox-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Firefox-no-JavaScript--linux.png index 594982871..99ddf8cf9 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Firefox-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-Desktop-Firefox-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:389c53106d09ee2eec3f1419e4a84f48d3cccdac75788905ee71333a345f0b71 -size 68591 +oid sha256:cbc48bdc59b873f06ff29e3e33b5079c9e04a7f88ae7dfcab2101f84ba783c1d +size 70344 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-iPhone-11-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-iPhone-11-linux.png index d6a55f578..a0d5046f1 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-iPhone-11-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-iPhone-11-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3fb9dd33eee2cc7a88e9670514a273558e097fdb0b2d8630bfe7263ec0abaf5e -size 33705 +oid sha256:342a2edf66a1acbf4d4e34ee4f976e7bfda35bb51d6e12de48bb2d63a51ad2b8 +size 34821 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-iPhone-11-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-iPhone-11-no-JavaScript--linux.png index 3b9299766..47b5ce5ab 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-iPhone-11-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-1-iPhone-11-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5243600a42febb5027c66c255d2adf3eee175135a4171d7bbd4e8bf9b180359c -size 33594 +oid sha256:473ecc10f773e20bad63705699df94cf10abb9feebb61e7cfb34d2ad8a456218 +size 34692 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Chrome-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Chrome-linux.png index 23531a7de..d7f736f5c 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Chrome-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Chrome-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95a2820f98ce59f0be7ea1e512f94871a4bb371bdf0960fdf8f19242e55d9c42 -size 37763 +oid sha256:511b436fb08bf52d2af4bae5c6c0f00db18488df97c6cd6d010fa8f9e1c1a87e +size 39211 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Chrome-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Chrome-no-JavaScript--linux.png index 23531a7de..d7f736f5c 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Chrome-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Chrome-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95a2820f98ce59f0be7ea1e512f94871a4bb371bdf0960fdf8f19242e55d9c42 -size 37763 +oid sha256:511b436fb08bf52d2af4bae5c6c0f00db18488df97c6cd6d010fa8f9e1c1a87e +size 39211 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Firefox-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Firefox-linux.png index 4a3be5eea..10fbdc0b8 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Firefox-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Firefox-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc8bfadf846c5ace555b130e91b23a22027f397077afcdb8671dd465f8d41662 -size 68879 +oid sha256:a2260604c1ef71ae1f88f4a08a68ff01f92484cb040759af514a59a560b6873e +size 70717 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Firefox-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Firefox-no-JavaScript--linux.png index 4a3be5eea..10fbdc0b8 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Firefox-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-Desktop-Firefox-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc8bfadf846c5ace555b130e91b23a22027f397077afcdb8671dd465f8d41662 -size 68879 +oid sha256:a2260604c1ef71ae1f88f4a08a68ff01f92484cb040759af514a59a560b6873e +size 70717 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-iPhone-11-linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-iPhone-11-linux.png index 03eaf8b68..0703dc173 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-iPhone-11-linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-iPhone-11-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37893431d915c4cf6698240fe5195642dcea0d7c580c31a0e494c67fa8cbc6b5 -size 32441 +oid sha256:3d3a66ce5dd40fcda0d4c5cba60c47af8bfa458045b69c9588f8d88ca766ac12 +size 33550 diff --git a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-iPhone-11-no-JavaScript--linux.png b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-iPhone-11-no-JavaScript--linux.png index 03eaf8b68..0703dc173 100644 --- a/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-iPhone-11-no-JavaScript--linux.png +++ b/integration/snapshots/posting-a-prereview.spec.ts-snapshots/have-to-say-if-you-need-to-add-another-author-2-iPhone-11-no-JavaScript--linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37893431d915c4cf6698240fe5195642dcea0d7c580c31a0e494c67fa8cbc6b5 -size 32441 +oid sha256:3d3a66ce5dd40fcda0d4c5cba60c47af8bfa458045b69c9588f8d88ca766ac12 +size 33550 diff --git a/src/write-review/write-review-add-authors.ts b/src/write-review/write-review-add-authors.ts index d81a3c9c7..5eee99caf 100644 --- a/src/write-review/write-review-add-authors.ts +++ b/src/write-review/write-review-add-authors.ts @@ -17,6 +17,7 @@ import { writeReviewAddAuthorsMatch, writeReviewAuthorsMatch, writeReviewMatch, + writeReviewRemoveAuthorMatch, } from '../routes' import { NonEmptyString } from '../string' import { User, getUserFromSession } from '../user' @@ -152,7 +153,20 @@ function addAuthorsForm(preprint: Preprint, authors: ReadonlyArray<{ name: NonEm

You have added ${authors.length} other author${authors.length !== 1 ? 's' : ''}

    - ${authors.map(({ name }) => html`
  1. ${name}
  2. `)} + ${authors.map( + ({ name }, index) => html` +
  3. + ${name} + Remove ${name} +
  4. + `, + )}