From 4eb3f33ca65eeea1fe771eac1793751826178c91 Mon Sep 17 00:00:00 2001 From: Benedict Homuth <56362368+BenedictHomuth@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:09:05 +0200 Subject: [PATCH 001/321] test: added boardDescription to go tests and fixture file (#4352) Co-authored-by: Benedict Homuth --- server/src/database/boards_test.go | 39 ++++++++++++++++++++++++ server/src/database/testdata/fixture.yml | 1 + 2 files changed, 40 insertions(+) diff --git a/server/src/database/boards_test.go b/server/src/database/boards_test.go index c6932de0b8..9f986b52f2 100644 --- a/server/src/database/boards_test.go +++ b/server/src/database/boards_test.go @@ -17,6 +17,7 @@ func TestRunnerForBoards(t *testing.T) { t.Run("Create=5", testCreateByPassphraseBoard) t.Run("Create=6", testCreateByInviteBoard) t.Run("Create=7", testCreateBoardWithName) + t.Run("Create=8", testCreateBoardWithDescription) t.Run("Update=0", testChangePublicBoardToPassphraseBoard) t.Run("Update=1", testChangeToPassphraseBoardWithMissingPassphraseShouldFail) @@ -29,6 +30,7 @@ func TestRunnerForBoards(t *testing.T) { t.Run("Update=8", testChangeInviteBoardToPublicBoardShouldFail) t.Run("Update=9", testUpdateBoardName) t.Run("Update=10", testUpdateBoardSettings) + t.Run("Update=11", testUpdateBoardDescription) t.Run("Get=0", testGetBoard) t.Run("Get=1", testGetUserBoards) @@ -182,6 +184,22 @@ func testCreateBoardWithName(t *testing.T) { assert.Equal(t, name, *board.Name) } +func testCreateBoardWithDescription(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + description := "A board description" + board, err := testDb.CreateBoard(user.ID, BoardInsert{ + Name: nil, + AccessPolicy: types.AccessPolicyPublic, + Passphrase: nil, + Salt: nil, + Description: &description, + }, []ColumnInsert{}) + + assert.Nil(t, err) + assert.Equal(t, description, *board.Description) +} + func testChangePublicBoardToPassphraseBoard(t *testing.T) { user := fixture.MustRow("User.jack").(*User) @@ -451,6 +469,26 @@ func testUpdateBoardSettings(t *testing.T) { assert.Equal(t, isLocked, updatedBoard.IsLocked) } +func testUpdateBoardDescription(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + board, err := testDb.CreateBoard(user.ID, BoardInsert{ + Name: nil, + AccessPolicy: types.AccessPolicyByInvite, + Passphrase: nil, + Salt: nil, + }, []ColumnInsert{}) + + assert.Nil(t, err) + + description := "New description" + + updatedBoard, err := testDb.UpdateBoard(BoardUpdate{ID: board.ID, Description: &description}) + + assert.Nil(t, err) + assert.Equal(t, description, *updatedBoard.Description) +} + func testGetBoard(t *testing.T) { board := fixture.MustRow("Board.boardTestBoard").(*Board) @@ -459,6 +497,7 @@ func testGetBoard(t *testing.T) { assert.Equal(t, board.ID, gotBoard.ID) assert.Equal(t, board.Name, gotBoard.Name) + assert.Equal(t, board.Description, gotBoard.Description) assert.Equal(t, board.ShowAuthors, gotBoard.ShowAuthors) assert.Equal(t, board.ShowNotesOfOtherUsers, gotBoard.ShowNotesOfOtherUsers) assert.Equal(t, board.AccessPolicy, gotBoard.AccessPolicy) diff --git a/server/src/database/testdata/fixture.yml b/server/src/database/testdata/fixture.yml index beaa0defa3..e61f7e86ab 100644 --- a/server/src/database/testdata/fixture.yml +++ b/server/src/database/testdata/fixture.yml @@ -57,6 +57,7 @@ - _id: boardTestBoard id: "5113b096-986c-4e23-adf7-c3fa19224bd4" name: Board test + description: Description test access_policy: PUBLIC show_authors: true show_notes_of_other_users: true From 6a9eaee5f5c1d4e9baf387be041246b0d2ad6964 Mon Sep 17 00:00:00 2001 From: Mateo Ivankovic Date: Wed, 24 Jul 2024 13:10:30 +0200 Subject: [PATCH 002/321] fix: check for error when updating user (#4336) --- server/src/services/users/users.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/services/users/users.go b/server/src/services/users/users.go index 29262c4b5f..220c313f0b 100644 --- a/server/src/services/users/users.go +++ b/server/src/services/users/users.go @@ -78,8 +78,11 @@ func (s *UserService) Update(_ context.Context, body dto.UserUpdateRequest) (*dt Name: body.Name, Avatar: body.Avatar, }) - s.UpdatedUser(user) + if err != nil { + return nil, err + } + s.UpdatedUser(user) return new(dto.User).From(user), err } From f70f84b6e371c313457686029c458b724ffdb5ce Mon Sep 17 00:00:00 2001 From: Benedict Homuth <56362368+BenedictHomuth@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:16:18 +0200 Subject: [PATCH 003/321] chore: removed old observer fixture data (#4354) Co-authored-by: Benedict Homuth --- server/src/database/testdata/fixture.yml | 57 ------------------------ 1 file changed, 57 deletions(-) diff --git a/server/src/database/testdata/fixture.yml b/server/src/database/testdata/fixture.yml index e61f7e86ab..cba31165c3 100644 --- a/server/src/database/testdata/fixture.yml +++ b/server/src/database/testdata/fixture.yml @@ -104,48 +104,6 @@ show_authors: true show_notes_of_other_users: true created_at: '{{ now }}' - - _id: columnsObserverTestBoard - id: "2813b096-986c-0000-0000-c3fa19224bd4" - name: Columns observer test - access_policy: PUBLIC - show_authors: true - show_notes_of_other_users: true - created_at: '{{ now }}' - - _id: boardsObserverTestBoard - id: "2813b096-986c-0000-0001-c3fa19224bd4" - name: Boards observer test - access_policy: PUBLIC - show_authors: true - show_notes_of_other_users: true - created_at: '{{ now }}' - - _id: boardSessionsObserverTestBoard - id: "2813b096-986c-0000-0002-c3fa19224bd4" - name: Board sessions observer test - access_policy: PUBLIC - show_authors: true - show_notes_of_other_users: true - created_at: '{{ now }}' - - _id: boardSessionRequestsObserverTestBoard - id: "2813b096-986c-0000-0003-c3fa19224bd4" - name: Board sessions observer test - access_policy: PUBLIC - show_authors: true - show_notes_of_other_users: true - created_at: '{{ now }}' - - _id: notesObserverTestBoard - id: "2813b096-986c-0000-0004-c3fa19224bd4" - name: Notes sessions observer test - access_policy: PUBLIC - show_authors: true - show_notes_of_other_users: true - created_at: '{{ now }}' - - _id: votingObserverTestBoard - id: "2813b096-986c-0000-0005-c3fa19224bd4" - name: Voting observer test - access_policy: PUBLIC - show_authors: true - show_notes_of_other_users: true - created_at: '{{ now }}' - _id: votingSortingTestBoard id: "1acd6899-ad71-4479-8ffe-6c6401b208d7" name: Voting Sorting test @@ -203,14 +161,6 @@ board: '{{ $.Board.notesTestBoard.ID }}' user: '{{ $.User.jack.ID }}' role: OWNER - - _id: jacksSessionOnNotesObserverTestBoard - board: '{{ $.Board.notesObserverTestBoard.ID }}' - user: '{{ $.User.jack.ID }}' - role: OWNER - - _id: jaysSessionOnBoardSessionsObserverTestBoard - board: '{{ $.Board.boardSessionsObserverTestBoard.ID }}' - user: '{{ $.User.jay.ID }}' - role: OWNER - _id: justinSessionOnVotingSortingTestBoard board: '{{ $.Board.votingSortingTestBoard.ID }}' user: '{{ $.User.justin.ID }}' @@ -299,13 +249,6 @@ color: backlog-blue visible: true index: 0 - - _id: notesObserverTestColumn - id: "3113b196-986c-2951-adf7-c3fa19224bd4" - board: '{{ $.Board.notesObserverTestBoard.ID }}' - name: B - color: backlog-blue - visible: true - index: 0 - _id: votingSortingColumn id: "00c8c51b-d391-4472-8136-06efdfe7bbd2" board: '{{ $.Board.votingSortingTestBoard.ID }}' From 3b6864c25c8c0ac50e9a99ef22cdbe7055a73760 Mon Sep 17 00:00:00 2001 From: Manuel Brandstetter <36969812+brandstetterm@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:21:55 +0200 Subject: [PATCH 004/321] Bump version to 3.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ad0f09813..f5be1d7c9f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "url": "https://github.com/inovex/scrumlr.io/issues", "email": "info@scrumlr.io" }, - "version": "3.7.1", + "version": "3.8.0", "private": true, "license": "MIT", "dependencies": { From 6a867073f315374a21623561cad8f2e062025adc Mon Sep 17 00:00:00 2001 From: Lennart Krauch Date: Wed, 24 Jul 2024 20:35:54 +0200 Subject: [PATCH 005/321] hotfix: increase yarn timeouts (#4358) Signed-off-by: Lennart Krauch --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 238689b45b..c77b92834a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ -FROM node:lts-hydrogen as build-stage +FROM node:hydrogen-alpine as build-stage WORKDIR /usr/src/app COPY package.json yarn.lock ./ -RUN yarn install + +RUN yarn install --network-timeout 240000 COPY src/ src/ COPY public/ public/ From e4694f446a4f25d8c60a14d52312f9e79ec66465 Mon Sep 17 00:00:00 2001 From: Lennart Krauch Date: Wed, 24 Jul 2024 20:37:29 +0200 Subject: [PATCH 006/321] Bump version to 3.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f5be1d7c9f..4d89df603c 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "url": "https://github.com/inovex/scrumlr.io/issues", "email": "info@scrumlr.io" }, - "version": "3.8.0", + "version": "3.8.1", "private": true, "license": "MIT", "dependencies": { From 83b4d2affa6d2f3416728ee6be417ec08acd054d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:50:07 +0200 Subject: [PATCH 007/321] yarn(deps): bump underscore from 1.13.6 to 1.13.7 (#4360) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4d89df603c..b754808f70 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "react-toastify": "^10.0.5", "react-tooltip": "^5.27.1", "sockette": "^2.0.6", - "underscore": "^1.13.6", + "underscore": "^1.13.7", "use-long-press": "^3.2.0", "use-sound": "^4.0.3" }, diff --git a/yarn.lock b/yarn.lock index 066fe5a4bf..fa9366b0a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11474,10 +11474,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -underscore@1.x.x, underscore@^1.13.6, underscore@^1.8.3: - version "1.13.6" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" - integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== +underscore@1.x.x, underscore@^1.13.7, underscore@^1.8.3: + version "1.13.7" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" + integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== undici-types@~5.26.4: version "5.26.5" From d21a986ce0580535c1874a5bd6095ba51da003a4 Mon Sep 17 00:00:00 2001 From: Lennart Krauch Date: Thu, 25 Jul 2024 19:23:21 +0200 Subject: [PATCH 008/321] hotfix: incorrect Go target arch (#4363) Signed-off-by: Tim Beermann Signed-off-by: Lennart Krauch Co-authored-by: Tim Beermann --- package.json | 2 +- server/src/Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b754808f70..1c4ca18cd8 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "url": "https://github.com/inovex/scrumlr.io/issues", "email": "info@scrumlr.io" }, - "version": "3.8.1", + "version": "3.8.2", "private": true, "license": "MIT", "dependencies": { diff --git a/server/src/Dockerfile b/server/src/Dockerfile index 981731f8fa..345ed2ded5 100644 --- a/server/src/Dockerfile +++ b/server/src/Dockerfile @@ -1,8 +1,12 @@ # Build application FROM golang:1.22 + +ARG TARGETARCH +ARG TARGETOS + WORKDIR /go/src/github.com/inovex/scrumlr.io/ COPY ./ . -RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -o main +RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -a -o main # Start application FROM alpine:3.20 From 3193e1656329603ee7a65ff436d75a05dc5c2286 Mon Sep 17 00:00:00 2001 From: Benedict Homuth <56362368+BenedictHomuth@users.noreply.github.com> Date: Fri, 26 Jul 2024 08:31:35 +0200 Subject: [PATCH 009/321] refactor: split board template and column template (#4338) Co-authored-by: Benedict Homuth --- server/api.postman_collection.json | 397 ++++++++++++++---- server/src/api/board_templates.go | 11 - server/src/api/column_templates.go | 98 +++++ server/src/api/context.go | 16 +- server/src/api/router.go | 21 +- server/src/common/dto/board_templates.go | 44 +- server/src/common/dto/column_templates.go | 31 +- server/src/database/board_templates.go | 142 ++----- server/src/database/column_templates.go | 103 ++++- server/src/identifiers/identifiers.go | 18 +- .../board_templates/board_templates.go | 112 ++--- .../board_templates/column_templates.go | 49 ++- server/src/services/services.go | 8 +- 13 files changed, 726 insertions(+), 324 deletions(-) create mode 100644 server/src/api/column_templates.go diff --git a/server/api.postman_collection.json b/server/api.postman_collection.json index ff6b9f5b90..54570caffe 100644 --- a/server/api.postman_collection.json +++ b/server/api.postman_collection.json @@ -1,8 +1,8 @@ { "info": { - "_postman_id": "42d60e2e-95bb-4336-8893-afed92d835c3", + "_postman_id": "80a95c37-7852-4687-af86-b1d585417c2e", "name": "scrumlr.io", - "description": "This is the documentation for the REST API server of the application [scrumlr.io](https://scrumlr.io). You get in touch with us and send an email to [info@scrumlr.io](https://info@scrumlr.io). The software is [MIT licensed](https://opensource.org/licenses/MIT) so do whatever you want with it. If you want to checkout the progress of our development and take a peek into our backlog you can checkout our [GitHub repository](https://github.com/inovex/scrumlr.io). By the way, this already the third iteration of our server and we're still working on the interface and on further improvements. Since the API is mainly intended for our web client we won't start with API versions at the moment so breaking changes may be incoming. Once it got stable we'll maybe start with that.\n\nIf you're using the postman collection in order to explore the different resources you should also checkout the variables of the collection. Anytime you'll create new resources (e.g. your login or a board) variables will be stored and used for subsequent calls on other resources.\n\nAccess to protected resources will be authorized if a bearer token is sent or it is included in the `jwt` Cookie, which will be automatically set upon login.\n\n## Getting started\n\nLet's try to explain the basic flow of how a new board can will be created and someone tries to join the board as a participant.\n\nFirst you can check whether you are already logged in by a `GET` request on `/user`. See the _User_ section for more information.\n\n1. A user signs into the application (see _Login_ section)\n2. The user creates a new board (`POST` on `/boards`, checkout _Boards_ section)\n3. Another logged in user tries to join the board (`POST` on `/boards/{id}/participants`, checkout _Participants_ section)\n 1. If the boards access policy is set to `PUBLIC` the participant will be added to the board and afterwards all resources will be available\n 2. If the board requires a passphrase and the access policy is set to `BY_PASSPHRASE` a client error will be reported until the user sends the correct passphrase within the payload of the request\n 3. If the boards access policy is set to `BY_INVITE` a session request will be created instead and the user will be redirected to the new resource. The board owner now needs to accept or reject the request until the user can continue\n\nThese are just the basic steps of how sessions can be created. You can also have a look into the section _Realtime_ to see how you can open websockets and listen to live updates on the data.", + "description": "This is the documentation for the REST API server of the application [scrumlr.io](https://scrumlr.io). You get in touch with us and send an email to [info@scrumlr.io](https://info@scrumlr.io). The software is [MIT licensed](https://opensource.org/licenses/MIT) so do whatever you want with it. If you want to checkout the progress of our development and take a peek into our backlog you can checkout our [GitHub repository](https://github.com/inovex/scrumlr.io). By the way, this already the third iteration of our server and we're still working on the interface and on further improvements. Since the API is mainly intended for our web client we won't start with API versions at the moment so breaking changes may be incoming. Once it got stable we'll maybe start with that.\n\nIf you're using the postman collection in order to explore the different resources you should also checkout the variables of the collection. Anytime you'll create new resources (e.g. your login or a board) variables will be stored and used for subsequent calls on other resources.\n\nAccess to protected resources will be authorized if a bearer token is sent or it is included in the `jwt` Cookie, which will be automatically set upon login.\n\n## Getting started\n\nLet's try to explain the basic flow of how a new board can will be created and someone tries to join the board as a participant.\n\nFirst you can check whether you are already logged in by a `GET` request on `/user`. See the _User_ section for more information.\n\n1. A user signs into the application (see _Login_ section)\n \n2. The user creates a new board (`POST` on `/boards`, checkout _Boards_ section)\n \n3. Another logged in user tries to join the board (`POST` on `/boards/{id}/participants`, checkout _Participants_ section)\n 1. If the boards access policy is set to `PUBLIC` the participant will be added to the board and afterwards all resources will be available\n \n 2. If the board requires a passphrase and the access policy is set to `BY_PASSPHRASE` a client error will be reported until the user sends the correct passphrase within the payload of the request\n \n 3. If the boards access policy is set to `BY_INVITE` a session request will be created instead and the user will be redirected to the new resource. The board owner now needs to accept or reject the request until the user can continue\n \n\nThese are just the basic steps of how sessions can be created. You can also have a look into the section _Realtime_ to see how you can open websockets and listen to live updates on the data.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "32423964" }, @@ -514,12 +514,8 @@ " pm.expect(res.name).to.exist;", "})", "", - "const jsonData = pm.response.json();", "pm.collectionVariables.set(\"board_template_id\", res.id);", - "", - "// set two column ids", - "pm.collectionVariables.set(\"board_template_column_id_one\", res.templateColumns[0].id)", - "pm.collectionVariables.set(\"board_template_column_id_two\", res.templateColumns[1].id)" + "" ], "type": "text/javascript", "packages": {} @@ -531,7 +527,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"My board template\",\n \"description\": \"This is a test description for a board template\",\n \"accessPolicy\": \"PUBLIC\",\n \"favourite\": true,\n \"columns\": [ \n { \n \"name\": \"Lean coffee\", \n \"description\":\"A template column description\", \n \"visible\": true,\n \"color\": \"backlog-blue\"\n },\n { \n \"name\": \"Actions\", \n \"description\":\"A template column description\", \n \"visible\": false, \n \"color\": \"planning-pink\"\n }\n ]\n}", + "raw": "{\n \"name\": \"My board template\",\n \"description\": \"This is a test description for a board template\",\n \"accessPolicy\": \"PUBLIC\",\n \"favourite\": true,\n \"columnTemplates\": [ \n { \n \"name\": \"Lean coffee\", \n \"description\":\"A template column description\", \n \"visible\": true,\n \"color\": \"backlog-blue\"\n },\n { \n \"name\": \"Actions\", \n \"description\":\"A template column description\", \n \"visible\": false, \n \"color\": \"planning-pink\"\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -885,7 +881,7 @@ "response": [] }, { - "name": "Update Favourite status", + "name": "Update Board Template favourite status", "event": [ { "listen": "test", @@ -938,75 +934,6 @@ } }, "response": [] - }, - { - "name": "Update Board Template columns", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const res = pm.response.json();", - "", - "pm.test(\"Successful POST request\", () => {", - " pm.expect(pm.response).to.have.status(200);", - "});", - "", - "pm.test(\"Check id is included\", () => {", - " pm.expect(res.id).to.exist;", - "})", - "", - "pm.test(\"Check name is included\", () => {", - " pm.expect(res.name).to.exist;", - "})", - "", - "pm.test(\"Check if column #1 changed\", () => {", - " const columnOne = res.templateColumns[0];", - " pm.expect(columnOne.description).to.equal(\"Updated Column #1 Template Description\");", - " pm.expect(columnOne.name).to.equal(\"Updated Lean coffee\");", - " pm.expect(columnOne.color).to.equal(\"planning-pink\");", - " pm.expect(columnOne.index).to.equal(1);", - " pm.expect(columnOne.visible).to.equal(false);", - "})", - "", - "pm.test(\"Check if column #2 changed\", () => {", - " const columnTwo = pm.response.json().templateColumns[1];", - " pm.expect(columnTwo.description).to.equal(\"Updated Column #2 Template Description\");", - " pm.expect(columnTwo.name).to.equal(\"Updated Actions\");", - " pm.expect(columnTwo.color).to.equal(\"backlog-blue\");", - " pm.expect(columnTwo.index).to.equal(0);", - " pm.expect(columnTwo.visible).to.equal(true);", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PUT", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Updated: Columns\",\n \"templateColumns\": [\n {\n \"id\": \"{{board_template_column_id_one}}\",\n \"name\": \"Updated Lean coffee\",\n \"description\": \"Updated Column #1 Template Description\",\n \"color\": \"planning-pink\",\n \"visible\": false,\n \"index\": 1\n },\n {\n \"id\": \"{{board_template_column_id_two}}\",\n \"name\": \"Updated Actions\",\n \"description\": \"Updated Column #2 Template Description\",\n \"color\": \"backlog-blue\",\n \"visible\": true,\n \"index\": 0\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/templates/{{board_template_id}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "templates", - "{{board_template_id}}" - ] - } - }, - "response": [] } ] }, @@ -1061,12 +988,25 @@ "exec": [ "const res = pm.response.json();", "", - "pm.test(\"Successful POST request\", () => {", + "pm.test(\"Successful GET request\", () => {", " pm.expect(pm.response).to.have.status(200);", "});", "", "pm.test(\"Check that an array of board templates are returned\", () => {", " pm.expect(res).to.be.an('array');", + "})", + "", + "", + "pm.test(\"Check that first entry of array includes column templates\", () => {", + " pm.expect(res[0].ColumnTemplates).to.exist;", + "})", + "", + "pm.test(\"Check that column template is not null\", () => {", + " pm.expect(res[0].ColumnTemplates).to.not.be.null;", + "})", + "", + "pm.test(\"Check that column template is an array\", () => {", + " pm.expect(res[0].ColumnTemplates).to.be.an('array');", "})" ], "type": "text/javascript", @@ -1124,6 +1064,295 @@ } ] }, + { + "name": "ColumnTemplates", + "item": [ + { + "name": "Create column template", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const res = pm.response.json();", + "", + "pm.test(\"Successful POST request\", () => {", + " pm.expect(pm.response).to.have.status(201);", + "});", + "", + "pm.test(\"Check id is included\", () => {", + " pm.expect(res.id).to.exist;", + "})", + "", + "pm.test(\"Check name is included\", () => {", + " pm.expect(res.name).to.exist;", + "})", + "", + "pm.collectionVariables.set(\"column_template_id\", res.id);" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "let body = ", + " {", + " \"name\": \"My new board template\",", + " \"description\": \"This is a new test description for a board template\",", + " \"accessPolicy\": \"PUBLIC\",", + " \"favourite\": true,", + " \"columnTemplates\": [ ", + " { ", + " \"name\": \"Lean coffee\", ", + " \"description\":\"A template column description\", ", + " \"visible\": true,", + " \"color\": \"backlog-blue\"", + " },", + " { ", + " \"name\": \"Actions\", ", + " \"description\":\"A template column description\", ", + " \"visible\": false, ", + " \"color\": \"planning-pink\"", + " }", + " ]", + " };", + "", + "body = JSON.stringify(body)", + "", + "pm.sendRequest({", + " url: pm.variables.get(\"base_url\") + \"/templates\",", + " method: 'POST',", + " header: {", + " \"Content-Type\": \"application/json; charset=utf-8\",", + " \"Authorization\": pm.collectionVariables.get(\"jwt\"),", + " },", + " body: body", + " ", + "}, function (err, response) {", + " const res = response.json();", + "", + " pm.test(\"PreRequestScript – Successful POST request (createBoardTemplate)\", () => {", + " pm.expect(response.code).to.be.equal(201);", + " });", + " ", + " pm.test(\"PreRequestScript – Check id\", () => {", + " pm.expect(res.id).to.exist;", + " })", + "", + " pm.collectionVariables.set(\"board_template_id\", res.id);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"A created column\",\n \"description\": \"A created column description\",\n \"color\": \"backlog-blue\",\n \"visible\": false\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/templates/{{board_template_id}}/columns", + "host": [ + "{{base_url}}" + ], + "path": [ + "templates", + "{{board_template_id}}", + "columns" + ] + } + }, + "response": [] + }, + { + "name": "Get column templates", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const res = pm.response.json();", + "", + "pm.test(\"Successful GET request\", () => {", + " pm.expect(pm.response).to.have.status(200);", + "});", + "", + "pm.test(\"Check that an array of board templates are returned\", () => {", + " pm.expect(res).to.be.an('array');", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/templates/{{board_template_id}}/columns", + "host": [ + "{{base_url}}" + ], + "path": [ + "templates", + "{{board_template_id}}", + "columns" + ] + } + }, + "response": [] + }, + { + "name": "Get column template", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const res = pm.response.json();", + "", + "pm.test(\"Successful GET request\", () => {", + " pm.expect(pm.response).to.have.status(200);", + "});", + "", + "pm.test(\"Check id is included\", () => {", + " pm.expect(res.id).to.exist;", + "})", + "", + "pm.test(\"Check name is included\", () => {", + " pm.expect(res.name).to.exist;", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{base_url}}/templates/{{board_template_id}}/columns/{{column_template_id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "templates", + "{{board_template_id}}", + "columns", + "{{column_template_id}}" + ] + } + }, + "response": [] + }, + { + "name": "Update column template", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const res = pm.response.json();", + "", + "pm.test(\"Successful PUT request\", () => {", + " pm.expect(pm.response).to.have.status(200);", + "});", + "", + "pm.test(\"Check id is included\", () => {", + " pm.expect(res.id).to.exist;", + "})", + "", + "pm.test(\"Check if column changed\", () => {", + " pm.expect(res.name).to.equal(\"Updated Column Template Name\");", + " pm.expect(res.description).to.equal(\"Updated Column Template Description\");", + " pm.expect(res.color).to.equal(\"goal-green\");", + " pm.expect(res.visible).to.equal(false);", + " pm.expect(res.index).to.equal(0);", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Updated Column Template Name\",\n \"description\": \"Updated Column Template Description\",\n \"color\": \"goal-green\",\n \"visible\": false,\n \"index\": 0\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/templates/{{board_template_id}}/columns/{{column_template_id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "templates", + "{{board_template_id}}", + "columns", + "{{column_template_id}}" + ] + } + }, + "response": [] + }, + { + "name": "Delete column template", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Successful DELETE request\", () => {", + " pm.expect(pm.response).to.have.status(204);", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{base_url}}/templates/{{board_template_id}}/columns/{{column_template_id}}", + "host": [ + "{{base_url}}" + ], + "path": [ + "templates", + "{{board_template_id}}", + "columns", + "{{column_template_id}}" + ] + } + }, + "response": [] + } + ] + }, { "name": "Boards", "item": [ @@ -5518,14 +5747,8 @@ "type": "string" }, { - "key": "board_template_column_id_one", - "value": "{board_template_column_id_one}", - "type": "string" - }, - { - "key": "board_template_column_id_two", - "value": "{board_template_column_id_two}", - "type": "string" + "key": "column_template_id", + "value": "{column_template_id}" } ] } \ No newline at end of file diff --git a/server/src/api/board_templates.go b/server/src/api/board_templates.go index 1b4f99dbc4..a170517719 100644 --- a/server/src/api/board_templates.go +++ b/server/src/api/board_templates.go @@ -30,18 +30,8 @@ func (s *Server) createBoardTemplate(w http.ResponseWriter, r *http.Request) { return } - c, err := s.boardTemplates.ListTemplateColumns(r.Context(), b.ID) - if err != nil { - common.Throw(w, r, common.BadRequestError(err)) - return - } - - // finally append the columns - b.ColumnTemplates = c - render.Status(r, http.StatusCreated) render.Respond(w, r, b) - } func (s *Server) getBoardTemplate(w http.ResponseWriter, r *http.Request) { @@ -60,7 +50,6 @@ func (s *Server) getBoardTemplate(w http.ResponseWriter, r *http.Request) { render.Status(r, http.StatusOK) render.Respond(w, r, template) - } func (s *Server) getBoardTemplates(w http.ResponseWriter, r *http.Request) { diff --git a/server/src/api/column_templates.go b/server/src/api/column_templates.go new file mode 100644 index 0000000000..6a19fe4b71 --- /dev/null +++ b/server/src/api/column_templates.go @@ -0,0 +1,98 @@ +package api + +import ( + "net/http" + + "github.com/go-chi/render" + "github.com/google/uuid" + "scrumlr.io/server/common" + "scrumlr.io/server/common/dto" + "scrumlr.io/server/identifiers" +) + +func (s *Server) createColumnTemplate(w http.ResponseWriter, r *http.Request) { + boardTemplateId := r.Context().Value(identifiers.BoardTemplateIdentifier).(uuid.UUID) + user := r.Context().Value(identifiers.UserIdentifier).(uuid.UUID) + + var body dto.ColumnTemplateRequest + if err := render.Decode(r, &body); err != nil { + http.Error(w, "unable to parse request body", http.StatusBadRequest) + return + } + + body.BoardTemplate = boardTemplateId + body.User = user + + tColumn, err := s.boardTemplates.CreateColumnTemplate(r.Context(), body) + if err != nil { + common.Throw(w, r, common.InternalServerError) + return + } + + render.Status(r, http.StatusCreated) + render.Respond(w, r, tColumn) +} + +func (s *Server) getColumnTemplate(w http.ResponseWriter, r *http.Request) { + boardTemplateId := r.Context().Value(identifiers.BoardTemplateIdentifier).(uuid.UUID) + columnTemplateId := r.Context().Value(identifiers.ColumnTemplateIdentifier).(uuid.UUID) + + columTemplate, err := s.boardTemplates.GetColumnTemplate(r.Context(), boardTemplateId, columnTemplateId) + if err != nil { + common.Throw(w, r, common.InternalServerError) + return + } + + render.Status(r, http.StatusOK) + render.Respond(w, r, columTemplate) +} + +func (s *Server) getColumnTemplates(w http.ResponseWriter, r *http.Request) { + boardTemplateId := r.Context().Value(identifiers.BoardTemplateIdentifier).(uuid.UUID) + + columTemplates, err := s.boardTemplates.ListColumnTemplates(r.Context(), boardTemplateId) + if err != nil { + common.Throw(w, r, common.InternalServerError) + return + } + + render.Status(r, http.StatusOK) + render.Respond(w, r, columTemplates) +} + +func (s *Server) updateColumnTemplate(w http.ResponseWriter, r *http.Request) { + boardTemplateId := r.Context().Value(identifiers.BoardTemplateIdentifier).(uuid.UUID) + columnTemplateId := r.Context().Value(identifiers.ColumnTemplateIdentifier).(uuid.UUID) + + var body dto.ColumnTemplateUpdateRequest + if err := render.Decode(r, &body); err != nil { + http.Error(w, "unable to parse request body", http.StatusBadRequest) + return + } + + body.BoardTemplate = boardTemplateId + body.ID = columnTemplateId + + tColumn, err := s.boardTemplates.UpdateColumnTemplate(r.Context(), body) + if err != nil { + http.Error(w, "unable to update template column", http.StatusInternalServerError) + return + } + + render.Status(r, http.StatusOK) + render.Respond(w, r, tColumn) +} + +func (s *Server) deleteColumnTemplate(w http.ResponseWriter, r *http.Request) { + boardTemplateId := r.Context().Value(identifiers.BoardTemplateIdentifier).(uuid.UUID) + columnTemplateId := r.Context().Value(identifiers.ColumnTemplateIdentifier).(uuid.UUID) + user := r.Context().Value(identifiers.UserIdentifier).(uuid.UUID) + + if err := s.boardTemplates.DeleteColumnTemplate(r.Context(), boardTemplateId, columnTemplateId, user); err != nil { + http.Error(w, "unable to delete column template", http.StatusInternalServerError) + return + } + + render.Status(r, http.StatusNoContent) + render.Respond(w, r, nil) +} diff --git a/server/src/api/context.go b/server/src/api/context.go index c1175c568a..bcedb9739b 100644 --- a/server/src/api/context.go +++ b/server/src/api/context.go @@ -260,7 +260,7 @@ func (s *Server) BoardTemplateContext(next http.Handler) http.Handler { func (s *Server) BoardTemplateRateLimiter(next http.Handler) http.Handler { // Initialize the rate limiter limiter := httprate.Limit( - 15, + 20, 1*time.Second, httprate.WithKeyFuncs(httprate.KeyByIP), httprate.WithLimitHandler(func(w http.ResponseWriter, r *http.Request) { @@ -279,3 +279,17 @@ func (s *Server) BoardTemplateRateLimiter(next http.Handler) http.Handler { limiter(next).ServeHTTP(w, r) }) } + +func (s *Server) ColumnTemplateContext(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + columnTemplateParam := chi.URLParam(r, "columnTemplate") + columnTemplate, err := uuid.Parse(columnTemplateParam) + if err != nil { + common.Throw(w, r, common.BadRequestError(errors.New("invalid column id"))) + return + } + + columnTemplateContext := context.WithValue(r.Context(), identifiers.ColumnTemplateIdentifier, columnTemplate) + next.ServeHTTP(w, r.WithContext(columnTemplateContext)) + }) +} diff --git a/server/src/api/router.go b/server/src/api/router.go index 2481b01fd3..9ddf74b188 100644 --- a/server/src/api/router.go +++ b/server/src/api/router.go @@ -161,9 +161,24 @@ func (s *Server) protectedRoutes(r chi.Router) { r.With(s.BoardTemplateRateLimiter).Get("/templates", s.getBoardTemplates) r.Route("/templates/{id}", func(r chi.Router) { r.Use(s.BoardTemplateRateLimiter) - r.With(s.BoardTemplateContext).Get("/", s.getBoardTemplate) - r.With(s.BoardTemplateContext).Put("/", s.updateBoardTemplate) - r.With(s.BoardTemplateContext).Delete("/", s.deleteBoardTemplate) + r.Use(s.BoardTemplateContext) + + r.Get("/", s.getBoardTemplate) + r.Put("/", s.updateBoardTemplate) + r.Delete("/", s.deleteBoardTemplate) + + r.Route("/columns", func(r chi.Router) { + r.Post("/", s.createColumnTemplate) + r.Get("/", s.getColumnTemplates) + + r.Route("/{columnTemplate}", func(r chi.Router) { + r.Use(s.ColumnTemplateContext) + + r.Get("/", s.getColumnTemplate) + r.Put("/", s.updateColumnTemplate) + r.Delete("/", s.deleteColumnTemplate) + }) + }) }) r.Post("/boards", s.createBoard) diff --git a/server/src/common/dto/board_templates.go b/server/src/common/dto/board_templates.go index 12e247b16d..59a4de7812 100644 --- a/server/src/common/dto/board_templates.go +++ b/server/src/common/dto/board_templates.go @@ -24,9 +24,6 @@ type BoardTemplate struct { // The favourite status of the template Favourite *bool `json:"favourite"` - - // The template columns - ColumnTemplates []*ColumnTemplate `json:"templateColumns"` } func (bt *BoardTemplate) From(board database.BoardTemplate) *BoardTemplate { @@ -40,6 +37,42 @@ func (bt *BoardTemplate) From(board database.BoardTemplate) *BoardTemplate { return bt } +type BoardTemplateFull struct { + // The board template id + ID uuid.UUID `json:"id"` + + // The board template creator id + Creator uuid.UUID `json:"creator"` + + // The board template name + Name *string `json:"name,omitempty"` + + // Description of the board template + Description *string `json:"description"` + + // The access policy + AccessPolicy types.AccessPolicy `json:"accessPolicy"` + + // The favourite status of the template + Favourite *bool `json:"favourite"` + + // Board templates associated column templates + ColumnTemplates []*ColumnTemplate +} + +func (bt *BoardTemplateFull) From(board database.BoardTemplateFull) *BoardTemplateFull { + bt.ID = board.ID + bt.Creator = board.Creator + bt.Name = board.Name + bt.Description = board.Description + bt.AccessPolicy = board.AccessPolicy + bt.Favourite = board.Favourite + // parse db to dto column templates with dto helper function ColumnTemplates + bt.ColumnTemplates = ColumnTemplates(board.ColumnTemplates) + + return bt +} + // CreateBoardTemplateRequest represents the request to create a new board template. type CreateBoardTemplateRequest struct { // The name of the board template. @@ -58,7 +91,7 @@ type CreateBoardTemplateRequest struct { Favourite *bool `json:"favourite"` // The column templates to create for the board template. - Columns []*ColumnTemplateRequest `json:"columns"` + Columns []*ColumnTemplateRequest `json:"columnTemplates"` } type BoardTemplateUpdateRequest struct { @@ -76,7 +109,4 @@ type BoardTemplateUpdateRequest struct { // The favourite status of the template Favourite *bool `json:"favourite"` - - // The template columns - ColumnTemplates []*ColumnTemplate `json:"templateColumns"` } diff --git a/server/src/common/dto/column_templates.go b/server/src/common/dto/column_templates.go index 2aa05f37c4..2078863259 100644 --- a/server/src/common/dto/column_templates.go +++ b/server/src/common/dto/column_templates.go @@ -10,19 +10,18 @@ import ( // ColumnTemplate is the response for all column template requests. type ColumnTemplate struct { - // The column template id. ID uuid.UUID `json:"id"` // The board template id, that this column template is bound to. BoardTemplate uuid.UUID `json:"board_template"` - // The description of a board template column. - Description string `json:"description"` - // The column template name. Name string `json:"name"` + // The description of a board template column. + Description string `json:"description"` + // The column template color. Color types.Color `json:"color"` @@ -35,8 +34,8 @@ type ColumnTemplate struct { func (ct *ColumnTemplate) From(column database.ColumnTemplate) *ColumnTemplate { ct.ID = column.ID - ct.Name = column.Name ct.BoardTemplate = column.BoardTemplate + ct.Name = column.Name ct.Description = column.Description ct.Color = column.Color ct.Visible = column.Visible @@ -50,7 +49,6 @@ func (*ColumnTemplate) Render(_ http.ResponseWriter, _ *http.Request) error { // ColumnTemplateRequest represents the request to create a new column template. type ColumnTemplateRequest struct { - // The column template name to set. Name string `json:"name"` @@ -71,6 +69,27 @@ type ColumnTemplateRequest struct { User uuid.UUID `json:"-"` } +// ColumnTemplateUpdateRequest represents the request to update a column template. +type ColumnTemplateUpdateRequest struct { + // The column template name to set. + Name string `json:"name"` + + // The columnTemplate description to set. + Description string `json:"description"` + + // The column template color to set. + Color types.Color `json:"color"` + + // Sets whether this column template should be visible to regular participants. + Visible bool `json:"visible"` + + // Sets the index of this column template in the sort order. + Index int `json:"index"` + + ID uuid.UUID `json:"-"` + BoardTemplate uuid.UUID `json:"-"` +} + func ColumnTemplates(columns []database.ColumnTemplate) []*ColumnTemplate { if columns == nil { return nil diff --git a/server/src/database/board_templates.go b/server/src/database/board_templates.go index 2156ecbeb6..1b57ce44d8 100644 --- a/server/src/database/board_templates.go +++ b/server/src/database/board_templates.go @@ -2,7 +2,6 @@ package database import ( "context" - "fmt" "time" "github.com/google/uuid" @@ -14,6 +13,17 @@ import ( ) type BoardTemplate struct { + bun.BaseModel `bun:"table:board_templates"` + ID uuid.UUID + Creator uuid.UUID + Name *string + Description *string + AccessPolicy types.AccessPolicy + Favourite *bool + CreatedAt time.Time +} + +type BoardTemplateFull struct { bun.BaseModel `bun:"table:board_templates"` ID uuid.UUID Creator uuid.UUID @@ -21,40 +31,28 @@ type BoardTemplate struct { Description *string AccessPolicy types.AccessPolicy Favourite *bool - CreatedAt time.Time ColumnTemplates []ColumnTemplate + CreatedAt time.Time } -type BoardTemplateGetter struct { +type BoardTemplateInsert struct { bun.BaseModel `bun:"table:board_templates"` - ID uuid.UUID Creator uuid.UUID Name *string Description *string AccessPolicy types.AccessPolicy Favourite *bool - CreatedAt time.Time } -type BoardTemplateInsert struct { +type BoardTemplateUpdate struct { bun.BaseModel `bun:"table:board_templates"` - Creator uuid.UUID + ID uuid.UUID Name *string Description *string - AccessPolicy types.AccessPolicy + AccessPolicy *types.AccessPolicy Favourite *bool } -type BoardTemplateUpdate struct { - bun.BaseModel `bun:"table:board_templates"` - ID uuid.UUID - Name *string - Description *string - AccessPolicy *types.AccessPolicy - Favourite *bool - ColumnTemplates []ColumnTemplate -} - func (d *Database) CreateBoardTemplate(board BoardTemplateInsert, columns []ColumnTemplateInsert) (BoardTemplate, error) { boardInsert := d.db.NewInsert().Model(&board).Returning("*") @@ -66,6 +64,7 @@ func (d *Database) CreateBoardTemplate(board BoardTemplateInsert, columns []Colu columns[index].Index = &newColumnIndex } + // create columns query = query.With("createdColumns", d.db.NewInsert(). Model(&columns). Value("board_template", "(SELECT id FROM \"createdBoardTemplate\")")) @@ -80,7 +79,7 @@ func (d *Database) CreateBoardTemplate(board BoardTemplateInsert, columns []Colu } func (d *Database) GetBoardTemplate(id uuid.UUID) (BoardTemplate, error) { - var tBoard BoardTemplateGetter + var tBoard BoardTemplate // Get settings err := d.db.NewSelect().Model(&tBoard).Where("id = ?", id).Scan(context.Background()) @@ -88,43 +87,26 @@ func (d *Database) GetBoardTemplate(id uuid.UUID) (BoardTemplate, error) { return BoardTemplate{}, err } - // Get columns - var tColumns []ColumnTemplate - err = d.db.NewSelect().Model(&tColumns).Where("board_template = ?", tBoard.ID).Order("index ASC").Scan(context.Background()) - if err != nil { - return BoardTemplate{}, err - } - - dbBoardTemplate := BoardTemplate{ - ID: tBoard.ID, - Creator: tBoard.Creator, - Name: tBoard.Name, - Description: tBoard.Description, - AccessPolicy: tBoard.AccessPolicy, - Favourite: tBoard.Favourite, - ColumnTemplates: tColumns, - } - - return dbBoardTemplate, err + return tBoard, err } -func (d *Database) GetBoardTemplates(user uuid.UUID) ([]BoardTemplate, error) { - var tBoards []BoardTemplateGetter +func (d *Database) GetBoardTemplates(user uuid.UUID) ([]BoardTemplateFull, error) { + var tBoards []BoardTemplate err := d.db.NewSelect().Model(&tBoards).Where("creator = ?", user).Order("created_at ASC").Scan(context.Background()) if err != nil { - return []BoardTemplate{}, err + return []BoardTemplateFull{}, err } - var templates []BoardTemplate + var templates []BoardTemplateFull for _, board := range tBoards { var cols []ColumnTemplate err = d.db.NewSelect().Model(&cols).Where("board_template = ?", board.ID).Scan(context.Background()) if err != nil { - return []BoardTemplate{}, err + return []BoardTemplateFull{}, err } - dbBoardTemplate := BoardTemplate{ + dbBoardTemplate := BoardTemplateFull{ ID: board.ID, Creator: board.Creator, Name: board.Name, @@ -140,95 +122,37 @@ func (d *Database) GetBoardTemplates(user uuid.UUID) ([]BoardTemplate, error) { return templates, err } -func (d *Database) UpdateBoardTemplate(update BoardTemplateUpdate) (BoardTemplate, error) { +func (d *Database) UpdateBoardTemplate(board BoardTemplateUpdate) (BoardTemplate, error) { // General Settings - query_settings := d.db.NewUpdate().Model(&update) + query_settings := d.db.NewUpdate().Model(&board) - if update.Name != nil { + if board.Name != nil { query_settings.Column("name") } - if update.Description != nil { + if board.Description != nil { query_settings.Column("description") } - if update.AccessPolicy != nil { + if board.AccessPolicy != nil { query_settings.Column("access_policy") } - if update.Favourite != nil { + if board.Favourite != nil { query_settings.Column("favourite") } var boardTemplate BoardTemplate _, err := query_settings. - Where("id = ?", update.ID). + Where("id = ?", board.ID). Returning("*"). Exec(common.ContextWithValues(context.Background(), "Database", d, "Result", &boardTemplate), &boardTemplate) if err != nil { - logger.Get().Errorw("failed to update board template settings", "board", update.ID, "err", err) + logger.Get().Errorw("failed to update board template settings", "board", board.ID, "err", err) return BoardTemplate{}, err } - // columns - cols_updated := []ColumnTemplate{} - for _, col := range update.ColumnTemplates { - column := ColumnTemplateUpdate{ - ID: col.ID, - BoardTemplate: boardTemplate.ID, - Name: col.Name, - Description: col.Description, - Color: col.Color, - Visible: col.Visible, - Index: col.Index, - } - - // Update logic - newIndex := column.Index - if column.Index < 0 { - newIndex = 0 - } - - selectPrevious := d.db.NewSelect().Model((*ColumnTemplate)(nil)).Column("board_template", "index").Where("id = ?", column.ID).Where("board_template = ?", column.BoardTemplate) - maxIndexSelect := d.db.NewSelect().Model((*ColumnTemplate)(nil)).Column("index").Where("board_template = ?", column.BoardTemplate) - updateOnSmallerIndex := d.db.NewUpdate(). - Model((*ColumnTemplate)(nil)). - Column("index"). - Set("index = index+1"). - Where("index < (SELECT index FROM \"selectPrevious\")"). - Where("board_template = ?", column.BoardTemplate). - Where("(SELECT index FROM \"selectPrevious\") > ?", newIndex). - Where("index >= ?", newIndex) - updateOnGreaterIndex := d.db.NewUpdate(). - Model((*ColumnTemplate)(nil)). - Column("index"). - Set("index = index-1"). - Where("index > (SELECT index FROM \"selectPrevious\")"). - Where("board_template = ?", column.BoardTemplate). - Where("(SELECT index FROM \"selectPrevious\") < ?", newIndex). - Where("index <= ?", newIndex) - - var c ColumnTemplate - _, err := d.db.NewUpdate(). - With("selectPrevious", selectPrevious). - With("maxIndexSelect", maxIndexSelect). - With("updateOnSmallerIndex", updateOnSmallerIndex). - With("updateOnGreaterIndex", updateOnGreaterIndex). - Model(&column). - Value("index", fmt.Sprintf("LEAST((SELECT COUNT(*) FROM \"maxIndexSelect\")-1, %d)", newIndex)). - Where("id = ?", column.ID). - Returning("*"). - Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardTemplateIdentifier, column.BaseModel), &c) - - if err != nil { - logger.Get().Errorw("failed to update column template in updte board template", "board_template", update.ID, "err", err) - return BoardTemplate{}, err - } - cols_updated = append(cols_updated, c) - } - boardTemplate.ColumnTemplates = cols_updated - return boardTemplate, err } diff --git a/server/src/database/column_templates.go b/server/src/database/column_templates.go index d7686ef786..321c585ad0 100644 --- a/server/src/database/column_templates.go +++ b/server/src/database/column_templates.go @@ -2,10 +2,14 @@ package database import ( "context" + "fmt" + "math" "github.com/google/uuid" "github.com/uptrace/bun" + "scrumlr.io/server/common" "scrumlr.io/server/database/types" + "scrumlr.io/server/identifiers" ) // ColumnTemplate the model for a column template of a board template @@ -43,9 +47,106 @@ type ColumnTemplateUpdate struct { Index int } -func (d *Database) GetTemplateColumns(tBoard uuid.UUID) ([]ColumnTemplate, error) { +// CreateColumnTemplate creates a new column template. The index will be set to the highest available or the specified one. All other +// indices will be adopted (increased by 1) to the new index. +func (d *Database) CreateColumnTemplate(column ColumnTemplateInsert) (ColumnTemplate, error) { + maxIndexSelect := d.db.NewSelect().Model((*ColumnTemplate)(nil)).ColumnExpr("COUNT(*) as index").Where("board_template = ?", column.BoardTemplate) + + newIndex := math.MaxInt + if column.Index != nil { + if *column.Index < 0 { + newIndex = 0 + } else { + newIndex = *column.Index + } + } + + query := d.db.NewInsert() + if column.Index != nil { + indexUpdate := d.db.NewUpdate().Model((*ColumnTemplate)(nil)).Set("index = index+1").Where("index >= ?", newIndex).Where("board = ?", column.BoardTemplate) + query = query.With("indexUpdate", indexUpdate) + } + + var c ColumnTemplate + _, err := query. + With("maxIndexSelect", maxIndexSelect). + Model(&column). + Value("index", fmt.Sprintf("LEAST(coalesce((SELECT index FROM \"maxIndexSelect\"),0), %d)", newIndex)). + Returning("*"). + Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardIdentifier, column.BoardTemplate), &c) + + return c, err +} + +// GetColumnTemplate returns the column template for the specified id. +func (d *Database) GetColumnTemplate(board, id uuid.UUID) (ColumnTemplate, error) { + var column ColumnTemplate + err := d.db.NewSelect().Model(&column).Where("board_template = ?", board).Where("id = ?", id).Scan(context.Background()) + return column, err +} + +func (d *Database) ListColumnTemplates(tBoard uuid.UUID) ([]ColumnTemplate, error) { var tColumns []ColumnTemplate err := d.db.NewSelect().Model(&tColumns).Where("board_template = ?", tBoard).Order("index ASC").Scan(context.Background()) return tColumns, err +} + +// UpdateColumnTemplate updates the column template and re-orders all indices of the column templates if necessary. +func (d *Database) UpdateColumnTemplate(column ColumnTemplateUpdate) (ColumnTemplate, error) { + newIndex := column.Index + if column.Index < 0 { + newIndex = 0 + } + + selectPrevious := d.db.NewSelect().Model((*ColumnTemplate)(nil)).Column("board_template", "index").Where("id = ?", column.ID).Where("board_template = ?", column.BoardTemplate) + maxIndexSelect := d.db.NewSelect().Model((*ColumnTemplate)(nil)).Column("index").Where("board_template = ?", column.BoardTemplate) + updateOnSmallerIndex := d.db.NewUpdate(). + Model((*ColumnTemplate)(nil)). + Column("index"). + Set("index = index+1"). + Where("index < (SELECT index FROM \"selectPrevious\")"). + Where("board_template = ?", column.BoardTemplate). + Where("(SELECT index FROM \"selectPrevious\") > ?", newIndex). + Where("index >= ?", newIndex) + updateOnGreaterIndex := d.db.NewUpdate(). + Model((*ColumnTemplate)(nil)). + Column("index"). + Set("index = index-1"). + Where("index > (SELECT index FROM \"selectPrevious\")"). + Where("board_template = ?", column.BoardTemplate). + Where("(SELECT index FROM \"selectPrevious\") < ?", newIndex). + Where("index <= ?", newIndex) + + var c ColumnTemplate + _, err := d.db.NewUpdate(). + With("selectPrevious", selectPrevious). + With("maxIndexSelect", maxIndexSelect). + With("updateOnSmallerIndex", updateOnSmallerIndex). + With("updateOnGreaterIndex", updateOnGreaterIndex). + Model(&column). + Value("index", fmt.Sprintf("LEAST((SELECT COUNT(*) FROM \"maxIndexSelect\")-1, %d)", newIndex)). + Where("id = ?", column.ID). + Returning("*"). + Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardIdentifier, column.BoardTemplate), &c) + + return c, err +} + +// DeleteColumnTemplate deletes a column template and adapts all indices of the other columns. +func (d *Database) DeleteColumnTemplate(board, column, user uuid.UUID) error { + var columns []ColumnTemplate + selectPreviousIndex := d.db.NewSelect().Model((*ColumnTemplate)(nil)).Column("index", "board_template").Where("id = ?", column) + indexUpdate := d.db.NewUpdate(). + With("selectPreviousIndex", selectPreviousIndex). + Model((*ColumnTemplate)(nil)).Set("index = index-1"). + Where("board_template = (SELECT board_template from \"selectPreviousIndex\")"). + Where("index >= (SELECT index from \"selectPreviousIndex\")") + _, err := d.db.NewDelete(). + With("indexUpdate", indexUpdate). + Model((*ColumnTemplate)(nil)). + Where("id = ?", column). + Returning("*"). + Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardIdentifier, board, identifiers.ColumnIdentifier, column, identifiers.UserIdentifier, user, "Result", &columns), &columns) + return err } diff --git a/server/src/identifiers/identifiers.go b/server/src/identifiers/identifiers.go index 77999403cb..aed8a7f88d 100644 --- a/server/src/identifiers/identifiers.go +++ b/server/src/identifiers/identifiers.go @@ -17,14 +17,16 @@ type reactionIdentifier string type votingIdentifier string type boardEditableIdentifier string type boardTemplateIdentifier string +type columnTemplateIdentifier string const ( - BoardIdentifier boardIdentifier = "Board" - UserIdentifier userIdentifier = "User" - NoteIdentifier noteIdentifier = "Note" - ColumnIdentifier columnIdentifier = "Column" - ReactionIdentifier reactionIdentifier = "Reaction" - VotingIdentifier votingIdentifier = "Voting" - BoardEditableIdentifier boardEditableIdentifier = "BoardEditable" - BoardTemplateIdentifier boardTemplateIdentifier = "BoardTemplate" + BoardIdentifier boardIdentifier = "Board" + UserIdentifier userIdentifier = "User" + NoteIdentifier noteIdentifier = "Note" + ColumnIdentifier columnIdentifier = "Column" + ReactionIdentifier reactionIdentifier = "Reaction" + VotingIdentifier votingIdentifier = "Voting" + BoardEditableIdentifier boardEditableIdentifier = "BoardEditable" + BoardTemplateIdentifier boardTemplateIdentifier = "BoardTemplate" + ColumnTemplateIdentifier columnTemplateIdentifier = "ColumnTemplate" ) diff --git a/server/src/services/board_templates/board_templates.go b/server/src/services/board_templates/board_templates.go index 28337f0e0c..8dc6b358aa 100644 --- a/server/src/services/board_templates/board_templates.go +++ b/server/src/services/board_templates/board_templates.go @@ -32,7 +32,7 @@ func (s *BoardTemplateService) Create(ctx context.Context, body dto.CreateBoardT Favourite: body.Favourite, } - // map request on column objects to insert into database + // map request column templates to db column template inserts columns := make([]database.ColumnTemplateInsert, 0, len(body.Columns)) for index, value := range body.Columns { var currentIndex = index @@ -42,123 +42,65 @@ func (s *BoardTemplateService) Create(ctx context.Context, body dto.CreateBoardT // create the board template b, err := s.database.CreateBoardTemplate(board, columns) if err != nil { - log.Errorw("unable to create board", "creator", body.Creator, "policy", body.AccessPolicy, "error", err) + log.Errorw("unable to create board", "creator", body.Creator, "policy", body.AccessPolicy, "err", err) return nil, err } + return new(dto.BoardTemplate).From(b), nil } -func (s *BoardTemplateService) Get(_ context.Context, id uuid.UUID) (*dto.BoardTemplate, error) { +func (s *BoardTemplateService) Get(ctx context.Context, id uuid.UUID) (*dto.BoardTemplate, error) { + log := logger.FromContext(ctx) boardTemplate, err := s.database.GetBoardTemplate(id) if err != nil { + log.Errorw("unable to get board template", "board", id, "err", err) return nil, err } - - // convert database cols to dto cols - cols := boardTemplate.ColumnTemplates - var new_cols []*dto.ColumnTemplate - for _, x := range cols { - new_cols = append(new_cols, new(dto.ColumnTemplate).From(x)) - } - - boardDto := dto.BoardTemplate{ - ID: boardTemplate.ID, - Creator: boardTemplate.Creator, - Name: boardTemplate.Name, - Description: boardTemplate.Description, - AccessPolicy: boardTemplate.AccessPolicy, - Favourite: boardTemplate.Favourite, - ColumnTemplates: new_cols, - } - - return &boardDto, err + return new(dto.BoardTemplate).From(boardTemplate), err } -func (s *BoardTemplateService) List(ctx context.Context, user uuid.UUID) ([]*dto.BoardTemplate, error) { +func (s *BoardTemplateService) List(ctx context.Context, user uuid.UUID) ([]*dto.BoardTemplateFull, error) { + log := logger.FromContext(ctx) templates, err := s.database.GetBoardTemplates(user) if err != nil { - return []*dto.BoardTemplate{}, err + log.Errorw("unable to list board templates", "user", user, "err", err) + return []*dto.BoardTemplateFull{}, err } - var templatesDto []*dto.BoardTemplate - for _, board := range templates { - // convert database cols to dto cols - cols := board.ColumnTemplates - var new_cols []*dto.ColumnTemplate - for _, x := range cols { - new_cols = append(new_cols, new(dto.ColumnTemplate).From(x)) - } - - boardDto := dto.BoardTemplate{ - ID: board.ID, - Creator: board.Creator, - Name: board.Name, - Description: board.Description, - AccessPolicy: board.AccessPolicy, - Favourite: board.Favourite, - ColumnTemplates: new_cols, - } - templatesDto = append(templatesDto, &boardDto) + var templatesDto []*dto.BoardTemplateFull + for _, template := range templates { + templatesDto = append(templatesDto, new(dto.BoardTemplateFull).From(template)) } return templatesDto, err } func (s *BoardTemplateService) Update(ctx context.Context, body dto.BoardTemplateUpdateRequest) (*dto.BoardTemplate, error) { - // parse dto cols to db cols - req_cols := []database.ColumnTemplate{} - for _, col := range body.ColumnTemplates { - new_col := database.ColumnTemplate{ - ID: col.ID, - BoardTemplate: col.BoardTemplate, - Name: col.Name, - Description: col.Description, - Color: col.Color, - Visible: col.Visible, - Index: col.Index, - } - req_cols = append(req_cols, new_col) - } - + log := logger.FromContext(ctx) // parse req update to db update - update := database.BoardTemplateUpdate{ - ID: body.ID, - Name: body.Name, - Description: body.Description, - AccessPolicy: body.AccessPolicy, - Favourite: body.Favourite, - ColumnTemplates: req_cols, + updateBoard := database.BoardTemplateUpdate{ + ID: body.ID, + Name: body.Name, + Description: body.Description, + AccessPolicy: body.AccessPolicy, + Favourite: body.Favourite, } - updatedTemplate, err := s.database.UpdateBoardTemplate(update) + updatedTemplate, err := s.database.UpdateBoardTemplate(updateBoard) if err != nil { + log.Errorw("unable to update board template", "board", body.ID, "err", err) return &dto.BoardTemplate{}, err } - // convert database cols to dto cols - cols := updatedTemplate.ColumnTemplates - var new_cols []*dto.ColumnTemplate - for _, x := range cols { - new_cols = append(new_cols, new(dto.ColumnTemplate).From(x)) - } - - boardDto := dto.BoardTemplate{ - ID: updatedTemplate.ID, - Creator: updatedTemplate.Creator, - Name: updatedTemplate.Name, - Description: updatedTemplate.Description, - AccessPolicy: updatedTemplate.AccessPolicy, - Favourite: updatedTemplate.Favourite, - ColumnTemplates: new_cols, - } - - return &boardDto, err + return new(dto.BoardTemplate).From(updatedTemplate), err } func (s *BoardTemplateService) Delete(ctx context.Context, templateId uuid.UUID) error { + log := logger.FromContext(ctx) err := s.database.DeleteBoardTemplate(templateId) if err != nil { - logger.Get().Errorw("unable to delete board template", "err", err) + log.Errorw("unable to delete board template", "board", templateId, "err", err) + return err } return err } diff --git a/server/src/services/board_templates/column_templates.go b/server/src/services/board_templates/column_templates.go index 2999c919ab..1b0d4d81e7 100644 --- a/server/src/services/board_templates/column_templates.go +++ b/server/src/services/board_templates/column_templates.go @@ -6,15 +6,56 @@ import ( "github.com/google/uuid" "scrumlr.io/server/common/dto" + "scrumlr.io/server/database" "scrumlr.io/server/logger" ) -func (s *BoardTemplateService) ListTemplateColumns(ctx context.Context, boardID uuid.UUID) ([]*dto.ColumnTemplate, error) { +func (s *BoardTemplateService) CreateColumnTemplate(ctx context.Context, body dto.ColumnTemplateRequest) (*dto.ColumnTemplate, error) { log := logger.FromContext(ctx) - tColumns, err := s.database.GetTemplateColumns(boardID) + tColumn, err := s.database.CreateColumnTemplate(database.ColumnTemplateInsert{BoardTemplate: body.BoardTemplate, Name: body.Name, Description: body.Description, Color: body.Color, Visible: body.Visible, Index: body.Index}) if err != nil { - log.Errorw("unable to get template columns", "boardemplate", boardID, "error", err) - return nil, fmt.Errorf("unable to get columns: %w", err) + log.Errorw("unable to create column template", "user", body.User, "err", err) + return nil, err + } + return new(dto.ColumnTemplate).From(tColumn), err +} + +func (s *BoardTemplateService) GetColumnTemplate(ctx context.Context, boardTemplate, columnTemplate uuid.UUID) (*dto.ColumnTemplate, error) { + log := logger.FromContext(ctx) + tColumn, err := s.database.GetColumnTemplate(boardTemplate, columnTemplate) + if err != nil { + log.Errorw("unable to get template column", "board", boardTemplate, "err", err) + return nil, fmt.Errorf("unable to get template column: %w", err) + } + return new(dto.ColumnTemplate).From(tColumn), err +} + +func (s *BoardTemplateService) ListColumnTemplates(ctx context.Context, boardTemplate uuid.UUID) ([]*dto.ColumnTemplate, error) { + log := logger.FromContext(ctx) + tColumns, err := s.database.ListColumnTemplates(boardTemplate) + if err != nil { + log.Errorw("unable to get template columns", "board", boardTemplate, "err", err) + return nil, fmt.Errorf("unable to get template columns: %w", err) } return dto.ColumnTemplates(tColumns), err } + +func (s *BoardTemplateService) UpdateColumnTemplate(ctx context.Context, body dto.ColumnTemplateUpdateRequest) (*dto.ColumnTemplate, error) { + log := logger.FromContext(ctx) + tColumn, err := s.database.UpdateColumnTemplate(database.ColumnTemplateUpdate{ID: body.ID, BoardTemplate: body.BoardTemplate, Name: body.Name, Description: body.Description, Color: body.Color, Visible: body.Visible, Index: body.Index}) + if err != nil { + log.Errorw("unable to update column template", "board", body.BoardTemplate, "column", body.ID, "err", err) + return nil, err + } + return new(dto.ColumnTemplate).From(tColumn), err +} + +func (s *BoardTemplateService) DeleteColumnTemplate(ctx context.Context, board, column, user uuid.UUID) error { + log := logger.FromContext(ctx) + err := s.database.DeleteColumnTemplate(board, column, user) + if err != nil { + log.Errorw("unable to delete column template", "board", board, "column", column, "err", err) + return err + } + return err +} diff --git a/server/src/services/services.go b/server/src/services/services.go index 60ae210ece..889b1918ad 100644 --- a/server/src/services/services.go +++ b/server/src/services/services.go @@ -104,9 +104,13 @@ type BoardReactions interface { type BoardTemplates interface { Create(ctx context.Context, body dto.CreateBoardTemplateRequest) (*dto.BoardTemplate, error) Get(ctx context.Context, id uuid.UUID) (*dto.BoardTemplate, error) - List(ctx context.Context, user uuid.UUID) ([]*dto.BoardTemplate, error) + List(ctx context.Context, user uuid.UUID) ([]*dto.BoardTemplateFull, error) Update(ctx context.Context, body dto.BoardTemplateUpdateRequest) (*dto.BoardTemplate, error) Delete(ctx context.Context, id uuid.UUID) error - ListTemplateColumns(ctx context.Context, boardTemplateID uuid.UUID) ([]*dto.ColumnTemplate, error) + CreateColumnTemplate(ctx context.Context, body dto.ColumnTemplateRequest) (*dto.ColumnTemplate, error) + GetColumnTemplate(ctx context.Context, boardID, columnID uuid.UUID) (*dto.ColumnTemplate, error) + ListColumnTemplates(ctx context.Context, board uuid.UUID) ([]*dto.ColumnTemplate, error) + UpdateColumnTemplate(ctx context.Context, body dto.ColumnTemplateUpdateRequest) (*dto.ColumnTemplate, error) + DeleteColumnTemplate(ctx context.Context, boar, column, user uuid.UUID) error } From 99cbe1cd5f23c4071082db355dd15e506f72fdf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:27:55 +0200 Subject: [PATCH 010/321] go(deps): bump github.com/urfave/cli/v2 from 2.27.2 to 2.27.3 in /server/src (#4364) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/src/go.mod | 4 ++-- server/src/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/go.mod b/server/src/go.mod index 3e60c3a9f7..48e89003a9 100644 --- a/server/src/go.mod +++ b/server/src/go.mod @@ -25,7 +25,7 @@ require ( github.com/uptrace/bun/dbfixture v1.1.17 github.com/uptrace/bun/dialect/pgdialect v1.1.17 github.com/uptrace/bun/extra/bundebug v1.1.17 - github.com/urfave/cli/v2 v2.27.2 + github.com/urfave/cli/v2 v2.27.3 github.com/weppos/publicsuffix-go v0.40.2 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.25.0 @@ -93,7 +93,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect + github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.10.0 // indirect golang.org/x/mod v0.17.0 // indirect diff --git a/server/src/go.sum b/server/src/go.sum index 424e6bf018..f08b310f14 100644 --- a/server/src/go.sum +++ b/server/src/go.sum @@ -212,8 +212,8 @@ github.com/uptrace/bun/dialect/pgdialect v1.1.17 h1:NsvFVHAx1Az6ytlAD/B6ty3cVE6j github.com/uptrace/bun/dialect/pgdialect v1.1.17/go.mod h1:fLBDclNc7nKsZLzNjFL6BqSdgJzbj2HdnyOnLoDvAME= github.com/uptrace/bun/extra/bundebug v1.1.17 h1:LcZ8DzyyGdXAmbUqmnCpBq7TPFegMp59FGy+uzEE21c= github.com/uptrace/bun/extra/bundebug v1.1.17/go.mod h1:FOwNaBEGGChv3qBVh3pz3TPlUuikZ93qKjd/LJdl91o= -github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= -github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= +github.com/urfave/cli/v2 v2.27.3 h1:/POWahRmdh7uztQ3CYnaDddk0Rm90PyOgIxgW2rr41M= +github.com/urfave/cli/v2 v2.27.3/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= @@ -227,8 +227,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= From 1062d269f09298382893991b8e934ec50b6ba862 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:28:46 +0200 Subject: [PATCH 011/321] go(deps): bump github.com/go-chi/httprate from 0.10.0 to 0.12.0 in /server/src (#4365) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/src/go.mod | 2 +- server/src/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/go.mod b/server/src/go.mod index 48e89003a9..23f7ce9378 100644 --- a/server/src/go.mod +++ b/server/src/go.mod @@ -8,7 +8,7 @@ replace github.com/opencontainers/runc v1.1.0 => github.com/opencontainers/runc require ( github.com/go-chi/chi/v5 v5.1.0 github.com/go-chi/cors v1.2.1 - github.com/go-chi/httprate v0.10.0 + github.com/go-chi/httprate v0.12.0 github.com/go-chi/jwtauth/v5 v5.1.1 github.com/go-chi/render v1.0.3 github.com/go-redis/redis/v8 v8.11.5 diff --git a/server/src/go.sum b/server/src/go.sum index f08b310f14..9c6eecd882 100644 --- a/server/src/go.sum +++ b/server/src/go.sum @@ -56,8 +56,8 @@ github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4= github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= -github.com/go-chi/httprate v0.10.0 h1:NnHj/C9pNR1mwDX9biXXYmLhEhVqz+PR3MR3kWdHYYY= -github.com/go-chi/httprate v0.10.0/go.mod h1:IqW+o6o/dkOUqyR9weVur+ob3gpEemmbfSRiBxUwqJU= +github.com/go-chi/httprate v0.12.0 h1:08D/te3pOTJe5+VAZTQrHxwdsH2NyliiUoRD1naKaMg= +github.com/go-chi/httprate v0.12.0/go.mod h1:TUepLXaz/pCjmCtf/obgOQJ2Sz6rC8fSf5cAt5cnTt0= github.com/go-chi/jwtauth/v5 v5.1.1 h1:Pjixqu5YkjE9sCLpzE01L0Q4sQzJIPdo7uz9r8ftp/c= github.com/go-chi/jwtauth/v5 v5.1.1/go.mod h1:CYP1WSbzD4MPuKCr537EM3kfFhSQgpUEtMJFuYJjqWU= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= From 0c086d2303303f011250924f4cc697ce1ec668ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 10:31:52 +0000 Subject: [PATCH 012/321] yarn(deps-dev): bump husky from 9.1.1 to 9.1.2 (#4366) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1c4ca18cd8..20424f9631 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "eslint-plugin-react": "7.35.0", "eslint-plugin-react-hooks": "4.6.2", "hash-files": "^1.1.1", - "husky": "^9.1.1", + "husky": "^9.1.2", "i18next-fs-backend": "^2.3.1", "lint-staged": "^15.2.7", "prettier": "^3.3.3", diff --git a/yarn.lock b/yarn.lock index fa9366b0a3..ddc14f7a0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6513,10 +6513,10 @@ human-signals@^5.0.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== -husky@^9.1.1: - version "9.1.1" - resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.1.tgz#73f8f1b58329f377654293148c1a6458f54ca224" - integrity sha512-fCqlqLXcBnXa/TJXmT93/A36tJsjdJkibQ1MuIiFyCCYUlpYpIaj2mv1w+3KR6Rzu1IC3slFTje5f6DUp2A2rg== +husky@^9.1.2: + version "9.1.2" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.2.tgz#ddaf290384c7adab4fd3143571c73d05b19f42ee" + integrity sha512-1/aDMXZdhr1VdJJTLt6e7BipM0Jd9qkpubPiIplon1WmCeOy3nnzsCMeBqS9AsL5ioonl8F8y/F2CLOmk19/Pw== i18next-browser-languagedetector@^8.0.0: version "8.0.0" From 2bd522bb91c838bb4d3c35140c4f470394e896ca Mon Sep 17 00:00:00 2001 From: Elisabeth Kletsko Date: Mon, 29 Jul 2024 09:10:56 +0200 Subject: [PATCH 013/321] refactor(server): Refactor FullBoard struct (#4337) Signed-off-by: dependabot[bot] Signed-off-by: Lennart Krauch Co-authored-by: Mateo Ivankovic Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lennart Krauch Co-authored-by: Jakob Schwehn Co-authored-by: Manuel Brandstetter <36969812+brandstetterm@users.noreply.github.com> Co-authored-by: Benedict Homuth <56362368+BenedictHomuth@users.noreply.github.com> Co-authored-by: Benedict Homuth --- server/src/api/boards.go | 18 ++-- server/src/api/boards_listen_on_board.go | 22 ++--- server/src/api/event_filter.go | 20 ++--- server/src/api/event_filter_test.go | 32 +++---- server/src/common/dto/boards.go | 23 +++++ server/src/database/database.go | 104 +++++++++++++---------- server/src/services/boards/boards.go | 15 ++-- server/src/services/services.go | 2 +- 8 files changed, 131 insertions(+), 105 deletions(-) diff --git a/server/src/api/boards.go b/server/src/api/boards.go index f750a5f229..7b4f67d366 100644 --- a/server/src/api/boards.go +++ b/server/src/api/boards.go @@ -310,21 +310,21 @@ func (s *Server) exportBoard(w http.ResponseWriter, r *http.Request) { boardId := r.Context().Value(identifiers.BoardIdentifier).(uuid.UUID) - board, _, sessions, columns, notes, _, votings, _, err := s.boards.FullBoard(r.Context(), boardId) + fullBoard, err := s.boards.FullBoard(r.Context(), boardId) if err != nil { common.Throw(w, r, err) return } visibleColumns := []*dto.Column{} - for _, column := range columns { + for _, column := range fullBoard.Columns { if column.Visible { visibleColumns = append(visibleColumns, column) } } visibleNotes := []*dto.Note{} - for _, note := range notes { + for _, note := range fullBoard.Notes { for _, column := range visibleColumns { if note.Position.Column == column.ID { visibleNotes = append(visibleNotes, note) @@ -341,16 +341,16 @@ func (s *Server) exportBoard(w http.ResponseWriter, r *http.Request) { Notes []*dto.Note `json:"notes"` Votings []*dto.Voting `json:"votings"` }{ - Board: board, - Participants: sessions, + Board: fullBoard.Board, + Participants: fullBoard.BoardSessions, Columns: visibleColumns, Notes: visibleNotes, - Votings: votings, + Votings: fullBoard.Votings, }) return } else if r.Header.Get("Accept") == "text/csv" { header := []string{"note_id", "author_id", "author", "text", "column_id", "column", "rank", "stack"} - for index, voting := range votings { + for index, voting := range fullBoard.Votings { if voting.Status == types.VotingStatusClosed { header = append(header, fmt.Sprintf("voting_%d", index)) } @@ -364,7 +364,7 @@ func (s *Server) exportBoard(w http.ResponseWriter, r *http.Request) { } author := note.Author.String() - for _, session := range sessions { + for _, session := range fullBoard.BoardSessions { if session.User.ID == note.Author { author = session.User.Name } @@ -388,7 +388,7 @@ func (s *Server) exportBoard(w http.ResponseWriter, r *http.Request) { stack, } - for _, voting := range votings { + for _, voting := range fullBoard.Votings { if voting.Status == types.VotingStatusClosed { if voting.VotingResults != nil { resultOnNote = append(resultOnNote, strconv.Itoa(voting.VotingResults.Votes[note.ID].Total)) diff --git a/server/src/api/boards_listen_on_board.go b/server/src/api/boards_listen_on_board.go index 1db8e98104..4dd579cc64 100644 --- a/server/src/api/boards_listen_on_board.go +++ b/server/src/api/boards_listen_on_board.go @@ -3,6 +3,7 @@ package api import ( "context" "net/http" + "scrumlr.io/server/identifiers" "github.com/google/uuid" @@ -24,7 +25,7 @@ type BoardSubscription struct { type InitEvent struct { Type realtime.BoardEventType `json:"type"` - Data EventData `json:"data"` + Data dto2.FullBoard `json:"data"` } type EventData struct { @@ -51,27 +52,16 @@ func (s *Server) openBoardSocket(w http.ResponseWriter, r *http.Request) { return } - board, requests, sessions, columns, notes, reactions, votings, votes, err := s.boards.FullBoard(r.Context(), id) + fullBoard, err := s.boards.FullBoard(r.Context(), id) if err != nil { logger.Get().Errorw("failed to prepare init message", "board", id, "user", userID, "err", err) s.closeBoardSocket(id, userID, conn) return } - initEventData := EventData{ - Board: board, - Columns: columns, - Notes: notes, - Reactions: reactions, - Votings: votings, - Votes: votes, - Sessions: sessions, - Requests: requests, - } - initEvent := InitEvent{ Type: realtime.BoardEventInit, - Data: initEventData, + Data: *fullBoard, } initEvent = eventInitFilter(initEvent, userID) @@ -107,7 +97,7 @@ func (s *Server) openBoardSocket(w http.ResponseWriter, r *http.Request) { } } -func (s *Server) listenOnBoard(boardID, userID uuid.UUID, conn *websocket.Conn, initEventData EventData) { +func (s *Server) listenOnBoard(boardID, userID uuid.UUID, conn *websocket.Conn, initEventData dto2.FullBoard) { if _, exist := s.boardSubscriptions[boardID]; !exist { s.boardSubscriptions[boardID] = &BoardSubscription{ clients: make(map[uuid.UUID]*websocket.Conn), @@ -116,7 +106,7 @@ func (s *Server) listenOnBoard(boardID, userID uuid.UUID, conn *websocket.Conn, b := s.boardSubscriptions[boardID] b.clients[userID] = conn - b.boardParticipants = initEventData.Sessions + b.boardParticipants = initEventData.BoardSessions b.boardSettings = initEventData.Board b.boardColumns = initEventData.Columns b.boardNotes = initEventData.Notes diff --git a/server/src/api/event_filter.go b/server/src/api/event_filter.go index 2bf8cfaf86..7c03a552ac 100644 --- a/server/src/api/event_filter.go +++ b/server/src/api/event_filter.go @@ -311,22 +311,22 @@ func (boardSubscription *BoardSubscription) eventFilter(event *realtime.BoardEve } func eventInitFilter(event InitEvent, clientID uuid.UUID) InitEvent { - isMod := isModerator(clientID, event.Data.Sessions) + isMod := isModerator(clientID, event.Data.BoardSessions) if isMod { return event } retEvent := InitEvent{ Type: event.Type, - Data: EventData{ - Board: event.Data.Board, - Notes: nil, - Reactions: event.Data.Reactions, - Columns: nil, - Votings: event.Data.Votings, - Votes: event.Data.Votes, - Sessions: event.Data.Sessions, - Requests: event.Data.Requests, + Data: dto.FullBoard{ + Board: event.Data.Board, + BoardSessions: event.Data.BoardSessions, + BoardSessionRequests: event.Data.BoardSessionRequests, + Notes: nil, + Reactions: event.Data.Reactions, + Columns: nil, + Votings: event.Data.Votings, + Votes: event.Data.Votes, }, } // Columns diff --git a/server/src/api/event_filter_test.go b/server/src/api/event_filter_test.go index 99816036d5..1d599a555b 100644 --- a/server/src/api/event_filter_test.go +++ b/server/src/api/event_filter_test.go @@ -133,14 +133,14 @@ var ( } initEvent = InitEvent{ Type: realtime.BoardEventInit, - Data: EventData{ - Board: &dto.Board{}, - Columns: []*dto.Column{&aSeeableColumn, &aHiddenColumn}, - Notes: []*dto.Note{&aOwnerNote, &aModeratorNote, &aParticipantNote}, - Votings: []*dto.Voting{votingData.Voting}, - Votes: []*dto.Vote{}, - Sessions: boardSessions, - Requests: []*dto.BoardSessionRequest{}, + Data: dto.FullBoard{ + Board: &dto.Board{}, + Columns: []*dto.Column{&aSeeableColumn, &aHiddenColumn}, + Notes: []*dto.Note{&aOwnerNote, &aModeratorNote, &aParticipantNote}, + Votings: []*dto.Voting{votingData.Voting}, + Votes: []*dto.Vote{}, + BoardSessions: boardSessions, + BoardSessionRequests: []*dto.BoardSessionRequest{}, }, } ) @@ -381,14 +381,14 @@ func testInitFilterAsParticipant(t *testing.T) { } expectedInitEvent := InitEvent{ Type: realtime.BoardEventInit, - Data: EventData{ - Board: &dto.Board{}, - Columns: []*dto.Column{&aSeeableColumn}, - Notes: []*dto.Note{&aParticipantNote}, - Votings: []*dto.Voting{&expectedVoting}, - Votes: []*dto.Vote{}, - Sessions: boardSessions, - Requests: []*dto.BoardSessionRequest{}, + Data: dto.FullBoard{ + Board: &dto.Board{}, + Columns: []*dto.Column{&aSeeableColumn}, + Notes: []*dto.Note{&aParticipantNote}, + Votings: []*dto.Voting{&expectedVoting}, + Votes: []*dto.Vote{}, + BoardSessions: boardSessions, + BoardSessionRequests: []*dto.BoardSessionRequest{}, }, } returnedInitEvent := eventInitFilter(initEvent, participantBoardSession.User.ID) diff --git a/server/src/common/dto/boards.go b/server/src/common/dto/boards.go index ff8347e6ab..30b0681621 100644 --- a/server/src/common/dto/boards.go +++ b/server/src/common/dto/boards.go @@ -142,3 +142,26 @@ type BoardOverview struct { CreatedAt time.Time `json:"createdAt"` Participants int `json:"participants"` } + +type FullBoard struct { + Board *Board `json:"board"` + BoardSessionRequests []*BoardSessionRequest `json:"requests"` + BoardSessions []*BoardSession `json:"participants"` + Columns []*Column `json:"columns"` + Notes []*Note `json:"notes"` + Reactions []*Reaction `json:"reactions"` + Votings []*Voting `json:"votings"` + Votes []*Vote `json:"votes"` +} + +func (dtoFullBoard *FullBoard) From(dbFullBoard database.FullBoard) *FullBoard { + dtoFullBoard.Board = new(Board).From(dbFullBoard.Board) + dtoFullBoard.BoardSessionRequests = BoardSessionRequests(dbFullBoard.BoardSessionRequests) + dtoFullBoard.BoardSessions = BoardSessions(dbFullBoard.BoardSessions) + dtoFullBoard.Columns = Columns(dbFullBoard.Columns) + dtoFullBoard.Notes = Notes(dbFullBoard.Notes) + dtoFullBoard.Reactions = Reactions(dbFullBoard.Reactions) + dtoFullBoard.Votings = Votings(dbFullBoard.Votings, dbFullBoard.Votes) + dtoFullBoard.Votes = Votes(dbFullBoard.Votes) + return dtoFullBoard +} diff --git a/server/src/database/database.go b/server/src/database/database.go index ae1abb5ffb..cf41cdd2ed 100644 --- a/server/src/database/database.go +++ b/server/src/database/database.go @@ -15,6 +15,17 @@ type Database struct { db *bun.DB } +type FullBoard struct { + Board Board + BoardSessions []BoardSession + BoardSessionRequests []BoardSessionRequest + Columns []Column + Notes []Note + Reactions []Reaction + Votings []Voting + Votes []Vote +} + // New creates a new instance of Database func New(db *sql.DB, verbose bool) *Database { d := new(Database) @@ -32,51 +43,52 @@ func New(db *sql.DB, verbose bool) *Database { return d } -func (d *Database) Get(id uuid.UUID) (Board, []BoardSessionRequest, []BoardSession, []Column, []Note, []Reaction, []Voting, []Vote, error) { - var board Board - var sessions []BoardSession - var requests []BoardSessionRequest - var columns []Column - var notes []Note - var reactions []Reaction - var votings []Voting - var votes []Vote - var err error - - board, err = d.GetBoard(id) - if err != nil { - return Board{}, nil, nil, nil, nil, nil, nil, nil, err - } - - requests, err = d.GetBoardSessionRequests(id) - if err != nil { - return Board{}, nil, nil, nil, nil, nil, nil, nil, err - } - - sessions, err = d.GetBoardSessions(id) - if err != nil { - return Board{}, nil, nil, nil, nil, nil, nil, nil, err - } - - columns, err = d.GetColumns(id) - if err != nil { - return Board{}, nil, nil, nil, nil, nil, nil, nil, err - } - - notes, err = d.GetNotes(id) - if err != nil { - return Board{}, nil, nil, nil, nil, nil, nil, nil, err - } - - reactions, err = d.GetReactions(id) - if err != nil { - return Board{}, nil, nil, nil, nil, nil, nil, nil, err - } - - votings, votes, err = d.GetVotings(id) - if err != nil { - return Board{}, nil, nil, nil, nil, nil, nil, nil, err +func (d *Database) Get(id uuid.UUID) (FullBoard, error) { + var ( + board Board + sessions []BoardSession + requests []BoardSessionRequest + columns []Column + notes []Note + reactions []Reaction + votings []Voting + votes []Vote + err error + ) + type dataBaseOperation int + + /* The following const can be compared to an enum in Java + iota allows for an automatic increment in Go */ + const ( + getBoard dataBaseOperation = iota + getRequests + getSessions + getColumns + getNotes + getReactions + getVotings + ) + + for op := getBoard; op <= getVotings; op++ { + switch op { + case getBoard: + board, err = d.GetBoard(id) + case getRequests: + requests, err = d.GetBoardSessionRequests(id) + case getSessions: + sessions, err = d.GetBoardSessions(id) + case getColumns: + columns, err = d.GetColumns(id) + case getNotes: + notes, err = d.GetNotes(id) + case getReactions: + reactions, err = d.GetReactions(id) + case getVotings: + votings, votes, err = d.GetVotings(id) + } + if err != nil { + return FullBoard{}, err + } } - - return board, requests, sessions, columns, notes, reactions, votings, votes, err + return FullBoard{board, sessions, requests, columns, notes, reactions, votings, votes}, nil } diff --git a/server/src/services/boards/boards.go b/server/src/services/boards/boards.go index 99d48d3535..05b8646992 100644 --- a/server/src/services/boards/boards.go +++ b/server/src/services/boards/boards.go @@ -92,20 +92,21 @@ func (s *BoardService) Create(ctx context.Context, body dto.CreateBoardRequest) return new(dto.Board).From(b), nil } -func (s *BoardService) FullBoard(ctx context.Context, boardID uuid.UUID) (*dto.Board, []*dto.BoardSessionRequest, []*dto.BoardSession, []*dto.Column, []*dto.Note, []*dto.Reaction, []*dto.Voting, []*dto.Vote, error) { - board, requests, sessions, columns, notes, reactions, votings, votes, err := s.database.Get(boardID) +func (s *BoardService) FullBoard(ctx context.Context, boardID uuid.UUID) (*dto.FullBoard, error) { + fullBoard, err := s.database.Get(boardID) if err != nil { - return nil, nil, nil, nil, nil, nil, nil, nil, err + return nil, err } - personalVotes := []*dto.Vote{} - for _, vote := range votes { + personalVotes := []database.Vote{} + for _, vote := range fullBoard.Votes { if vote.User == ctx.Value(identifiers.UserIdentifier).(uuid.UUID) { - personalVotes = append(personalVotes, new(dto.Vote).From(vote)) + personalVotes = append(personalVotes, vote) } } + fullBoard.Votes = personalVotes - return new(dto.Board).From(board), dto.BoardSessionRequests(requests), dto.BoardSessions(sessions), dto.Columns(columns), dto.Notes(notes), dto.Reactions(reactions), dto.Votings(votings, votes), personalVotes, err + return new(dto.FullBoard).From(fullBoard), err } func (s *BoardService) BoardOverview(_ context.Context, boardIDs []uuid.UUID, user uuid.UUID) ([]*dto.BoardOverview, error) { diff --git a/server/src/services/services.go b/server/src/services/services.go index 889b1918ad..b120107c57 100644 --- a/server/src/services/services.go +++ b/server/src/services/services.go @@ -40,7 +40,7 @@ type Boards interface { GetColumn(ctx context.Context, boardID, columnID uuid.UUID) (*dto.Column, error) ListColumns(ctx context.Context, boardID uuid.UUID) ([]*dto.Column, error) - FullBoard(ctx context.Context, boardID uuid.UUID) (*dto.Board, []*dto.BoardSessionRequest, []*dto.BoardSession, []*dto.Column, []*dto.Note, []*dto.Reaction, []*dto.Voting, []*dto.Vote, error) + FullBoard(ctx context.Context, boardID uuid.UUID) (*dto.FullBoard, error) BoardOverview(ctx context.Context, boardIDs []uuid.UUID, user uuid.UUID) ([]*dto.BoardOverview, error) GetBoards(ctx context.Context, userID uuid.UUID) ([]uuid.UUID, error) } From aac1cb2bd263a5cb2e9b6695add7aac7559027db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:03:07 +0200 Subject: [PATCH 014/321] yarn(deps-dev): bump husky from 9.1.2 to 9.1.3 (#4368) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 20424f9631..64be46ccfc 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "eslint-plugin-react": "7.35.0", "eslint-plugin-react-hooks": "4.6.2", "hash-files": "^1.1.1", - "husky": "^9.1.2", + "husky": "^9.1.3", "i18next-fs-backend": "^2.3.1", "lint-staged": "^15.2.7", "prettier": "^3.3.3", diff --git a/yarn.lock b/yarn.lock index ddc14f7a0c..db929ecd8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6513,10 +6513,10 @@ human-signals@^5.0.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== -husky@^9.1.2: - version "9.1.2" - resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.2.tgz#ddaf290384c7adab4fd3143571c73d05b19f42ee" - integrity sha512-1/aDMXZdhr1VdJJTLt6e7BipM0Jd9qkpubPiIplon1WmCeOy3nnzsCMeBqS9AsL5ioonl8F8y/F2CLOmk19/Pw== +husky@^9.1.3: + version "9.1.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.3.tgz#46cddff01f9a551f87b39accc67860bce5d00680" + integrity sha512-ET3TQmQgdIu0pt+jKkpo5oGyg/4MQZpG6xcam5J5JyNJV+CBT23OBpCF15bKHKycRyMH9k6ONy8g2HdGIsSkMQ== i18next-browser-languagedetector@^8.0.0: version "8.0.0" From a55a3db3882713ce6170775b6d775805e37b58e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:03:25 +0200 Subject: [PATCH 015/321] yarn(deps): bump marked from 13.0.2 to 13.0.3 (#4369) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 64be46ccfc..6680eaa67f 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "js-cookie": "^3.0.5", "linkify-react": "^4.1.3", "linkifyjs": "^4.1.3", - "marked": "13.0.2", + "marked": "13.0.3", "plausible-tracker": "^0.3.9", "qrcode.react": "^3.1.0", "query-string": "^9.1.0", diff --git a/yarn.lock b/yarn.lock index db929ecd8f..325e68a2cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8122,10 +8122,10 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" -marked@13.0.2: - version "13.0.2" - resolved "https://registry.yarnpkg.com/marked/-/marked-13.0.2.tgz#d5d05bd2683a85cb9cc6afbe5240e3a8bffcb92a" - integrity sha512-J6CPjP8pS5sgrRqxVRvkCIkZ6MFdRIjDkwUwgJ9nL2fbmM6qGQeB2C16hi8Cc9BOzj6xXzy0jyi0iPIfnMHYzA== +marked@13.0.3: + version "13.0.3" + resolved "https://registry.yarnpkg.com/marked/-/marked-13.0.3.tgz#5c5b4a5d0198060c7c9bc6ef9420a7fed30f822d" + integrity sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA== mathml-tag-names@^2.1.3: version "2.1.3" From 484f1f189a0bd3227ba9290cf2fe64a6c4931544 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 09:04:57 +0000 Subject: [PATCH 016/321] go(deps): bump github.com/lestrrat-go/jwx/v2 from 2.1.0 to 2.1.1 in /server/src (#4371) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/src/go.mod | 4 ++-- server/src/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/go.mod b/server/src/go.mod index 23f7ce9378..c301bbd653 100644 --- a/server/src/go.mod +++ b/server/src/go.mod @@ -15,7 +15,7 @@ require ( github.com/golang-migrate/migrate/v4 v4.17.1 github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 - github.com/lestrrat-go/jwx/v2 v2.1.0 + github.com/lestrrat-go/jwx/v2 v2.1.1 github.com/markbates/goth v1.80.0 github.com/nats-io/nats.go v1.36.0 github.com/ory/dockertest/v3 v3.10.0 @@ -67,7 +67,7 @@ require ( github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect github.com/lestrrat-go/blackmagic v1.0.2 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect - github.com/lestrrat-go/httprc v1.0.5 // indirect + github.com/lestrrat-go/httprc v1.0.6 // indirect github.com/lestrrat-go/iter v1.0.2 // indirect github.com/lestrrat-go/jwx v1.2.29 // indirect github.com/lestrrat-go/option v1.0.1 // indirect diff --git a/server/src/go.sum b/server/src/go.sum index 9c6eecd882..acd6c15f31 100644 --- a/server/src/go.sum +++ b/server/src/go.sum @@ -125,14 +125,14 @@ github.com/lestrrat-go/blackmagic v1.0.2 h1:Cg2gVSc9h7sz9NOByczrbUvLopQmXrfFx//N github.com/lestrrat-go/blackmagic v1.0.2/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE= github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= -github.com/lestrrat-go/httprc v1.0.5 h1:bsTfiH8xaKOJPrg1R+E3iE/AWZr/x0Phj9PBTG/OLUk= -github.com/lestrrat-go/httprc v1.0.5/go.mod h1:mwwz3JMTPBjHUkkDv/IGJ39aALInZLrhBp0X7KGUZlo= +github.com/lestrrat-go/httprc v1.0.6 h1:qgmgIRhpvBqexMJjA/PmwSvhNk679oqD1RbovdCGW8k= +github.com/lestrrat-go/httprc v1.0.6/go.mod h1:mwwz3JMTPBjHUkkDv/IGJ39aALInZLrhBp0X7KGUZlo= github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI= github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= github.com/lestrrat-go/jwx v1.2.29 h1:QT0utmUJ4/12rmsVQrJ3u55bycPkKqGYuGT4tyRhxSQ= github.com/lestrrat-go/jwx v1.2.29/go.mod h1:hU8k2l6WF0ncx20uQdOmik/Gjg6E3/wIRtXSNFeZuB8= -github.com/lestrrat-go/jwx/v2 v2.1.0 h1:0zs7Ya6+39qoit7gwAf+cYm1zzgS3fceIdo7RmQ5lkw= -github.com/lestrrat-go/jwx/v2 v2.1.0/go.mod h1:Xpw9QIaUGiIUD1Wx0NcY1sIHwFf8lDuZn/cmxtXYRys= +github.com/lestrrat-go/jwx/v2 v2.1.1 h1:Y2ltVl8J6izLYFs54BVcpXLv5msSW4o8eXwnzZLI32E= +github.com/lestrrat-go/jwx/v2 v2.1.1/go.mod h1:4LvZg7oxu6Q5VJwn7Mk/UwooNRnTHUpXBj2C4j3HNx0= github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= From 9e4b745d56173c0ec04385be735e3f42759ce593 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:04:24 +0200 Subject: [PATCH 017/321] yarn(deps-dev): bump @types/node from 20.14.12 to 22.0.0 (#4370) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Benedict Homuth <56362368+BenedictHomuth@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 6680eaa67f..b21010c6ff 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.12", "@types/js-cookie": "^3.0.6", - "@types/node": "^20.14.12", + "@types/node": "^22.0.0", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index 325e68a2cc..eebde633be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2380,12 +2380,12 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^20.14.12": - version "20.14.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.12.tgz#129d7c3a822cb49fc7ff661235f19cfefd422b49" - integrity sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ== +"@types/node@*", "@types/node@^22.0.0": + version "22.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" + integrity sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw== dependencies: - undici-types "~5.26.4" + undici-types "~6.11.1" "@types/parse-json@^4.0.0": version "4.0.0" @@ -11479,10 +11479,10 @@ underscore@1.x.x, underscore@^1.13.7, underscore@^1.8.3: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.11.1: + version "6.11.1" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.11.1.tgz#432ea6e8efd54a48569705a699e62d8f4981b197" + integrity sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" From 7e121aff0da9f60d04ccfe71c2b48929878f601f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:55:19 +0200 Subject: [PATCH 018/321] yarn(deps-dev): bump husky from 9.1.3 to 9.1.4 (#4374) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b21010c6ff..1ab1d0959e 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "eslint-plugin-react": "7.35.0", "eslint-plugin-react-hooks": "4.6.2", "hash-files": "^1.1.1", - "husky": "^9.1.3", + "husky": "^9.1.4", "i18next-fs-backend": "^2.3.1", "lint-staged": "^15.2.7", "prettier": "^3.3.3", diff --git a/yarn.lock b/yarn.lock index eebde633be..3ad2307ee4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6513,10 +6513,10 @@ human-signals@^5.0.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== -husky@^9.1.3: - version "9.1.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.3.tgz#46cddff01f9a551f87b39accc67860bce5d00680" - integrity sha512-ET3TQmQgdIu0pt+jKkpo5oGyg/4MQZpG6xcam5J5JyNJV+CBT23OBpCF15bKHKycRyMH9k6ONy8g2HdGIsSkMQ== +husky@^9.1.4: + version "9.1.4" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.4.tgz#926fd19c18d345add5eab0a42b2b6d9a80259b34" + integrity sha512-bho94YyReb4JV7LYWRWxZ/xr6TtOTt8cMfmQ39MQYJ7f/YE268s3GdghGwi+y4zAeqewE5zYLvuhV0M0ijsDEA== i18next-browser-languagedetector@^8.0.0: version "8.0.0" From e6bc59615aa7272c77e78405656359824ea42f53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:55:45 +0200 Subject: [PATCH 019/321] yarn(deps-dev): bump stylelint from 16.7.0 to 16.8.0 (#4375) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 1ab1d0959e..f0e72bb10e 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "redux-mock-store": "^1.5.4", "resize-observer-polyfill": "^1.5.1", "sass": "^1.77.8", - "stylelint": "^16.7.0", + "stylelint": "^16.8.0", "stylelint-config-standard": "^36.0.1", "ts-jest": "^29.2.3", "typescript": "^5.4.5" diff --git a/yarn.lock b/yarn.lock index 3ad2307ee4..59604a578b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4448,10 +4448,10 @@ debug@2.6.9, debug@^2.6.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@~4.3.4: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.6, debug@~4.3.4: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" @@ -9282,10 +9282,10 @@ postcss-replace-overflow-wrap@^4.0.0: resolved "https://registry.yarnpkg.com/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz#d2df6bed10b477bf9c52fab28c568b4b29ca4319" integrity sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw== -postcss-resolve-nested-selector@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz#29ccbc7c37dedfac304e9fff0bf1596b3f6a0e4e" - integrity sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw== +postcss-resolve-nested-selector@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.4.tgz#0068767902fb40f0e6cd7b24faee4fa4bc14a5da" + integrity sha512-R6vHqZWgVnTAPq0C+xjyHfEZqfIYboCBVSy24MjxEDm+tIh1BU4O6o7DP7AA7kHzf136d+Qc5duI4tlpHjixDw== postcss-safe-parser@^7.0.0: version "7.0.0" @@ -9299,10 +9299,10 @@ postcss-selector-not@^6.0.1: dependencies: postcss-selector-parser "^6.0.10" -postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9, postcss-selector-parser@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz#49694cb4e7c649299fea510a29fa6577104bcf53" - integrity sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ== +postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9, postcss-selector-parser@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.1.tgz#5be94b277b8955904476a2400260002ce6c56e38" + integrity sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" @@ -9335,10 +9335,10 @@ postcss@^7.0.35: picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.3.5, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.39, postcss@^8.4.4: - version "8.4.39" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.39.tgz#aa3c94998b61d3a9c259efa51db4b392e1bde0e3" - integrity sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw== +postcss@^8.3.5, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.4, postcss@^8.4.40: + version "8.4.40" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.40.tgz#eb81f2a4dd7668ed869a6db25999e02e9ad909d8" + integrity sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q== dependencies: nanoid "^3.3.7" picocolors "^1.0.1" @@ -10886,10 +10886,10 @@ stylelint-config-standard@^36.0.1: dependencies: stylelint-config-recommended "^14.0.1" -stylelint@^16.7.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.7.0.tgz#5f6acf516aedecba7a6472ba0cc1ffc20e2be86b" - integrity sha512-Q1ATiXlz+wYr37a7TGsfvqYn2nSR3T/isw3IWlZQzFzCNoACHuGBb6xBplZXz56/uDRJHIygxjh7jbV/8isewA== +stylelint@^16.8.0: + version "16.8.0" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.8.0.tgz#6f225cbec00850e65137fd4bafd62a796d8ad9d3" + integrity sha512-Jjr40w3PXDiJVW6c9swLM0a1e0DgDm/XkFozc4XgAcREFas+/nchzmDmeVxazbzXgpDrwm+cW6W6iGtZqYUh+g== dependencies: "@csstools/css-parser-algorithms" "^2.7.1" "@csstools/css-tokenizer" "^2.4.1" @@ -10901,7 +10901,7 @@ stylelint@^16.7.0: cosmiconfig "^9.0.0" css-functions-list "^3.2.2" css-tree "^2.3.1" - debug "^4.3.5" + debug "^4.3.6" fast-glob "^3.3.2" fastest-levenshtein "^1.0.16" file-entry-cache "^9.0.0" @@ -10918,10 +10918,10 @@ stylelint@^16.7.0: micromatch "^4.0.7" normalize-path "^3.0.0" picocolors "^1.0.1" - postcss "^8.4.39" - postcss-resolve-nested-selector "^0.1.1" + postcss "^8.4.40" + postcss-resolve-nested-selector "^0.1.4" postcss-safe-parser "^7.0.0" - postcss-selector-parser "^6.1.0" + postcss-selector-parser "^6.1.1" postcss-value-parser "^4.2.0" resolve-from "^5.0.0" string-width "^4.2.3" From 7078d8d088120377fe1a241474daebe257411c08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:52:41 +0200 Subject: [PATCH 020/321] yarn(deps-dev): bump stylelint from 16.8.0 to 16.8.1 (#4378) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f0e72bb10e..7235e043ae 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "redux-mock-store": "^1.5.4", "resize-observer-polyfill": "^1.5.1", "sass": "^1.77.8", - "stylelint": "^16.8.0", + "stylelint": "^16.8.1", "stylelint-config-standard": "^36.0.1", "ts-jest": "^29.2.3", "typescript": "^5.4.5" diff --git a/yarn.lock b/yarn.lock index 59604a578b..dd55bdf286 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10886,10 +10886,10 @@ stylelint-config-standard@^36.0.1: dependencies: stylelint-config-recommended "^14.0.1" -stylelint@^16.8.0: - version "16.8.0" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.8.0.tgz#6f225cbec00850e65137fd4bafd62a796d8ad9d3" - integrity sha512-Jjr40w3PXDiJVW6c9swLM0a1e0DgDm/XkFozc4XgAcREFas+/nchzmDmeVxazbzXgpDrwm+cW6W6iGtZqYUh+g== +stylelint@^16.8.1: + version "16.8.1" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.8.1.tgz#7d4b2d7922771dd0514446a66f04e954f1dfa444" + integrity sha512-O8aDyfdODSDNz/B3gW2HQ+8kv8pfhSu7ZR7xskQ93+vI6FhKKGUJMQ03Ydu+w3OvXXE0/u4hWU4hCPNOyld+OA== dependencies: "@csstools/css-parser-algorithms" "^2.7.1" "@csstools/css-tokenizer" "^2.4.1" From 8d6789777fe4d089887e55cf06fa9c65a5d7427a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:53:39 +0200 Subject: [PATCH 021/321] yarn(deps-dev): bump i18next-fs-backend from 2.3.1 to 2.3.2 (#4380) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7235e043ae..d44d47fd8f 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "eslint-plugin-react-hooks": "4.6.2", "hash-files": "^1.1.1", "husky": "^9.1.4", - "i18next-fs-backend": "^2.3.1", + "i18next-fs-backend": "^2.3.2", "lint-staged": "^15.2.7", "prettier": "^3.3.3", "react-dnd-test-backend": "^15.1.2", diff --git a/yarn.lock b/yarn.lock index dd55bdf286..6520451564 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6525,10 +6525,10 @@ i18next-browser-languagedetector@^8.0.0: dependencies: "@babel/runtime" "^7.23.2" -i18next-fs-backend@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/i18next-fs-backend/-/i18next-fs-backend-2.3.1.tgz#0c7d2459ff4a039e2b3228131809fbc0e74ff1a8" - integrity sha512-tvfXskmG/9o+TJ5Fxu54sSO5OkY6d+uMn+K6JiUGLJrwxAVfer+8V3nU8jq3ts9Pe5lXJv4b1N7foIjJ8Iy2Gg== +i18next-fs-backend@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/i18next-fs-backend/-/i18next-fs-backend-2.3.2.tgz#580b91c9a306b452112e0a1ad3b07e9fd266e567" + integrity sha512-LIwUlkqDZnUI8lnUxBnEj8K/FrHQTT/Sc+1rvDm9E8YvvY5YxzoEAASNx+W5M9DfD5s77lI5vSAFWeTp26B/3Q== i18next@^21.0.1: version "21.10.0" From 85946dcd706b57d1901e4230f91e648c4a16eb5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:54:42 +0200 Subject: [PATCH 022/321] yarn(deps): bump @react-hook/resize-observer from 2.0.1 to 2.0.2 (#4379) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index d44d47fd8f..d79e76cf06 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@dnd-kit/sortable": "^8.0.0", "@dnd-kit/utilities": "^3.2.2", "@fontsource/raleway": "^5.0.19", - "@react-hook/resize-observer": "^2.0.1", + "@react-hook/resize-observer": "^2.0.2", "@react-spring/web": "^9.7.4", "@reduxjs/toolkit": "^1.9.7", "avataaars": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 6520451564..775a3812ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1783,11 +1783,6 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@juggle/resize-observer@^3.3.1": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60" - integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA== - "@leichtgewicht/ip-codec@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" @@ -1861,12 +1856,11 @@ resolved "https://registry.yarnpkg.com/@react-hook/passive-layout-effect/-/passive-layout-effect-1.2.1.tgz#c06dac2d011f36d61259aa1c6df4f0d5e28bc55e" integrity sha512-IwEphTD75liO8g+6taS+4oqz+nnroocNfWVHWz7j+N+ZO2vYrc6PV1q7GQhuahL0IOR7JccFTsFKQ/mb6iZWAg== -"@react-hook/resize-observer@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@react-hook/resize-observer/-/resize-observer-2.0.1.tgz#b1b090be25c74d89b371183e5e2bc0d03f94986f" - integrity sha512-9PCX9grWfxdPizY8ohr+X4IkV1JhGMWr2Nm4ngbg6IcAIv0WBs7YoJcNBqYl22OqPHr5eOMItGcStZrmj2mbmQ== +"@react-hook/resize-observer@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@react-hook/resize-observer/-/resize-observer-2.0.2.tgz#f49fe4e6b9de86c583d136df7fae430684528092" + integrity sha512-tzKKzxNpfE5TWmxuv+5Ae3IF58n0FQgQaWJmcbYkjXTRZATXxClnTprQ2uuYygYTpu1pqbBskpwMpj6jpT1djA== dependencies: - "@juggle/resize-observer" "^3.3.1" "@react-hook/latest" "^1.0.2" "@react-hook/passive-layout-effect" "^1.2.0" From 86db11a395d1fc7f0c8f820f7181f4949ba11c2e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:23:33 +0200 Subject: [PATCH 023/321] yarn(deps-dev): bump cypress from 13.13.1 to 13.13.2 (#4381) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index d79e76cf06..70c9e7f97b 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "cross-env": "^7.0.3", - "cypress": "^13.13.1", + "cypress": "^13.13.2", "eslint": "^8.57.0", "eslint-config-airbnb": "19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", diff --git a/yarn.lock b/yarn.lock index 775a3812ea..2a777dbed5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1339,7 +1339,7 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz#63085d2995ca0f0e55aa8b8a07d69bfd48b844fe" integrity sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA== -"@cypress/request@^3.0.0": +"@cypress/request@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960" integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ== @@ -4334,12 +4334,12 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== -cypress@^13.13.1: - version "13.13.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.13.1.tgz#860c1142a6e58ea412a764f0ce6ad07567721129" - integrity sha512-8F9UjL5MDUdgC/S5hr8CGLHbS5gGht5UOV184qc2pFny43fnkoaKxlzH/U6//zmGu/xRTaKimNfjknLT8+UDFg== +cypress@^13.13.2: + version "13.13.2" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.13.2.tgz#c71f8d92056c430b1b879e5313f6de25ccce0eda" + integrity sha512-PvJQU33933NvS1StfzEb8/mu2kMy4dABwCF+yd5Bi7Qly1HOVf+Bufrygee/tlmty/6j5lX+KIi8j9Q3JUMbhA== dependencies: - "@cypress/request" "^3.0.0" + "@cypress/request" "^3.0.1" "@cypress/xvfb" "^1.2.4" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" From 13ae69b5cac7bb21e5d8b0cd55ead817cb70978a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:23:52 +0200 Subject: [PATCH 024/321] yarn(deps-dev): bump @types/node from 22.0.0 to 22.0.2 (#4382) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 70c9e7f97b..b47b16276d 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.12", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.0.0", + "@types/node": "^22.0.2", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index 2a777dbed5..6aa16f983a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2374,10 +2374,10 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^22.0.0": - version "22.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" - integrity sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw== +"@types/node@*", "@types/node@^22.0.2": + version "22.0.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.2.tgz#9fb1a2b31970871e8bf696f0e8a40d2e6d2bd04e" + integrity sha512-yPL6DyFwY5PiMVEwymNeqUTKsDczQBJ/5T7W/46RwLU/VH+AA8aT5TZkvBviLKLbbm0hlfftEkGrNzfRk/fofQ== dependencies: undici-types "~6.11.1" From f4423e651c33c9d1806fa0c077bdebbc8de542b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 09:26:17 +0200 Subject: [PATCH 025/321] build(deps): bump github.com/docker/docker from 24.0.9+incompatible to 26.1.4+incompatible in /server/src (#4377) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Benedict Homuth --- server/src/go.mod | 12 ++++++++---- server/src/go.sum | 37 ++++++++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/server/src/go.mod b/server/src/go.mod index c301bbd653..fddf1fecb1 100644 --- a/server/src/go.mod +++ b/server/src/go.mod @@ -34,6 +34,7 @@ require ( require ( cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect + dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.3.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect @@ -46,11 +47,13 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/docker/cli v20.10.17+incompatible // indirect - github.com/docker/docker v24.0.9+incompatible // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/cli v27.1.1+incompatible // indirect + github.com/docker/docker v27.1.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/fatih/color v1.16.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0 // indirect github.com/goccy/go-json v0.10.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.2 // indirect @@ -61,7 +64,6 @@ require ( github.com/gorilla/sessions v1.2.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/klauspost/compress v1.17.2 // indirect github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect @@ -75,7 +77,7 @@ require ( github.com/markbates/going v1.0.3 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/term v0.5.0 // indirect github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect @@ -94,6 +96,8 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.10.0 // indirect golang.org/x/mod v0.17.0 // indirect diff --git a/server/src/go.sum b/server/src/go.sum index acd6c15f31..d447919481 100644 --- a/server/src/go.sum +++ b/server/src/go.sum @@ -3,6 +3,8 @@ cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzc cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= @@ -37,18 +39,20 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dhui/dktest v0.4.1 h1:/w+IWuDXVymg3IrRJCHHOkMK10m9aNVMOyD0X12YVTg= github.com/dhui/dktest v0.4.1/go.mod h1:DdOqcUpL7vgyP4GlF3X3w7HbSlz8cEQzwewPveYEQbA= -github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= -github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= -github.com/docker/docker v24.0.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2oNn0GkeZE= +github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -62,10 +66,16 @@ github.com/go-chi/jwtauth/v5 v5.1.1 h1:Pjixqu5YkjE9sCLpzE01L0Q4sQzJIPdo7uz9r8ftp github.com/go-chi/jwtauth/v5 v5.1.1/go.mod h1:CYP1WSbzD4MPuKCr537EM3kfFhSQgpUEtMJFuYJjqWU= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= +github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= @@ -107,8 +117,6 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -147,8 +155,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -232,6 +240,14 @@ github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBi github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -362,7 +378,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From fc4d70c7fb4a53e69638e4d05470507838bc361b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 10:31:28 +0200 Subject: [PATCH 026/321] yarn(deps-dev): bump ts-jest from 29.2.3 to 29.2.4 (#4384) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b47b16276d..5f751ed158 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "sass": "^1.77.8", "stylelint": "^16.8.1", "stylelint-config-standard": "^36.0.1", - "ts-jest": "^29.2.3", + "ts-jest": "^29.2.4", "typescript": "^5.4.5" }, "scripts": { diff --git a/yarn.lock b/yarn.lock index 6aa16f983a..f3e0c254ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11252,10 +11252,10 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -ts-jest@^29.2.3: - version "29.2.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.3.tgz#3d226ac36b8b820151a38f164414f9f6b412131f" - integrity sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ== +ts-jest@^29.2.4: + version "29.2.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.4.tgz#38ccf487407d7a63054a72689f6f99b075e296e5" + integrity sha512-3d6tgDyhCI29HlpwIq87sNuI+3Q6GLTTCeYRHCs7vDz+/3GCMwEtV9jezLyl4ZtnBgx00I7hm8PCP8cTksMGrw== dependencies: bs-logger "0.x" ejs "^3.1.10" From f44d5f974067a0b723c2f633ae8425121eea090e Mon Sep 17 00:00:00 2001 From: Elisabeth Kletsko Date: Mon, 5 Aug 2024 07:56:25 +0200 Subject: [PATCH 027/321] test: service test for UpdateVoting (#4335) Co-authored-by: Mateo --- server/src/services/votings/votings.go | 1 - server/src/services/votings/votings_test.go | 102 +++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/server/src/services/votings/votings.go b/server/src/services/votings/votings.go index 4def1091b4..8e5e41a6a8 100644 --- a/server/src/services/votings/votings.go +++ b/server/src/services/votings/votings.go @@ -31,7 +31,6 @@ type DB interface { GetVotes(f filter.VoteFilter) ([]database.Vote, error) AddVote(board, user, note uuid.UUID) (database.Vote, error) RemoveVote(board, user, note uuid.UUID) error - GetNotes(board uuid.UUID, columns ...uuid.UUID) ([]database.Note, error) } diff --git a/server/src/services/votings/votings_test.go b/server/src/services/votings/votings_test.go index 879c2b22f9..15c9ff4e20 100644 --- a/server/src/services/votings/votings_test.go +++ b/server/src/services/votings/votings_test.go @@ -2,7 +2,11 @@ package votings import ( "context" + "errors" + "math/rand/v2" + "scrumlr.io/server/common" "testing" + "time" "github.com/google/uuid" "github.com/stretchr/testify/assert" @@ -117,9 +121,9 @@ func (suite *votingServiceTestSuite) TestCreate() { mock.On("CreateVoting", database.VotingInsert{ Status: types.VotingStatusOpen, }).Return(database.Voting{}, nil) + mock.On("GetVoting", boardId, votingId).Return(database.Voting{}, []database.Vote{}, nil) rtClientMock.On("Publish", publishSubject, publishEvent).Return(nil) - create, err := s.Create(context.Background(), votingRequest) assert.NotNil(suite.T(), create) @@ -127,3 +131,99 @@ func (suite *votingServiceTestSuite) TestCreate() { mock.AssertExpectations(suite.T()) rtClientMock.AssertExpectations(suite.T()) } + +func (suite *votingServiceTestSuite) TestUpdateVoting() { + boardId := uuid.New() + votingID := uuid.New() + voteLimit := rand.IntN(10) + voting := database.Voting{ + ID: votingID, + Board: boardId, + CreatedAt: time.Now(), + VoteLimit: voteLimit, + AllowMultipleVotes: false, + ShowVotesOfOthers: false, + Status: types.VotingStatusClosed, + } + tests := []struct { + name string + err error + votingStatus types.VotingStatus + voting database.Voting + update *dto.Voting + }{ + { + name: "Voting status open", + err: common.BadRequestError(errors.New("not allowed ot change to open state")), + votingStatus: types.VotingStatusOpen, + voting: database.Voting{}, + update: nil, + }, + { + name: "Voting status closed", + err: nil, + votingStatus: types.VotingStatusClosed, + voting: voting, + update: new(dto.Voting).From(voting, nil), + }, + } + + for _, tt := range tests { + + suite.Run(tt.name, func() { + s := new(VotingService) + mock := new(DBMock) + s.database = mock + + rtClientMock := &mockRtClient{} + rtMock := &realtime.Broker{ + Con: rtClientMock, + } + s.realtime = rtMock + + updateVotingRequest := dto.VotingUpdateRequest{ + ID: votingID, + Board: boardId, + Status: tt.votingStatus, + } + + // Mocks for realtime + publishSubject := "board." + boardId.String() + publishEvent := realtime.BoardEvent{ + Type: realtime.BoardEventVotingUpdated, + Data: struct { + Voting *dto.Voting `json:"voting"` + Notes []*dto.Note `json:"notes"` + }{ + Voting: &dto.Voting{}, + Notes: nil, + }, + } + + if tt.votingStatus == types.VotingStatusClosed { + mock.On("UpdateVoting", database.VotingUpdate{ + ID: votingID, + Board: boardId, + Status: tt.votingStatus, + }).Return(tt.voting, tt.err) + + mock.On("GetVotes", filter.VoteFilter{ + Board: boardId, + Voting: &votingID, + }).Return([]database.Vote{}, nil) + + mock.On("GetVoting", boardId, votingID).Return(database.Voting{}, []database.Vote{}, nil) + + rtClientMock.On("Publish", publishSubject, publishEvent).Return(nil) + } + + update, err := s.Update(context.Background(), updateVotingRequest) + + assert.Equal(suite.T(), tt.err, err) + assert.Equal(suite.T(), update, tt.update) + mock.AssertExpectations(suite.T()) + rtClientMock.AssertExpectations(suite.T()) + + }) + } +} From 1d80d68a3f9affa4036bf1fef59186eee66a9a6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 22:32:11 +0200 Subject: [PATCH 028/321] yarn(deps-dev): bump eslint-plugin-jest from 28.6.0 to 28.7.0 (#4390) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 79 ++++++++++++++++++++++------------------------------ 2 files changed, 34 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 5f751ed158..760ce50573 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-css-modules": "^2.12.0", "eslint-plugin-import": "2.29.1", - "eslint-plugin-jest": "^28.6.0", + "eslint-plugin-jest": "^28.7.0", "eslint-plugin-jsx-a11y": "6.9.0", "eslint-plugin-only-warn": "^1.1.0", "eslint-plugin-prettier": "^5.2.1", diff --git a/yarn.lock b/yarn.lock index f3e0c254ed..59c6987447 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2354,11 +2354,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== -"@types/json-schema@^7.0.15": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -2464,11 +2459,6 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.1.tgz#0480eeb7221eb9bc398ad7432c9d7e14b1a5a367" integrity sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg== -"@types/semver@^7.5.8": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/send@*": version "0.17.1" resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301" @@ -2614,13 +2604,13 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz#bb19096d11ec6b87fb6640d921df19b813e02047" - integrity sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g== +"@typescript-eslint/scope-manager@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.0.0.tgz#d14df46c9e43c53af7699dfa800cd615d7dfc118" + integrity sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw== dependencies: - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/visitor-keys" "7.8.0" + "@typescript-eslint/types" "8.0.0" + "@typescript-eslint/visitor-keys" "8.0.0" "@typescript-eslint/type-utils@5.62.0": version "5.62.0" @@ -2637,10 +2627,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.8.0.tgz#1fd2577b3ad883b769546e2d1ef379f929a7091d" - integrity sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw== +"@typescript-eslint/types@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.0.0.tgz#7195ea9369fe5ee46b958d7ffca6bd26511cce18" + integrity sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -2655,13 +2645,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz#b028a9226860b66e623c1ee55cc2464b95d2987c" - integrity sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg== +"@typescript-eslint/typescript-estree@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.0.0.tgz#d172385ced7cb851a038b5c834c245a97a0f9cf6" + integrity sha512-5b97WpKMX+Y43YKi4zVcCVLtK5F98dFls3Oxui8LbnmRsseKenbbDinmvxrWegKDMmlkIq/XHuyy0UGLtpCDKg== dependencies: - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/visitor-keys" "7.8.0" + "@typescript-eslint/types" "8.0.0" + "@typescript-eslint/visitor-keys" "8.0.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -2683,18 +2673,15 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@^6.0.0 || ^7.0.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.8.0.tgz#57a79f9c0c0740ead2f622e444cfaeeb9fd047cd" - integrity sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ== +"@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.0.0.tgz#1794d6f4b37ec253172a173dc938ae68651b9b99" + integrity sha512-k/oS/A/3QeGLRvOWCg6/9rATJL5rec7/5s1YmdS0ZU6LHveJyGFwBvLhSRBv6i9xaj7etmosp+l+ViN1I9Aj/Q== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.15" - "@types/semver" "^7.5.8" - "@typescript-eslint/scope-manager" "7.8.0" - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/typescript-estree" "7.8.0" - semver "^7.6.0" + "@typescript-eslint/scope-manager" "8.0.0" + "@typescript-eslint/types" "8.0.0" + "@typescript-eslint/typescript-estree" "8.0.0" "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" @@ -2704,12 +2691,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz#7285aab991da8bee411a42edbd5db760d22fdd91" - integrity sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA== +"@typescript-eslint/visitor-keys@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.0.tgz#224a67230190d267e6e78586bd7d8dfbd32ae4f3" + integrity sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA== dependencies: - "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/types" "8.0.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -5283,12 +5270,12 @@ eslint-plugin-jest@^25.3.0: dependencies: "@typescript-eslint/experimental-utils" "^5.0.0" -eslint-plugin-jest@^28.6.0: - version "28.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.6.0.tgz#8410588d60bcafa68a91b6ec272e4a415502302a" - integrity sha512-YG28E1/MIKwnz+e2H7VwYPzHUYU4aMa19w0yGcwXnnmJH6EfgHahTJ2un3IyraUxNfnz/KUhJAFXNNwWPo12tg== +eslint-plugin-jest@^28.7.0: + version "28.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.7.0.tgz#8ff262c26520242492f85f9268995bbf624758a4" + integrity sha512-fzPGN7awL2ftVRQh/bsCi+16ArUZWujZnD1b8EGJqy8nr4//7tZ3BIdc/9edcJBtB3hpci3GtdMNFVDwHU0Eag== dependencies: - "@typescript-eslint/utils" "^6.0.0 || ^7.0.0" + "@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0" eslint-plugin-jsx-a11y@6.9.0, eslint-plugin-jsx-a11y@^6.5.1: version "6.9.0" From 7df91d10820b0469ee3e929f1386b4e82e4c52d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 22:32:45 +0200 Subject: [PATCH 029/321] yarn(deps): bump react-tooltip from 5.27.1 to 5.28.0 (#4388) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 760ce50573..460553d524 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "react-router-dom": "^6.23.1", "react-to-print": "^2.15.1", "react-toastify": "^10.0.5", - "react-tooltip": "^5.27.1", + "react-tooltip": "^5.28.0", "sockette": "^2.0.6", "underscore": "^1.13.7", "use-long-press": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index 59c6987447..3a7247638e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9758,10 +9758,10 @@ react-toastify@^10.0.5: dependencies: clsx "^2.1.0" -react-tooltip@^5.27.1: - version "5.27.1" - resolved "https://registry.yarnpkg.com/react-tooltip/-/react-tooltip-5.27.1.tgz#a94481ba146d828d31642f14d6ab29b56998fcda" - integrity sha512-a+micPXcMOMt11CYlwJD4XShcqGziasHco4NPe1OFw298WBTILMyzUgNC1LAFViAe791JdHNVSJIpzhZm2MvDA== +react-tooltip@^5.28.0: + version "5.28.0" + resolved "https://registry.yarnpkg.com/react-tooltip/-/react-tooltip-5.28.0.tgz#c7b5343ab2d740a428494a3d8315515af1f26f46" + integrity sha512-R5cO3JPPXk6FRbBHMO0rI9nkUG/JKfalBSQfZedZYzmqaZQgq7GLzF8vcCWx6IhUCKg0yPqJhXIzmIO5ff15xg== dependencies: "@floating-ui/dom" "^1.6.1" classnames "^2.3.0" From 2c6765b5f6c7b34546b3819bd1b2c1b71c599a88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 20:33:20 +0000 Subject: [PATCH 030/321] yarn(deps-dev): bump @types/node from 22.0.2 to 22.1.0 (#4389) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 460553d524..4dd7b63923 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.12", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.0.2", + "@types/node": "^22.1.0", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index 3a7247638e..eddb979a23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2369,12 +2369,12 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^22.0.2": - version "22.0.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.2.tgz#9fb1a2b31970871e8bf696f0e8a40d2e6d2bd04e" - integrity sha512-yPL6DyFwY5PiMVEwymNeqUTKsDczQBJ/5T7W/46RwLU/VH+AA8aT5TZkvBviLKLbbm0hlfftEkGrNzfRk/fofQ== +"@types/node@*", "@types/node@^22.1.0": + version "22.1.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.1.0.tgz#6d6adc648b5e03f0e83c78dc788c2b037d0ad94b" + integrity sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw== dependencies: - undici-types "~6.11.1" + undici-types "~6.13.0" "@types/parse-json@^4.0.0": version "4.0.0" @@ -11460,10 +11460,10 @@ underscore@1.x.x, underscore@^1.13.7, underscore@^1.8.3: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== -undici-types@~6.11.1: - version "6.11.1" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.11.1.tgz#432ea6e8efd54a48569705a699e62d8f4981b197" - integrity sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ== +undici-types@~6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.13.0.tgz#e3e79220ab8c81ed1496b5812471afd7cf075ea5" + integrity sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" From 2394b1f4dbefd40830b0f41fa74ccd5a599002c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 22:40:34 +0200 Subject: [PATCH 031/321] yarn(deps-dev): bump lint-staged from 15.2.7 to 15.2.8 (#4387) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 123 +++++++++++++++++++++++++++++---------------------- 2 files changed, 71 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index 4dd7b63923..6c04875a82 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "hash-files": "^1.1.1", "husky": "^9.1.4", "i18next-fs-backend": "^2.3.2", - "lint-staged": "^15.2.7", + "lint-staged": "^15.2.8", "prettier": "^3.3.3", "react-dnd-test-backend": "^15.1.2", "react-dnd-test-utils": "^15.1.2", diff --git a/yarn.lock b/yarn.lock index eddb979a23..3224dbe42a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2970,12 +2970,12 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: dependencies: type-fest "^0.21.3" -ansi-escapes@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-6.2.0.tgz#8a13ce75286f417f1963487d86ba9f90dccf9947" - integrity sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw== +ansi-escapes@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-7.0.0.tgz#00fc19f491bbb18e1d481b97868204f92109bfe7" + integrity sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw== dependencies: - type-fest "^3.0.0" + environment "^1.0.0" ansi-html-community@^0.0.8: version "0.0.8" @@ -3801,12 +3801,12 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" - integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== +cli-cursor@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-5.0.0.tgz#24a4831ecf5a6b01ddeb32fb71a4b2088b0dce38" + integrity sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw== dependencies: - restore-cursor "^4.0.0" + restore-cursor "^5.0.0" cli-table3@~0.6.1: version "0.6.5" @@ -4429,7 +4429,7 @@ debug@2.6.9, debug@^2.6.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.6, debug@~4.3.4: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.6, debug@~4.3.6: version "4.3.6" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== @@ -4845,6 +4845,11 @@ env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== +environment@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/environment/-/environment-1.1.0.tgz#8e86c66b180f363c7ab311787e0259665f45a9f1" + integrity sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -7843,10 +7848,10 @@ lilconfig@^2.0.3, lilconfig@^2.0.5, lilconfig@^2.1.0: resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== -lilconfig@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.1.tgz#9d8a246fa753106cfc205fd2d77042faca56e5e3" - integrity sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ== +lilconfig@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.2.tgz#e4a7c3cb549e3a606c8dcc32e5ae1005e62c05cb" + integrity sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow== line-height@^0.3.1: version "0.3.1" @@ -7870,21 +7875,21 @@ linkifyjs@^4.1.3: resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-4.1.3.tgz#0edbc346428a7390a23ea2e5939f76112c9ae07f" integrity sha512-auMesunaJ8yfkHvK4gfg1K0SaKX/6Wn9g2Aac/NwX+l5VdmFZzo/hdPGxEOETj+ryRa4/fiOPjeeKURSAJx1sg== -lint-staged@^15.2.7: - version "15.2.7" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.7.tgz#97867e29ed632820c0fb90be06cd9ed384025649" - integrity sha512-+FdVbbCZ+yoh7E/RosSdqKJyUM2OEjTciH0TFNkawKgvFp1zbGlEC39RADg+xKBG1R4mhoH2j85myBQZ5wR+lw== +lint-staged@^15.2.8: + version "15.2.8" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.8.tgz#5e19eb7b4dbb922f56fafb4635b44ee3c92f7322" + integrity sha512-PUWFf2zQzsd9EFU+kM1d7UP+AZDbKFKuj+9JNVTBkhUFhbg4MAt6WfyMMwBfM4lYqd4D2Jwac5iuTu9rVj4zCQ== dependencies: chalk "~5.3.0" commander "~12.1.0" - debug "~4.3.4" + debug "~4.3.6" execa "~8.0.1" - lilconfig "~3.1.1" - listr2 "~8.2.1" + lilconfig "~3.1.2" + listr2 "~8.2.4" micromatch "~4.0.7" pidtree "~0.6.0" string-argv "~0.3.2" - yaml "~2.4.2" + yaml "~2.5.0" listr2@^3.8.3: version "3.14.0" @@ -7900,16 +7905,16 @@ listr2@^3.8.3: through "^2.3.8" wrap-ansi "^7.0.0" -listr2@~8.2.1: - version "8.2.1" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.2.1.tgz#06a1a6efe85f23c5324180d7c1ddbd96b5eefd6d" - integrity sha512-irTfvpib/rNiD637xeevjO2l3Z5loZmuaRi0L0YE5LfijwVY96oyVn0DFD3o/teAok7nfobMG1THvvcHh/BP6g== +listr2@~8.2.4: + version "8.2.4" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.2.4.tgz#486b51cbdb41889108cb7e2c90eeb44519f5a77f" + integrity sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g== dependencies: cli-truncate "^4.0.0" colorette "^2.0.20" eventemitter3 "^5.0.1" - log-update "^6.0.0" - rfdc "^1.3.1" + log-update "^6.1.0" + rfdc "^1.4.1" wrap-ansi "^9.0.0" loader-runner@^4.2.0: @@ -8026,14 +8031,14 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" -log-update@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-6.0.0.tgz#0ddeb7ac6ad658c944c1de902993fce7c33f5e59" - integrity sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw== +log-update@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-6.1.0.tgz#1a04ff38166f94647ae1af562f4bd6a15b1b7cd4" + integrity sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w== dependencies: - ansi-escapes "^6.2.0" - cli-cursor "^4.0.0" - slice-ansi "^7.0.0" + ansi-escapes "^7.0.0" + cli-cursor "^5.0.0" + slice-ansi "^7.1.0" strip-ansi "^7.1.0" wrap-ansi "^9.0.0" @@ -8200,6 +8205,11 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== +mimic-function@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.1.tgz#acbe2b3349f99b9deaca7fb70e48b83e94e67076" + integrity sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -8523,6 +8533,13 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +onetime@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-7.0.0.tgz#9f16c92d8c9ef5120e3acd9dd9957cceecc1ab60" + integrity sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ== + dependencies: + mimic-function "^5.0.0" + open@^8.0.9, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -10049,13 +10066,13 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" -restore-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" - integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== +restore-cursor@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-5.1.0.tgz#0766d95699efacb14150993f55baf0953ea1ebe7" + integrity sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA== dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" + onetime "^7.0.0" + signal-exit "^4.1.0" retry@^0.13.1: version "0.13.1" @@ -10067,11 +10084,16 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rfdc@^1.3.0, rfdc@^1.3.1: +rfdc@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== +rfdc@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" + integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== + rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -10455,7 +10477,7 @@ slice-ansi@^5.0.0: ansi-styles "^6.0.0" is-fullwidth-code-point "^4.0.0" -slice-ansi@^7.0.0: +slice-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-7.1.0.tgz#cd6b4655e298a8d1bdeb04250a433094b347b9a9" integrity sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg== @@ -11325,11 +11347,6 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -type-fest@^3.0.0: - version "3.13.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.13.1.tgz#bb744c1f0678bea7543a2d1ec24e83e68e8c8706" - integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== - type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -12209,10 +12226,10 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yaml@^2.1.1, yaml@~2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.2.tgz#7a2b30f2243a5fc299e1f14ca58d475ed4bc5362" - integrity sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA== +yaml@^2.1.1, yaml@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.0.tgz#c6165a721cf8000e91c36490a41d7be25176cf5d" + integrity sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw== yargs-parser@^18.1.2: version "18.1.3" From 77d243004fa654b561dc3bcd349d18e75be22fc4 Mon Sep 17 00:00:00 2001 From: Elisabeth Kletsko Date: Wed, 7 Aug 2024 10:25:07 +0200 Subject: [PATCH 032/321] fix(emoji-suggestion): fix emoji suggestion overlay (#4391) --- src/components/Column/Column.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Column/Column.scss b/src/components/Column/Column.scss index 45573ee433..67a1282271 100644 --- a/src/components/Column/Column.scss +++ b/src/components/Column/Column.scss @@ -49,6 +49,7 @@ } .column__header { + z-index: $base-z-index; display: flex; flex-direction: column; padding: 0 $spacing--xl; From b40bd12f82135c412fef9e62178104ca089e7e14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:14:54 +0200 Subject: [PATCH 033/321] yarn(deps): bump marked from 13.0.3 to 14.0.0 (#4393) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6c04875a82..f3b5e900d8 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "js-cookie": "^3.0.5", "linkify-react": "^4.1.3", "linkifyjs": "^4.1.3", - "marked": "13.0.3", + "marked": "14.0.0", "plausible-tracker": "^0.3.9", "qrcode.react": "^3.1.0", "query-string": "^9.1.0", diff --git a/yarn.lock b/yarn.lock index 3224dbe42a..ed32f613bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8108,10 +8108,10 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" -marked@13.0.3: - version "13.0.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-13.0.3.tgz#5c5b4a5d0198060c7c9bc6ef9420a7fed30f822d" - integrity sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA== +marked@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-14.0.0.tgz#79a1477358a59e0660276f8fec76de2c33f35d83" + integrity sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ== mathml-tag-names@^2.1.3: version "2.1.3" From 7c1d301b7c681828570bda4258c81762daaaa7c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:15:08 +0200 Subject: [PATCH 034/321] go(deps): bump golang.org/x/crypto from 0.25.0 to 0.26.0 in /server/src (#4394) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/src/go.mod | 8 ++++---- server/src/go.sum | 15 ++++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/server/src/go.mod b/server/src/go.mod index fddf1fecb1..1bc6b6a942 100644 --- a/server/src/go.mod +++ b/server/src/go.mod @@ -28,7 +28,7 @@ require ( github.com/urfave/cli/v2 v2.27.3 github.com/weppos/publicsuffix-go v0.40.2 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.25.0 + golang.org/x/crypto v0.26.0 ) require ( @@ -103,9 +103,9 @@ require ( golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.27.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.33.0 // indirect diff --git a/server/src/go.sum b/server/src/go.sum index d447919481..b4dc044a0d 100644 --- a/server/src/go.sum +++ b/server/src/go.sum @@ -265,8 +265,9 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -302,8 +303,9 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -323,8 +325,9 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -335,8 +338,9 @@ golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -348,8 +352,9 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= From d26b6451b1b0e45d8f2cadd289ac11ab383fd11f Mon Sep 17 00:00:00 2001 From: Jakob Schwehn Date: Wed, 7 Aug 2024 13:56:45 +0200 Subject: [PATCH 035/321] refactor: avatar settings (#4270) --- src/components/Avatar/Avatar.tsx | 33 +----- src/components/BoardUsers/UserAvatar.tsx | 3 +- .../NoteDialogComponents/NoteDialogNote.tsx | 2 +- .../NoteDialogNoteHeader.tsx | 2 +- .../Components/AvatarSettings.tsx | 112 ++++++------------ .../Avatar/types.ts => constants/avatar.ts} | 31 +++++ src/routes/StackView/StackView.tsx | 2 +- src/store/action/auth.ts | 2 +- src/types/auth.ts | 2 +- src/types/avatar.ts | 42 +++++++ 10 files changed, 122 insertions(+), 109 deletions(-) rename src/{components/Avatar/types.ts => constants/avatar.ts} (71%) create mode 100644 src/types/avatar.ts diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx index b400ad0b28..df65fad085 100644 --- a/src/components/Avatar/Avatar.tsx +++ b/src/components/Avatar/Avatar.tsx @@ -4,7 +4,6 @@ import _ from "underscore"; import {hashCode} from "utils/hash"; import "./Avatar.scss"; import classNames from "classnames"; -import {getColorClassName, getColorForIndex} from "../../constants/colors"; import { AVATAR_ACCESSORIES_TYPES, AVATAR_CLOTHE_COLORS, @@ -18,35 +17,9 @@ import { AVATAR_MOUTH_TYPES, AVATAR_SKIN_COLORS, AVATAR_TOP_TYPES, - AvatarAccessoriesType, - AvatarClotheColor, - AvatarClotheType, - AvatarEyebrowType, - AvatarEyeType, - AvatarFacialHairColor, - AvatarFacialHairType, - AvatarGraphicType, - AvatarHairColor, - AvatarMouthType, - AvatarSkinColor, - AvatarTopType, -} from "./types"; - -export interface AvataaarProps { - accentColorClass: string; - skinColor: AvatarSkinColor; - topType: AvatarTopType; - clotheColor: AvatarClotheColor; - graphicType: AvatarGraphicType; - clotheType: AvatarClotheType; - hairColor: AvatarHairColor; - facialHairColor: AvatarFacialHairColor; - facialHairType: AvatarFacialHairType; - accessoriesType: AvatarAccessoriesType; - eyeType: AvatarEyeType; - eyebrowType: AvatarEyebrowType; - mouthType: AvatarMouthType; -} +} from "constants/avatar"; +import {AvataaarProps} from "types/avatar"; +import {getColorClassName, getColorForIndex} from "../../constants/colors"; export type AvatarProps = { seed: string; diff --git a/src/components/BoardUsers/UserAvatar.tsx b/src/components/BoardUsers/UserAvatar.tsx index 6fadff3600..0f12614290 100644 --- a/src/components/BoardUsers/UserAvatar.tsx +++ b/src/components/BoardUsers/UserAvatar.tsx @@ -1,7 +1,8 @@ import {useEffect, useState, useRef} from "react"; import classNames from "classnames"; import {CheckDone, RaiseHand} from "components/Icon"; -import {AvataaarProps, Avatar} from "../Avatar"; +import {AvataaarProps} from "types/avatar"; +import {Avatar} from "../Avatar"; import {Badge} from "../Badge"; import "./UserAvatar.scss"; diff --git a/src/components/NoteDialogComponents/NoteDialogNote.tsx b/src/components/NoteDialogComponents/NoteDialogNote.tsx index ab6f0ff625..2cd9a2fed4 100644 --- a/src/components/NoteDialogComponents/NoteDialogNote.tsx +++ b/src/components/NoteDialogComponents/NoteDialogNote.tsx @@ -1,6 +1,6 @@ import classNames from "classnames"; import {FC} from "react"; -import {AvataaarProps} from "components/Avatar"; +import {AvataaarProps} from "types/avatar"; import {Participant} from "types/participant"; import {useAppSelector} from "store"; import {NoteDialogNoteComponents} from "./NoteDialogNoteComponents"; diff --git a/src/components/NoteDialogComponents/NoteDialogNoteComponents/NoteDialogNoteHeader.tsx b/src/components/NoteDialogComponents/NoteDialogNoteComponents/NoteDialogNoteHeader.tsx index b30d607679..c33cad8d8c 100644 --- a/src/components/NoteDialogComponents/NoteDialogNoteComponents/NoteDialogNoteHeader.tsx +++ b/src/components/NoteDialogComponents/NoteDialogNoteComponents/NoteDialogNoteHeader.tsx @@ -1,8 +1,8 @@ import {NoteAuthorList} from "components/Note/NoteAuthorList/NoteAuthorList"; import {Participant} from "types/participant"; import {useAppSelector} from "store"; +import {AvataaarProps} from "types/avatar"; import {Votes} from "../../Votes"; -import {AvataaarProps} from "../../Avatar"; import "./NoteDialogNoteHeader.scss"; interface NoteDialogNoteHeaderProps { diff --git a/src/components/SettingsDialog/Components/AvatarSettings.tsx b/src/components/SettingsDialog/Components/AvatarSettings.tsx index 7300ec7c12..973d0f781d 100644 --- a/src/components/SettingsDialog/Components/AvatarSettings.tsx +++ b/src/components/SettingsDialog/Components/AvatarSettings.tsx @@ -1,34 +1,22 @@ import {Shuffle} from "components/Icon"; import classNames from "classnames"; -import {AvataaarProps, Avatar, generateRandomProps} from "components/Avatar"; -import { - AVATAR_ACCESSORIES_TYPES, - AVATAR_CLOTHE_COLORS, - AVATAR_CLOTHE_TYPES, - AVATAR_EYEBROW_TYPES, - AVATAR_EYE_TYPES, - AVATAR_FACIAL_HAIR_COLORS, - AVATAR_FACIAL_HAIR_TYPES, - AVATAR_GRAPHIC_TYPES, - AVATAR_HAIR_COLORS, - AVATAR_MOUTH_TYPES, - AVATAR_SKIN_COLORS, - AVATAR_TOP_TYPES, -} from "components/Avatar/types"; -import {FC, Fragment, useEffect, useState} from "react"; +import {Avatar, generateRandomProps} from "components/Avatar"; +import {Fragment, useEffect, useState} from "react"; import {useTranslation} from "react-i18next"; import store, {useAppSelector} from "store"; import {Actions} from "store/action"; -import "./AvatarSettings.scss"; import {isEqual} from "underscore"; +import {AVATAR_CONFIG} from "constants/avatar"; +import {AvataaarProps, AvatarGroup} from "types/avatar"; import {SettingsAccordion} from "./SettingsAccordion"; import {SettingsCarousel} from "./SettingsCarousel"; +import "./AvatarSettings.scss"; export interface AvatarSettingsProps { id?: string; } -export const AvatarSettings: FC = ({id}) => { +export const AvatarSettings = (props: AvatarSettingsProps) => { const {t} = useTranslation(); const state = useAppSelector( (applicationState) => ({ @@ -39,13 +27,13 @@ export const AvatarSettings: FC = ({id}) => { let initialState = state.participant.user.avatar; if (initialState === null || initialState === undefined) { - initialState = generateRandomProps(id ?? ""); + initialState = generateRandomProps(props.id ?? ""); } const [properties, setProperties] = useState(initialState!); const [openAccordionIndex, setOpenAccordionIndex] = useState(-1); - const updateAvatar = (key: PropertyKey, value: AvataaarProps[PropertyKey]) => { + const updateAvatar = (key: keyof AvataaarProps, value: AvataaarProps[keyof AvataaarProps]) => { if (properties && properties[key] !== value) { setProperties({...properties, [key]: value}); } @@ -61,46 +49,47 @@ export const AvatarSettings: FC = ({id}) => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [properties]); - const settingGroups: {[key: string]: {values: readonly string[]; key: keyof AvataaarProps; disabledOn?: {[key in keyof Partial]: string[]}}[]} = { - hair: [ - {values: AVATAR_TOP_TYPES, key: "topType"}, - { - values: AVATAR_HAIR_COLORS, - key: "hairColor", - disabledOn: {topType: ["NoHair", "Eyepatch", "Hat", "Hijab", "Turban", "WinterHat1", "WinterHat2", "WinterHat3", "WinterHat4", "LongHairFrida", "LongHairShavedSides"]}, - }, - {values: AVATAR_FACIAL_HAIR_TYPES, key: "facialHairType", disabledOn: {topType: ["Hijab"]}}, - {values: AVATAR_FACIAL_HAIR_COLORS, key: "facialHairColor", disabledOn: {topType: ["Hijab"], facialHairType: ["Blank"]}}, - ], - facialFeatures: [ - {values: AVATAR_SKIN_COLORS, key: "skinColor"}, - {values: AVATAR_EYEBROW_TYPES, key: "eyebrowType"}, - {values: AVATAR_EYE_TYPES, key: "eyeType"}, - {values: AVATAR_MOUTH_TYPES, key: "mouthType"}, - ], - clothing: [ - {values: AVATAR_ACCESSORIES_TYPES, key: "accessoriesType", disabledOn: {topType: ["Eyepatch"]}}, - {values: AVATAR_CLOTHE_TYPES, key: "clotheType"}, - {values: AVATAR_CLOTHE_COLORS, key: "clotheColor", disabledOn: {clotheType: ["BlazerShirt", "BlazerSweater"]}}, - { - values: AVATAR_GRAPHIC_TYPES, - key: "graphicType", - disabledOn: {clotheType: ["BlazerShirt", "BlazerSweater", "CollarSweater", "Hoodie", "Overall", "ShirtCrewNeck", "ShirtScoopNeck", "ShirtVNeck"]}, - }, - ], + // a group is disabled if any property (stored in properties) is found within the disabledOn array of the group. + const checkDisabled = (group: AvatarGroup): boolean => + (group.disabledOn && + Object.entries(group.disabledOn) + .map(([key, value]) => { + const typedKey = key as keyof AvataaarProps; + const typedValue = value as AvataaarProps[keyof AvataaarProps][]; + return Object.hasOwnProperty.call(properties, typedKey) && typedValue.some((val) => properties[typedKey] === val); + }) + .some((val) => val)) ?? + false; + + const renderAvatarGroup = (group: AvatarGroup) => { + const isDisabled = checkDisabled(group); + + return ( + + updateAvatar(group.key, value)} + disabled={isDisabled} + localizationPath={`Avatar.${group.key}.`} + label={t(`Avatar.${group.key}.label`)} + className={classNames("avatar-settings__settings-group-item", {disabled: isDisabled})} + /> + + ); }; return ( <>
- +
- {Object.entries(settingGroups).map(([label, props], groupIndex, array) => ( + {Object.entries(AVATAR_CONFIG).map(([label, groups], groupIndex, array) => ( = ({id}) => { headerClassName="avatar-settings__settings-group-header" >
-
- {props.map((element, index) => { - const isDisabled = - element.disabledOn && - Object.entries(element.disabledOn) - .map(([key, value]) => Object.hasOwnProperty.call(properties, key) && value.some((val) => properties[key].indexOf(val) >= 0)) - .some((val) => val); - - return ( - - updateAvatar(element.key, value as (typeof element.values)[number])} - disabled={isDisabled} - localizationPath={`Avatar.${element.key}.`} - label={t(`Avatar.${element.key as keyof Omit}.label`)} - className={classNames("avatar-settings__settings-group-item", {disabled: isDisabled})} - /> - {index < props.length - 1 &&
} -
- ); - })} -
+
{groups.map((group) => renderAvatarGroup(group))}
{groupIndex < array.length - 1 &&
}
diff --git a/src/components/Avatar/types.ts b/src/constants/avatar.ts similarity index 71% rename from src/components/Avatar/types.ts rename to src/constants/avatar.ts index 03f61432f7..9b3db1a8e8 100644 --- a/src/components/Avatar/types.ts +++ b/src/constants/avatar.ts @@ -1,3 +1,5 @@ +import {AvatarConfig} from "types/avatar"; + export const AVATAR_SKIN_COLORS = ["Tanned", "Yellow", "Pale", "Light", "Brown", "DarkBrown", "Black"] as const; export type AvatarSkinColor = (typeof AVATAR_SKIN_COLORS)[number]; @@ -99,3 +101,32 @@ export type AvatarEyebrowType = (typeof AVATAR_EYEBROW_TYPES)[number]; export const AVATAR_MOUTH_TYPES = ["Concerned", "Default", "Disbelief", "Eating", "Grimace", "Sad", "ScreamOpen", "Serious", "Smile", "Tongue", "Twinkle", "Vomit"] as const; export type AvatarMouthType = (typeof AVATAR_MOUTH_TYPES)[number]; + +export const AVATAR_CONFIG: AvatarConfig = { + hair: [ + {values: AVATAR_TOP_TYPES, key: "topType"}, + { + values: AVATAR_HAIR_COLORS, + key: "hairColor", + disabledOn: {topType: ["NoHair", "Eyepatch", "Hat", "Hijab", "Turban", "WinterHat1", "WinterHat2", "WinterHat3", "WinterHat4", "LongHairFrida", "LongHairShavedSides"]}, + }, + {values: AVATAR_FACIAL_HAIR_TYPES, key: "facialHairType", disabledOn: {topType: ["Hijab"]}}, + {values: AVATAR_FACIAL_HAIR_COLORS, key: "facialHairColor", disabledOn: {topType: ["Hijab"], facialHairType: ["Blank"]}}, + ], + facialFeatures: [ + {values: AVATAR_SKIN_COLORS, key: "skinColor"}, + {values: AVATAR_EYEBROW_TYPES, key: "eyebrowType"}, + {values: AVATAR_EYE_TYPES, key: "eyeType"}, + {values: AVATAR_MOUTH_TYPES, key: "mouthType"}, + ], + clothing: [ + {values: AVATAR_ACCESSORIES_TYPES, key: "accessoriesType", disabledOn: {topType: ["Eyepatch"]}}, + {values: AVATAR_CLOTHE_TYPES, key: "clotheType"}, + {values: AVATAR_CLOTHE_COLORS, key: "clotheColor", disabledOn: {clotheType: ["BlazerShirt", "BlazerSweater"]}}, + { + values: AVATAR_GRAPHIC_TYPES, + key: "graphicType", + disabledOn: {clotheType: ["BlazerShirt", "BlazerSweater", "CollarSweater", "Hoodie", "Overall", "ShirtCrewNeck", "ShirtScoopNeck", "ShirtVNeck"]}, + }, + ], +}; diff --git a/src/routes/StackView/StackView.tsx b/src/routes/StackView/StackView.tsx index 840924e792..eceaf2b5df 100644 --- a/src/routes/StackView/StackView.tsx +++ b/src/routes/StackView/StackView.tsx @@ -14,7 +14,7 @@ import {Toast} from "utils/Toast"; import {StackNavigation} from "components/StackNavigation"; import {CSSProperties, useEffect, useLayoutEffect, useRef, useState} from "react"; import {Note} from "types/note"; -import {AvataaarProps} from "components/Avatar"; +import {AvataaarProps} from "types/avatar"; import "./StackView.scss"; type StackedNote = Note & { diff --git a/src/store/action/auth.ts b/src/store/action/auth.ts index a8b1ce49cb..ddd1ed0090 100644 --- a/src/store/action/auth.ts +++ b/src/store/action/auth.ts @@ -1,4 +1,4 @@ -import {AvataaarProps} from "components/Avatar"; +import {AvataaarProps} from "types/avatar"; export const AuthAction = { SignIn: "scrumlr.io/signIn" as const, diff --git a/src/types/auth.ts b/src/types/auth.ts index 5defc49400..f70df378ce 100644 --- a/src/types/auth.ts +++ b/src/types/auth.ts @@ -1,4 +1,4 @@ -import {AvataaarProps} from "components/Avatar"; +import {AvataaarProps} from "types/avatar"; export const ACCOUNT_TYPE_ANONYMOUS = "ANONYMOUS"; diff --git a/src/types/avatar.ts b/src/types/avatar.ts new file mode 100644 index 0000000000..679f3878a7 --- /dev/null +++ b/src/types/avatar.ts @@ -0,0 +1,42 @@ +import { + AvatarAccessoriesType, + AvatarClotheColor, + AvatarClotheType, + AvatarEyebrowType, + AvatarEyeType, + AvatarFacialHairColor, + AvatarFacialHairType, + AvatarGraphicType, + AvatarHairColor, + AvatarMouthType, + AvatarSkinColor, + AvatarTopType, +} from "constants/avatar"; + +export interface AvataaarProps { + // possibly look into separating accentColor from the other properties at some point + // otherwise don't forget to omit when needed + accentColorClass: string; + skinColor: AvatarSkinColor; + topType: AvatarTopType; + clotheColor: AvatarClotheColor; + graphicType: AvatarGraphicType; + clotheType: AvatarClotheType; + hairColor: AvatarHairColor; + facialHairColor: AvatarFacialHairColor; + facialHairType: AvatarFacialHairType; + accessoriesType: AvatarAccessoriesType; + eyeType: AvatarEyeType; + eyebrowType: AvatarEyebrowType; + mouthType: AvatarMouthType; +} + +export type DisabledOnType = Partial<{[K in keyof AvataaarProps]: AvataaarProps[K][]}>; + +export type AvatarGroup = { + values: ReadonlyArray; + key: keyof Omit; + disabledOn?: DisabledOnType; +}; + +export type AvatarConfig = Record>; From c515e8af51cf62b9d6a58dc20d12195342d56a09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:51:12 +0200 Subject: [PATCH 036/321] yarn(deps): bump react-i18next from 15.0.0 to 15.0.1 (#4395) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f3b5e900d8..8986ac4be2 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "react-focus-lock": "^2.12.1", "react-helmet": "^6.1.0", "react-hotkeys-hook": "^4.5.0", - "react-i18next": "^15.0.0", + "react-i18next": "^15.0.1", "react-redux": "^9.1.2", "react-router": "^6.22.0", "react-router-dom": "^6.23.1", diff --git a/yarn.lock b/yarn.lock index ed32f613bc..e6ad85a557 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9652,10 +9652,10 @@ react-hotkeys-hook@^4.5.0: resolved "https://registry.yarnpkg.com/react-hotkeys-hook/-/react-hotkeys-hook-4.5.0.tgz#807b389b15256daf6a813a1ec09e6698064fe97f" integrity sha512-Samb85GSgAWFQNvVt3PS90LPPGSf9mkH/r4au81ZP1yOIFayLC3QAvqTgGtJ8YEDMXtPmaVBs6NgipHO6h4Mug== -react-i18next@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-15.0.0.tgz#4980f8edf85b9df6573d6b12d95aca5b8f0cc8b0" - integrity sha512-2O3IgF4zivg57Q6p6i+ChDgJ371IDcEWbuWC6gvoh5NbkDMs0Q+O7RPr4v61+Se32E0V+LmtwePAeqWZW0bi6g== +react-i18next@^15.0.1: + version "15.0.1" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-15.0.1.tgz#fc662d93829ecb39683fe2757a47ebfbc5c912a0" + integrity sha512-NwxLqNM6CLbeGA9xPsjits0EnXdKgCRSS6cgkgOdNcPXqL+1fYNl8fBg1wmnnHvFy812Bt4IWTPE9zjoPmFj3w== dependencies: "@babel/runtime" "^7.24.8" html-parse-stringify "^3.0.1" From af9cc9acda49bca11eb3c604639a72c3f733e796 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:51:26 +0200 Subject: [PATCH 037/321] yarn(deps-dev): bump eslint-plugin-jest from 28.7.0 to 28.8.0 (#4396) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8986ac4be2..de71f4a20c 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-css-modules": "^2.12.0", "eslint-plugin-import": "2.29.1", - "eslint-plugin-jest": "^28.7.0", + "eslint-plugin-jest": "^28.8.0", "eslint-plugin-jsx-a11y": "6.9.0", "eslint-plugin-only-warn": "^1.1.0", "eslint-plugin-prettier": "^5.2.1", diff --git a/yarn.lock b/yarn.lock index e6ad85a557..cd1d81b0d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5275,10 +5275,10 @@ eslint-plugin-jest@^25.3.0: dependencies: "@typescript-eslint/experimental-utils" "^5.0.0" -eslint-plugin-jest@^28.7.0: - version "28.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.7.0.tgz#8ff262c26520242492f85f9268995bbf624758a4" - integrity sha512-fzPGN7awL2ftVRQh/bsCi+16ArUZWujZnD1b8EGJqy8nr4//7tZ3BIdc/9edcJBtB3hpci3GtdMNFVDwHU0Eag== +eslint-plugin-jest@^28.8.0: + version "28.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.8.0.tgz#54f597b5a3295ad04ec946baa245ad02b9b2bca0" + integrity sha512-Tubj1hooFxCl52G4qQu0edzV/+EZzPUeN8p2NnW5uu4fbDs+Yo7+qDVDc4/oG3FbCqEBmu/OC3LSsyiU22oghw== dependencies: "@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0" From 02e4879283fdc5c6cfe9f34d2c35b0b2d58e9664 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 11 Aug 2024 11:21:18 +0200 Subject: [PATCH 038/321] go(deps): bump github.com/go-chi/httprate from 0.12.0 to 0.12.1 in /server/src (#4398) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/src/go.mod | 2 +- server/src/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/go.mod b/server/src/go.mod index 1bc6b6a942..bf5125b567 100644 --- a/server/src/go.mod +++ b/server/src/go.mod @@ -8,7 +8,7 @@ replace github.com/opencontainers/runc v1.1.0 => github.com/opencontainers/runc require ( github.com/go-chi/chi/v5 v5.1.0 github.com/go-chi/cors v1.2.1 - github.com/go-chi/httprate v0.12.0 + github.com/go-chi/httprate v0.12.1 github.com/go-chi/jwtauth/v5 v5.1.1 github.com/go-chi/render v1.0.3 github.com/go-redis/redis/v8 v8.11.5 diff --git a/server/src/go.sum b/server/src/go.sum index b4dc044a0d..978c72877f 100644 --- a/server/src/go.sum +++ b/server/src/go.sum @@ -60,8 +60,8 @@ github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4= github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= -github.com/go-chi/httprate v0.12.0 h1:08D/te3pOTJe5+VAZTQrHxwdsH2NyliiUoRD1naKaMg= -github.com/go-chi/httprate v0.12.0/go.mod h1:TUepLXaz/pCjmCtf/obgOQJ2Sz6rC8fSf5cAt5cnTt0= +github.com/go-chi/httprate v0.12.1 h1:55l3IWrPcipqKb72yBzH+grF51z5w+2Bb/Qmu1bos/E= +github.com/go-chi/httprate v0.12.1/go.mod h1:TUepLXaz/pCjmCtf/obgOQJ2Sz6rC8fSf5cAt5cnTt0= github.com/go-chi/jwtauth/v5 v5.1.1 h1:Pjixqu5YkjE9sCLpzE01L0Q4sQzJIPdo7uz9r8ftp/c= github.com/go-chi/jwtauth/v5 v5.1.1/go.mod h1:CYP1WSbzD4MPuKCr537EM3kfFhSQgpUEtMJFuYJjqWU= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= From cc9335f8889ddb647c5855c9a230ad53d326867e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 23:13:07 +0200 Subject: [PATCH 039/321] yarn(deps-dev): bump @types/node from 22.1.0 to 22.2.0 (#4400) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index de71f4a20c..4c05290d25 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.12", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.1.0", + "@types/node": "^22.2.0", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index cd1d81b0d6..f4a6bedf4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2369,10 +2369,10 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^22.1.0": - version "22.1.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.1.0.tgz#6d6adc648b5e03f0e83c78dc788c2b037d0ad94b" - integrity sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw== +"@types/node@*", "@types/node@^22.2.0": + version "22.2.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.2.0.tgz#7cf046a99f0ba4d628ad3088cb21f790df9b0c5b" + integrity sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ== dependencies: undici-types "~6.13.0" From a4619db4ca8b371cb145252da52329bb019e82bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 23:13:30 +0200 Subject: [PATCH 040/321] go(deps): bump github.com/urfave/cli/v2 from 2.27.3 to 2.27.4 in /server/src (#4399) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/src/go.mod | 2 +- server/src/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/go.mod b/server/src/go.mod index bf5125b567..2c63113385 100644 --- a/server/src/go.mod +++ b/server/src/go.mod @@ -25,7 +25,7 @@ require ( github.com/uptrace/bun/dbfixture v1.1.17 github.com/uptrace/bun/dialect/pgdialect v1.1.17 github.com/uptrace/bun/extra/bundebug v1.1.17 - github.com/urfave/cli/v2 v2.27.3 + github.com/urfave/cli/v2 v2.27.4 github.com/weppos/publicsuffix-go v0.40.2 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.26.0 diff --git a/server/src/go.sum b/server/src/go.sum index 978c72877f..3fec77a350 100644 --- a/server/src/go.sum +++ b/server/src/go.sum @@ -220,8 +220,8 @@ github.com/uptrace/bun/dialect/pgdialect v1.1.17 h1:NsvFVHAx1Az6ytlAD/B6ty3cVE6j github.com/uptrace/bun/dialect/pgdialect v1.1.17/go.mod h1:fLBDclNc7nKsZLzNjFL6BqSdgJzbj2HdnyOnLoDvAME= github.com/uptrace/bun/extra/bundebug v1.1.17 h1:LcZ8DzyyGdXAmbUqmnCpBq7TPFegMp59FGy+uzEE21c= github.com/uptrace/bun/extra/bundebug v1.1.17/go.mod h1:FOwNaBEGGChv3qBVh3pz3TPlUuikZ93qKjd/LJdl91o= -github.com/urfave/cli/v2 v2.27.3 h1:/POWahRmdh7uztQ3CYnaDddk0Rm90PyOgIxgW2rr41M= -github.com/urfave/cli/v2 v2.27.3/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= +github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8= +github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= From 5e3c507ae16bdd1e663f6656326a113b542bf9a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:44:36 +0200 Subject: [PATCH 041/321] yarn(deps): bump i18next from 23.12.2 to 23.12.3 (#4403) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4c05290d25..b82bfa8297 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "avataaars": "^2.0.0", "classnames": "^2.5.1", "file-saver": "^2.0.5", - "i18next": "^23.12.2", + "i18next": "^23.12.3", "i18next-browser-languagedetector": "^8.0.0", "js-cookie": "^3.0.5", "linkify-react": "^4.1.3", diff --git a/yarn.lock b/yarn.lock index f4a6bedf4f..3a4ecb5f9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6523,10 +6523,10 @@ i18next@^21.0.1: dependencies: "@babel/runtime" "^7.17.2" -i18next@^23.12.2: - version "23.12.2" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.12.2.tgz#c5b44bb95e4d4a5908a51577fa06c63dc2f650a4" - integrity sha512-XIeh5V+bi8SJSWGL3jqbTEBW5oD6rbP5L+E7dVQh1MNTxxYef0x15rhJVcRb7oiuq4jLtgy2SD8eFlf6P2cmqg== +i18next@^23.12.3: + version "23.12.3" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.12.3.tgz#e0b811ef218f6d3fdb0b91f1a1eed099a1f7c48b" + integrity sha512-DyigQmrR10V9U2N6pjhbfahW13GY7n8BQD9swN09JuRRropgsksWVi4vRLeex0Qf7zCPnBfIqQfhcBzdZBQBYw== dependencies: "@babel/runtime" "^7.23.2" From f3bda10fb09b4301f3743e5f861ddb70decc9a06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:45:10 +0200 Subject: [PATCH 042/321] yarn(deps-dev): bump lint-staged from 15.2.8 to 15.2.9 (#4404) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b82bfa8297..e97ff0b004 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "hash-files": "^1.1.1", "husky": "^9.1.4", "i18next-fs-backend": "^2.3.2", - "lint-staged": "^15.2.8", + "lint-staged": "^15.2.9", "prettier": "^3.3.3", "react-dnd-test-backend": "^15.1.2", "react-dnd-test-utils": "^15.1.2", diff --git a/yarn.lock b/yarn.lock index 3a4ecb5f9d..553aeb527f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7875,10 +7875,10 @@ linkifyjs@^4.1.3: resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-4.1.3.tgz#0edbc346428a7390a23ea2e5939f76112c9ae07f" integrity sha512-auMesunaJ8yfkHvK4gfg1K0SaKX/6Wn9g2Aac/NwX+l5VdmFZzo/hdPGxEOETj+ryRa4/fiOPjeeKURSAJx1sg== -lint-staged@^15.2.8: - version "15.2.8" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.8.tgz#5e19eb7b4dbb922f56fafb4635b44ee3c92f7322" - integrity sha512-PUWFf2zQzsd9EFU+kM1d7UP+AZDbKFKuj+9JNVTBkhUFhbg4MAt6WfyMMwBfM4lYqd4D2Jwac5iuTu9rVj4zCQ== +lint-staged@^15.2.9: + version "15.2.9" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.9.tgz#bf70d40b6b192df6ad756fb89822211615e0f4da" + integrity sha512-BZAt8Lk3sEnxw7tfxM7jeZlPRuT4M68O0/CwZhhaw6eeWu0Lz5eERE3m386InivXB64fp/mDID452h48tvKlRQ== dependencies: chalk "~5.3.0" commander "~12.1.0" From 476671fc781a6b6d7ca5484bee73c1bded628c15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:45:43 +0200 Subject: [PATCH 043/321] go(deps): bump github.com/ory/dockertest/v3 from 3.10.0 to 3.11.0 in /server/src (#4405) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/src/go.mod | 19 ++++++++----------- server/src/go.sum | 44 ++++++++++++++++++++++---------------------- 2 files changed, 30 insertions(+), 33 deletions(-) diff --git a/server/src/go.mod b/server/src/go.mod index 2c63113385..f59094ce4a 100644 --- a/server/src/go.mod +++ b/server/src/go.mod @@ -18,7 +18,7 @@ require ( github.com/lestrrat-go/jwx/v2 v2.1.1 github.com/markbates/goth v1.80.0 github.com/nats-io/nats.go v1.36.0 - github.com/ory/dockertest/v3 v3.10.0 + github.com/ory/dockertest/v3 v3.11.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.9.0 github.com/uptrace/bun v1.1.17 @@ -37,12 +37,12 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.3.2 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/ajg/form v1.5.1 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/containerd/continuity v0.3.0 // indirect + github.com/containerd/continuity v0.4.3 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect @@ -50,7 +50,7 @@ require ( github.com/distribution/reference v0.6.0 // indirect github.com/docker/cli v27.1.1+incompatible // indirect github.com/docker/docker v27.1.1+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/fatih/color v1.16.0 // indirect github.com/go-viper/mapstructure/v2 v2.0.0 // indirect @@ -82,12 +82,12 @@ require ( github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/opencontainers/runc v1.1.12 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/opencontainers/runc v1.1.13 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/segmentio/asm v1.2.0 // indirect - github.com/sirupsen/logrus v1.9.2 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect @@ -100,13 +100,10 @@ require ( go.opentelemetry.io/otel/trace v1.28.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.10.0 // indirect - golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.27.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/server/src/go.sum b/server/src/go.sum index 3fec77a350..643b747f11 100644 --- a/server/src/go.sum +++ b/server/src/go.sum @@ -5,25 +5,27 @@ cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGB cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= +github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= @@ -45,8 +47,8 @@ github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2 github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= @@ -72,8 +74,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -178,12 +180,12 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= -github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= -github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= -github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= +github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA= +github.com/ory/dockertest/v3 v3.11.0 h1:OiHcxKAvSDUwsEVh2BjxQQc/5EHz9n0va9awCtNGuyA= +github.com/ory/dockertest/v3 v3.11.0/go.mod h1:VIPxS1gwT9NpPOrfD3rACs8Y9Z7yhzO4SB194iUDnUI= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -195,8 +197,8 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= -github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -274,7 +276,6 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -362,7 +363,6 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -388,5 +388,5 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= -gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From 85021630b03ee07e331028c422d2077bf329b38f Mon Sep 17 00:00:00 2001 From: Benedict Homuth <56362368+BenedictHomuth@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:30:40 +0200 Subject: [PATCH 044/321] build: bump postgres to 16.4 (#4406) Co-authored-by: Benedict Homuth --- deployment/SKE/create_db_job.yaml | 2 +- deployment/docker/docker-compose.yml | 2 +- k8s/deployment.yaml | 2 +- server/docker-compose.dev.yml | 2 +- server/docker-compose.yml | 2 +- server/src/database/database_test.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/SKE/create_db_job.yaml b/deployment/SKE/create_db_job.yaml index e2116c6b8f..e05bbf29fd 100644 --- a/deployment/SKE/create_db_job.yaml +++ b/deployment/SKE/create_db_job.yaml @@ -8,7 +8,7 @@ spec: spec: containers: - name: create-db - image: postgres:16.3-alpine + image: postgres:16.4-alpine env: - name: DB_URL value: "$DB_URL" diff --git a/deployment/docker/docker-compose.yml b/deployment/docker/docker-compose.yml index 3e63c554d5..e73953b8e3 100644 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker/docker-compose.yml @@ -57,7 +57,7 @@ services: postgres: restart: always - image: postgres:16.3 + image: postgres:16.4 environment: POSTGRES_DB: scrumlr POSTGRES_USER: scrumlr diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 155177b95c..ec32b225c2 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -222,7 +222,7 @@ kind: Cluster metadata: name: cluster-PR_NUMBER spec: - imageName: ghcr.io/cloudnative-pg/postgresql:16.3 + imageName: ghcr.io/cloudnative-pg/postgresql:16.4 instances: 1 storage: storageClass: csi-cinder-sc-delete diff --git a/server/docker-compose.dev.yml b/server/docker-compose.dev.yml index 1d0625d847..a6c8c0209b 100644 --- a/server/docker-compose.dev.yml +++ b/server/docker-compose.dev.yml @@ -8,7 +8,7 @@ services: - "4222:4222" database: - image: postgres:16.3 + image: postgres:16.4 ports: - "5432:5432" environment: diff --git a/server/docker-compose.yml b/server/docker-compose.yml index cb9b505cb1..938b62b0e0 100644 --- a/server/docker-compose.yml +++ b/server/docker-compose.yml @@ -17,7 +17,7 @@ services: - build database: - image: postgres:16.3 + image: postgres:16.4 ports: - "5432:5432" environment: diff --git a/server/src/database/database_test.go b/server/src/database/database_test.go index 4e92c38e1c..ee2f1cb720 100644 --- a/server/src/database/database_test.go +++ b/server/src/database/database_test.go @@ -66,7 +66,7 @@ func initDatabase() (string, func(), error) { // pulls an image, creates a container based on it and runs it resource, err := pool.RunWithOptions(&dockertest.RunOptions{ Repository: "postgres", - Tag: "16.3", + Tag: "16.4", Env: []string{ fmt.Sprintf("POSTGRES_PASSWORD=%s", DatabaseUsernameAndPassword), fmt.Sprintf("POSTGRES_USER=%s", DatabaseUsernameAndPassword), From 644b2f0a62fdef190a7c2e651882ac6a22d8b6ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:33:12 +0200 Subject: [PATCH 045/321] yarn(deps-dev): bump @types/node from 22.2.0 to 22.3.0 (#4408) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index e97ff0b004..7841403614 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.12", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.2.0", + "@types/node": "^22.3.0", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index 553aeb527f..d9599d7df0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2369,12 +2369,12 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^22.2.0": - version "22.2.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.2.0.tgz#7cf046a99f0ba4d628ad3088cb21f790df9b0c5b" - integrity sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ== +"@types/node@*", "@types/node@^22.3.0": + version "22.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.3.0.tgz#7f8da0e2b72c27c4f9bd3cb5ef805209d04d4f9e" + integrity sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g== dependencies: - undici-types "~6.13.0" + undici-types "~6.18.2" "@types/parse-json@^4.0.0": version "4.0.0" @@ -11477,10 +11477,10 @@ underscore@1.x.x, underscore@^1.13.7, underscore@^1.8.3: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== -undici-types@~6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.13.0.tgz#e3e79220ab8c81ed1496b5812471afd7cf075ea5" - integrity sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg== +undici-types@~6.18.2: + version "6.18.2" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.18.2.tgz#8b678cf939d4fc9ec56be3c68ed69c619dee28b0" + integrity sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" From d23325f33a8741d4dd9b35c13add2c796419a008 Mon Sep 17 00:00:00 2001 From: Benedict Homuth <56362368+BenedictHomuth@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:38:54 +0200 Subject: [PATCH 046/321] test: add go tests for board- and column-templates (#4367) Co-authored-by: Benedict Homuth --- server/src/database/board_templates_test.go | 426 +++++++++++++++++++ server/src/database/column_templates.go | 8 +- server/src/database/column_templates_test.go | 346 +++++++++++++++ server/src/database/database_test.go | 2 + server/src/database/testdata/fixture.yml | 38 ++ 5 files changed, 816 insertions(+), 4 deletions(-) create mode 100644 server/src/database/board_templates_test.go create mode 100644 server/src/database/column_templates_test.go diff --git a/server/src/database/board_templates_test.go b/server/src/database/board_templates_test.go new file mode 100644 index 0000000000..6d5f4ca99c --- /dev/null +++ b/server/src/database/board_templates_test.go @@ -0,0 +1,426 @@ +package database + +import ( + "database/sql" + "testing" + + "github.com/stretchr/testify/assert" + "scrumlr.io/server/database/types" +) + +func TestRunnerForBoardTemplates(t *testing.T) { + t.Run("Create=0", testCreatePublicBoardTemplate) + t.Run("Create=1", testCreateByPassphraseBoardTemplate) + t.Run("Create=2", testCreateByInviteBoardTemplate) + t.Run("Create=3", testCreateBoardTemplateAlsoCreatesColumnTemplates) + t.Run("Create=4", testCreateBoardTemplateWithName) + t.Run("Create=5", testCreateBoardTemplateWithDescription) + + t.Run("Update=0", testUpdatePublicBoardTemplateToPassphraseBoardTemplate) + t.Run("Update=1", testUpdatePublicBoardTemplateToByInviteBoardTemplate) + t.Run("Update=2", testUpdateByPassphraseBoardTemplateToByInviteBoardTemplate) + t.Run("Update=3", testUpdateByInviteBoardTemplateToByPassphraseBoardTemplate) + t.Run("Update=4", testUpdateBoardTemplateName) + t.Run("Update=5", testUpdateBoardTemplateDescription) + t.Run("Update=6", testUpdateBoardTemplateFavouriteToTrue) + t.Run("Update=7", testUpdateBoardTemplateFavouriteFromTrueToFalse) + + t.Run("Get=0", testGetBoardTemplate) + t.Run("Get=1", testGetAllBoardTemplatesForSpecificUser) + + t.Run("Delete=0", testDeleteBoardTemplate) +} + +func testCreatePublicBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + Description: nil, + Favourite: nil, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template.ID) + assert.Nil(t, template.Name) + assert.Nil(t, template.Description) + assert.False(t, *template.Favourite) + assert.Equal(t, types.AccessPolicyPublic, template.AccessPolicy) +} + +func testCreateByPassphraseBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + Description: nil, + Favourite: nil, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template.ID) + assert.Nil(t, template.Name) + assert.Nil(t, template.Description) + assert.False(t, *template.Favourite) + assert.Equal(t, types.AccessPolicyPublic, template.AccessPolicy) +} + +func testCreateByInviteBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + Description: nil, + Favourite: nil, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template.ID) + assert.Nil(t, template.Name) + assert.Nil(t, template.Description) + assert.False(t, *template.Favourite) + assert.Equal(t, types.AccessPolicyPublic, template.AccessPolicy) +} + +func testCreateBoardTemplateAlsoCreatesColumnTemplates(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + visible := true + notVisible := false + indexOne := 0 + indexTwo := 1 + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + Description: nil, + Favourite: nil, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{ + { + Name: "A", + Description: "A description", + Color: "backlog-blue", + Visible: &visible, + Index: &indexOne, + }, + { + Name: "B", + Description: "B description", + Color: "backlog-blue", + Visible: ¬Visible, + Index: &indexTwo, + }, + }) + + assert.Nil(t, err) + assert.NotNil(t, template) + + columns, err := testDb.ListColumnTemplates(template.ID) + assert.Nil(t, err) + assert.NotNil(t, columns) + + // Col One + assert.Equal(t, "A", columns[0].Name) + assert.Equal(t, "A description", columns[0].Description) + assert.True(t, columns[0].Visible) + assert.Equal(t, indexOne, columns[0].Index) + + // Col Two + assert.Equal(t, "B", columns[1].Name) + assert.Equal(t, "B description", columns[1].Description) + assert.False(t, columns[1].Visible) + assert.Equal(t, indexTwo, columns[1].Index) +} + +func testCreateBoardTemplateWithName(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + name := "Test Template" + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: &name, + Description: nil, + Favourite: nil, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template.ID) + assert.Equal(t, "Test Template", *template.Name) +} + +func testCreateBoardTemplateWithDescription(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + description := "Test Description" + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + Description: &description, + Favourite: nil, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template.ID) + assert.Equal(t, "Test Description", *template.Description) +} + +func testUpdatePublicBoardTemplateToPassphraseBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + updateAccessPolicy := types.AccessPolicyByPassphrase + updatedBoard, err := testDb.UpdateBoardTemplate(BoardTemplateUpdate{ + ID: template.ID, + AccessPolicy: &updateAccessPolicy, + }) + + assert.Nil(t, err) + assert.Equal(t, updateAccessPolicy, updatedBoard.AccessPolicy) +} + +func testUpdatePublicBoardTemplateToByInviteBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + updateAccessPolicy := types.AccessPolicyByInvite + updatedBoard, err := testDb.UpdateBoardTemplate(BoardTemplateUpdate{ + ID: template.ID, + AccessPolicy: &updateAccessPolicy, + }) + + assert.Nil(t, err) + assert.Equal(t, updateAccessPolicy, updatedBoard.AccessPolicy) +} + +func testUpdateByPassphraseBoardTemplateToByInviteBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + AccessPolicy: types.AccessPolicyByPassphrase, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + updateAccessPolicy := types.AccessPolicyByInvite + updatedBoard, err := testDb.UpdateBoardTemplate(BoardTemplateUpdate{ + ID: template.ID, + AccessPolicy: &updateAccessPolicy, + }) + + assert.Nil(t, err) + assert.Equal(t, updateAccessPolicy, updatedBoard.AccessPolicy) +} + +func testUpdateByInviteBoardTemplateToByPassphraseBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + AccessPolicy: types.AccessPolicyByInvite, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + updateAccessPolicy := types.AccessPolicyByPassphrase + updatedBoard, err := testDb.UpdateBoardTemplate(BoardTemplateUpdate{ + ID: template.ID, + AccessPolicy: &updateAccessPolicy, + }) + + assert.Nil(t, err) + assert.Equal(t, updateAccessPolicy, updatedBoard.AccessPolicy) +} + +func testUpdateBoardTemplateName(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: nil, + AccessPolicy: types.AccessPolicyByInvite, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + updateName := "New Name" + updatedBoard, err := testDb.UpdateBoardTemplate(BoardTemplateUpdate{ + ID: template.ID, + Name: &updateName, + }) + + assert.Nil(t, err) + assert.Equal(t, updateName, *updatedBoard.Name) +} + +func testUpdateBoardTemplateDescription(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Description: nil, + AccessPolicy: types.AccessPolicyByInvite, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + updateDescription := "New Description" + updatedBoard, err := testDb.UpdateBoardTemplate(BoardTemplateUpdate{ + ID: template.ID, + Description: &updateDescription, + }) + + assert.Nil(t, err) + assert.Equal(t, updateDescription, *updatedBoard.Description) +} + +func testUpdateBoardTemplateFavouriteToTrue(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Favourite: nil, + AccessPolicy: types.AccessPolicyByInvite, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + updateFavourite := true + updatedBoard, err := testDb.UpdateBoardTemplate(BoardTemplateUpdate{ + ID: template.ID, + Favourite: &updateFavourite, + }) + + assert.Nil(t, err) + assert.Equal(t, updateFavourite, *updatedBoard.Favourite) +} + +func testUpdateBoardTemplateFavouriteFromTrueToFalse(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + favourited := true + + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Favourite: &favourited, + AccessPolicy: types.AccessPolicyByInvite, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + updateFavourite := false + updatedBoard, err := testDb.UpdateBoardTemplate(BoardTemplateUpdate{ + ID: template.ID, + Favourite: &updateFavourite, + }) + + assert.Nil(t, err) + assert.Equal(t, updateFavourite, *updatedBoard.Favourite) +} + +func testGetBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + name := "Get Template Test" + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: &name, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + getTemplate, err := testDb.GetBoardTemplate(template.ID) + + assert.Nil(t, err) + assert.NotNil(t, getTemplate) + assert.IsType(t, BoardTemplate{}, template) + assert.NotNil(t, getTemplate.ID) + assert.Equal(t, name, *template.Name) +} + +func testGetAllBoardTemplatesForSpecificUser(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + name := "Get Template Test" + templateOne, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: &name, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, templateOne) + + templateTwo, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: &name, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, templateTwo) + + getTemplates, err := testDb.GetBoardTemplates(user.ID) + + assert.Nil(t, err) + assert.IsType(t, []BoardTemplateFull{}, getTemplates) + assert.NotNil(t, getTemplates) +} + +func testDeleteBoardTemplate(t *testing.T) { + user := fixture.MustRow("User.jack").(*User) + + name := "Delete Template Test" + template, err := testDb.CreateBoardTemplate(BoardTemplateInsert{ + Creator: user.ID, + Name: &name, + AccessPolicy: types.AccessPolicyPublic, + }, []ColumnTemplateInsert{}) + + assert.Nil(t, err) + assert.NotNil(t, template) + + err = testDb.DeleteBoardTemplate(template.ID) + assert.Nil(t, err) + + _, err = testDb.GetBoard(template.ID) + assert.NotNil(t, err) + assert.Equal(t, err, sql.ErrNoRows) +} diff --git a/server/src/database/column_templates.go b/server/src/database/column_templates.go index 321c585ad0..c95aed9a9e 100644 --- a/server/src/database/column_templates.go +++ b/server/src/database/column_templates.go @@ -63,7 +63,7 @@ func (d *Database) CreateColumnTemplate(column ColumnTemplateInsert) (ColumnTemp query := d.db.NewInsert() if column.Index != nil { - indexUpdate := d.db.NewUpdate().Model((*ColumnTemplate)(nil)).Set("index = index+1").Where("index >= ?", newIndex).Where("board = ?", column.BoardTemplate) + indexUpdate := d.db.NewUpdate().Model((*ColumnTemplate)(nil)).Set("index = index+1").Where("index >= ?", newIndex).Where("board_template = ?", column.BoardTemplate) query = query.With("indexUpdate", indexUpdate) } @@ -73,7 +73,7 @@ func (d *Database) CreateColumnTemplate(column ColumnTemplateInsert) (ColumnTemp Model(&column). Value("index", fmt.Sprintf("LEAST(coalesce((SELECT index FROM \"maxIndexSelect\"),0), %d)", newIndex)). Returning("*"). - Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardIdentifier, column.BoardTemplate), &c) + Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardTemplateIdentifier, column.BoardTemplate), &c) return c, err } @@ -127,7 +127,7 @@ func (d *Database) UpdateColumnTemplate(column ColumnTemplateUpdate) (ColumnTemp Value("index", fmt.Sprintf("LEAST((SELECT COUNT(*) FROM \"maxIndexSelect\")-1, %d)", newIndex)). Where("id = ?", column.ID). Returning("*"). - Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardIdentifier, column.BoardTemplate), &c) + Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardTemplateIdentifier, column.BoardTemplate), &c) return c, err } @@ -146,7 +146,7 @@ func (d *Database) DeleteColumnTemplate(board, column, user uuid.UUID) error { Model((*ColumnTemplate)(nil)). Where("id = ?", column). Returning("*"). - Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardIdentifier, board, identifiers.ColumnIdentifier, column, identifiers.UserIdentifier, user, "Result", &columns), &columns) + Exec(common.ContextWithValues(context.Background(), "Database", d, identifiers.BoardTemplateIdentifier, board, identifiers.ColumnTemplateIdentifier, column, identifiers.UserIdentifier, user, "Result", &columns), &columns) return err } diff --git a/server/src/database/column_templates_test.go b/server/src/database/column_templates_test.go new file mode 100644 index 0000000000..4cc6e1daa9 --- /dev/null +++ b/server/src/database/column_templates_test.go @@ -0,0 +1,346 @@ +package database + +import ( + "testing" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" + "scrumlr.io/server/database/types" +) + +var boardForColumnTemplatesTest uuid.UUID +var firstColumnTemplate *ColumnTemplate +var secondColumnTemplate *ColumnTemplate +var thirdColumnTemplate *ColumnTemplate +var columnTemplateInsertedFirst *ColumnTemplate +var columnTemplateInsertedSecond *ColumnTemplate +var columnTemplateInsertedThird *ColumnTemplate +var columnTemplateInsertedFourth *ColumnTemplate +var columnTemplateInsertedFifth *ColumnTemplate +var columnTemplateTestUser *User + +func TestRunnerForColumnTemplates(t *testing.T) { + firstColumnTemplate = fixture.MustRow("ColumnTemplate.firstColumnTemplate").(*ColumnTemplate) + secondColumnTemplate = fixture.MustRow("ColumnTemplate.secondColumnTemplate").(*ColumnTemplate) + thirdColumnTemplate = fixture.MustRow("ColumnTemplate.thirdColumnTemplate").(*ColumnTemplate) + columnTemplateTestUser = fixture.MustRow("User.justin").(*User) + boardForColumnTemplatesTest = firstColumnTemplate.BoardTemplate + + t.Run("Getter=0", testGetColumnTemplate) + t.Run("Getter=1", testGetColumnTemplates) + + t.Run("Create=0", testCreateColumnTemplateOnFirstIndex) + t.Run("Create=1", testCreateColumnTemplateOnLastIndex) + t.Run("Create=2", testCreateColumnTemplateOnNegativeIndex) + t.Run("Create=3", testCreateColumnTemplateWithExceptionallyHighIndex) + t.Run("Create=4", testCreateColumnTemplateOnSecondIndex) + t.Run("Create=5", testCreateColumnTemplateWithEmptyName) + t.Run("Create=6", testCreateColumnTemplateWithEmptyColor) + t.Run("Create=7", testCreateColumnTemplateWithDescription) + + t.Run("Delete=0", testDeleteColumnTemplateOnSecondIndex) + t.Run("Delete=1", testDeleteColumnTemplateOnFirstIndex) + t.Run("Delete=2", testDeleteLastColumnTemplate) + t.Run("Delete=3", testDeleteOtherColumnTemplates) + + t.Run("Update=0", testUpdateColumnTemplateName) + t.Run("Update=1", testUpdateColumnTemplateColor) + t.Run("Update=2", testUpdateColumnTemplateVisibility) + t.Run("Update=3", testMoveFirstColumnTemplateOnLastIndex) + t.Run("Update=4", testMoveLastColumnTemplateOnFirstIndex) + t.Run("Update=5", testMoveFirstColumnTemplateOnSecondIndex) + t.Run("Update=6", testMoveSecondColumnTemplateOnFirstIndex) + t.Run("Update=7", testUpdateColumnTemplateDescription) +} + +func testGetColumnTemplate(t *testing.T) { + column := fixture.MustRow("ColumnTemplate.firstColumnTemplate").(*ColumnTemplate) + gotColumn, err := testDb.GetColumnTemplate(boardForColumnTemplatesTest, column.ID) + assert.Nil(t, err) + assert.Equal(t, column.ID, gotColumn.ID) + assert.Equal(t, column.BoardTemplate, gotColumn.BoardTemplate) + assert.Equal(t, column.Name, gotColumn.Name) + assert.Equal(t, column.Description, gotColumn.Description) + assert.Equal(t, column.Visible, gotColumn.Visible) + assert.Equal(t, column.Index, gotColumn.Index) +} + +func testGetColumnTemplates(t *testing.T) { + verifyColumnTemplateOrder(t, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID) +} + +func testCreateColumnTemplateOnFirstIndex(t *testing.T) { + visible := true + index := 0 + + column, err := testDb.CreateColumnTemplate(ColumnTemplateInsert{ + BoardTemplate: boardForColumnTemplatesTest, + Name: "0 Column", + Color: types.ColorBacklogBlue, + Visible: &visible, + Index: &index, + }) + assert.Nil(t, err) + assert.Equal(t, index, column.Index) + + verifyColumnTemplateOrder(t, column.ID, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID) + columnTemplateInsertedFirst = &column +} + +func testCreateColumnTemplateOnLastIndex(t *testing.T) { + visible := true + index := 4 + + column, err := testDb.CreateColumnTemplate(ColumnTemplateInsert{ + BoardTemplate: boardForColumnTemplatesTest, + Name: "4 Column", + Description: "Test description", + Color: types.ColorBacklogBlue, + Visible: &visible, + Index: &index, + }) + + assert.Nil(t, err) + assert.Equal(t, index, column.Index) + + verifyColumnTemplateOrder(t, columnTemplateInsertedFirst.ID, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID, column.ID) + columnTemplateInsertedSecond = &column +} + +func testCreateColumnTemplateOnNegativeIndex(t *testing.T) { + visible := true + index := -99 + expectedIndex := 0 + + column, err := testDb.CreateColumnTemplate(ColumnTemplateInsert{ + BoardTemplate: boardForColumnTemplatesTest, + Name: "-99 Column", + Color: types.ColorBacklogBlue, + Visible: &visible, + Index: &index, + }) + assert.Nil(t, err) + assert.Equal(t, expectedIndex, column.Index) + + verifyColumnTemplateOrder(t, column.ID, columnTemplateInsertedFirst.ID, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID, columnTemplateInsertedSecond.ID) + columnTemplateInsertedThird = &column +} + +func testCreateColumnTemplateWithExceptionallyHighIndex(t *testing.T) { + visible := true + index := 99 + expectedIndex := 6 + + column, err := testDb.CreateColumnTemplate(ColumnTemplateInsert{ + BoardTemplate: boardForColumnTemplatesTest, + Name: "99 Column", + Color: types.ColorBacklogBlue, + Visible: &visible, + Index: &index, + }) + assert.Nil(t, err) + assert.Equal(t, expectedIndex, column.Index) + + verifyColumnTemplateOrder(t, columnTemplateInsertedThird.ID, columnTemplateInsertedFirst.ID, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID, columnTemplateInsertedSecond.ID, column.ID) + columnTemplateInsertedFourth = &column +} + +func testCreateColumnTemplateOnSecondIndex(t *testing.T) { + visible := true + index := 1 + + column, err := testDb.CreateColumnTemplate(ColumnTemplateInsert{ + BoardTemplate: boardForColumnTemplatesTest, + Name: "1 Column", + Color: types.ColorBacklogBlue, + Visible: &visible, + Index: &index, + }) + assert.Nil(t, err) + assert.Equal(t, index, column.Index) + + verifyColumnTemplateOrder(t, columnTemplateInsertedThird.ID, column.ID, columnTemplateInsertedFirst.ID, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID, columnTemplateInsertedSecond.ID, columnTemplateInsertedFourth.ID) + columnTemplateInsertedFifth = &column +} + +func testCreateColumnTemplateWithEmptyName(t *testing.T) { + index := 99 + _, err := testDb.CreateColumnTemplate(ColumnTemplateInsert{ + BoardTemplate: boardForColumnTemplatesTest, + Name: "", + Color: types.ColorBacklogBlue, + Index: &index, + }) + assert.NotNil(t, err) +} + +func testCreateColumnTemplateWithEmptyColor(t *testing.T) { + _, err := testDb.CreateColumnTemplate(ColumnTemplateInsert{ + BoardTemplate: boardForColumnTemplatesTest, + Name: "Column", + Color: "", + }) + assert.NotNil(t, err) +} + +func testCreateColumnTemplateWithDescription(t *testing.T) { + aDescription := "A column template description" + column, err := testDb.CreateColumnTemplate(ColumnTemplateInsert{ + BoardTemplate: boardForColumnTemplatesTest, + Name: "Column", + Color: types.ColorBacklogBlue, + Description: aDescription, + }) + assert.Nil(t, err) + assert.NotNil(t, column) + assert.Equal(t, aDescription, column.Description) + + // clean up to not crash other tests + _ = testDb.DeleteColumnTemplate(boardForColumnTemplatesTest, column.ID, uuid.New()) +} + +func testDeleteColumnTemplateOnSecondIndex(t *testing.T) { + err := testDb.DeleteColumnTemplate(boardForColumnTemplatesTest, columnTemplateInsertedFifth.ID, columnTemplateTestUser.ID) + assert.Nil(t, err) + + verifyColumnTemplateOrder(t, columnTemplateInsertedThird.ID, columnTemplateInsertedFirst.ID, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID, columnTemplateInsertedSecond.ID, columnTemplateInsertedFourth.ID) +} + +func testDeleteColumnTemplateOnFirstIndex(t *testing.T) { + err := testDb.DeleteColumnTemplate(boardForColumnTemplatesTest, columnTemplateInsertedThird.ID, columnTemplateTestUser.ID) + assert.Nil(t, err) + + verifyColumnTemplateOrder(t, columnTemplateInsertedFirst.ID, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID, columnTemplateInsertedSecond.ID, columnTemplateInsertedFourth.ID) +} + +func testDeleteLastColumnTemplate(t *testing.T) { + err := testDb.DeleteColumnTemplate(boardForColumnTemplatesTest, columnTemplateInsertedFourth.ID, columnTemplateTestUser.ID) + assert.Nil(t, err) + + verifyColumnTemplateOrder(t, columnTemplateInsertedFirst.ID, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID, columnTemplateInsertedSecond.ID) +} + +func testDeleteOtherColumnTemplates(t *testing.T) { + _ = testDb.DeleteColumnTemplate(boardForColumnTemplatesTest, columnTemplateInsertedFirst.ID, columnTemplateTestUser.ID) + _ = testDb.DeleteColumnTemplate(boardForColumnTemplatesTest, columnTemplateInsertedSecond.ID, columnTemplateTestUser.ID) + + verifyColumnTemplateOrder(t, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID) +} + +func testUpdateColumnTemplateName(t *testing.T) { + column, err := testDb.UpdateColumnTemplate(ColumnTemplateUpdate{ + ID: firstColumnTemplate.ID, + BoardTemplate: boardForColumnTemplatesTest, + Name: "Updated name", + Color: types.ColorBacklogBlue, + Visible: false, + Index: 0, + }) + assert.Nil(t, err) + assert.Equal(t, "Updated name", column.Name) +} + +func testUpdateColumnTemplateColor(t *testing.T) { + column, err := testDb.UpdateColumnTemplate(ColumnTemplateUpdate{ + ID: firstColumnTemplate.ID, + BoardTemplate: boardForColumnTemplatesTest, + Name: "Updated name", + Color: types.ColorPlanningPink, + Visible: false, + Index: 0, + }) + assert.Nil(t, err) + assert.Equal(t, types.ColorPlanningPink, column.Color) +} + +func testUpdateColumnTemplateVisibility(t *testing.T) { + column, err := testDb.UpdateColumnTemplate(ColumnTemplateUpdate{ + ID: firstColumnTemplate.ID, + BoardTemplate: boardForColumnTemplatesTest, + Name: "First column", + Color: types.ColorBacklogBlue, + Visible: true, + Index: 0, + }) + assert.Nil(t, err) + assert.Equal(t, true, column.Visible) +} + +func testMoveFirstColumnTemplateOnLastIndex(t *testing.T) { + _, err := testDb.UpdateColumnTemplate(ColumnTemplateUpdate{ + ID: firstColumnTemplate.ID, + BoardTemplate: boardForColumnTemplatesTest, + Name: "First column", + Color: types.ColorBacklogBlue, + Visible: true, + Index: 100, + }) + assert.Nil(t, err) + verifyColumnTemplateOrder(t, secondColumnTemplate.ID, thirdColumnTemplate.ID, firstColumnTemplate.ID) +} + +func testMoveLastColumnTemplateOnFirstIndex(t *testing.T) { + _, err := testDb.UpdateColumnTemplate(ColumnTemplateUpdate{ + ID: firstColumnTemplate.ID, + BoardTemplate: boardForColumnTemplatesTest, + Name: "First column", + Color: types.ColorBacklogBlue, + Visible: true, + Index: 0, + }) + assert.Nil(t, err) + verifyColumnTemplateOrder(t, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID) +} + +func testMoveFirstColumnTemplateOnSecondIndex(t *testing.T) { + _, err := testDb.UpdateColumnTemplate(ColumnTemplateUpdate{ + ID: firstColumnTemplate.ID, + BoardTemplate: boardForColumnTemplatesTest, + Name: "First column", + Color: types.ColorBacklogBlue, + Visible: true, + Index: 1, + }) + assert.Nil(t, err) + verifyColumnTemplateOrder(t, secondColumnTemplate.ID, firstColumnTemplate.ID, thirdColumnTemplate.ID) +} + +func testMoveSecondColumnTemplateOnFirstIndex(t *testing.T) { + _, err := testDb.UpdateColumnTemplate(ColumnTemplateUpdate{ + ID: firstColumnTemplate.ID, + BoardTemplate: boardForColumnTemplatesTest, + Name: "First column", + Color: types.ColorBacklogBlue, + Visible: true, + Index: 0, + }) + assert.Nil(t, err) + verifyColumnTemplateOrder(t, firstColumnTemplate.ID, secondColumnTemplate.ID, thirdColumnTemplate.ID) +} + +func testUpdateColumnTemplateDescription(t *testing.T) { + column, err := testDb.UpdateColumnTemplate(ColumnTemplateUpdate{ + ID: firstColumnTemplate.ID, + BoardTemplate: boardForColumnTemplatesTest, + Name: "FirstColumn", + Description: "Updated Column Template Description", + Color: types.ColorBacklogBlue, + Visible: true, + Index: 0, + }) + assert.Nil(t, err) + assert.Equal(t, "Updated Column Template Description", column.Description) +} + +func verifyColumnTemplateOrder(t *testing.T, ids ...uuid.UUID) { + expectedOrder := ids + + columns, err := testDb.ListColumnTemplates(boardForColumnTemplatesTest) + assert.Nil(t, err) + assert.Equal(t, len(ids), len(columns)) + + for index, value := range columns { + assert.Equal(t, expectedOrder[index], value.ID) + assert.Equal(t, index, value.Index) + } +} diff --git a/server/src/database/database_test.go b/server/src/database/database_test.go index ee2f1cb720..5747aa17a6 100644 --- a/server/src/database/database_test.go +++ b/server/src/database/database_test.go @@ -118,6 +118,8 @@ func loadTestdata() error { (*Voting)(nil), (*Vote)(nil), (*Reaction)(nil), + (*BoardTemplate)(nil), + (*ColumnTemplate)(nil), ) fixture = dbfixture.New(testDb.db) return fixture.Load(context.Background(), os.DirFS("testdata"), "fixture.yml") diff --git a/server/src/database/testdata/fixture.yml b/server/src/database/testdata/fixture.yml index cba31165c3..aebf88f7ea 100644 --- a/server/src/database/testdata/fixture.yml +++ b/server/src/database/testdata/fixture.yml @@ -31,6 +31,17 @@ account_type: ANONYMOUS created_at: '{{ now }}' +- model: BoardTemplate + rows: + - _id: columnTemplatesTestBoard + id: "3113b096-986c-4e23-adf7-b3fa19224bd4" + creator: "62e0ea41-6fbf-49a3-8921-1d2f4e5ae316" + name: John's template board + description: Board template test + access_policy: PUBLIC + favourite: false + created_at: '{{ now }}' + - model: Board rows: - _id: columnsTestBoard @@ -170,6 +181,33 @@ user: '{{ $.User.justin.ID }}' role: OWNER +- model: ColumnTemplate + rows: + - _id: firstColumnTemplate + id: "2813b000-0000-4e23-adf7-c3fa19224bd4" + board_template: '{{ $.BoardTemplate.columnTemplatesTestBoard.ID }}' + name: First column + description: Fist column description + color: backlog-blue + visible: true + index: 0 + - _id: secondColumnTemplate + id: "2813b000-0001-4e23-adf7-c3fa19224bd4" + board_template: '{{ $.BoardTemplate.columnTemplatesTestBoard.ID }}' + name: Second column + description: Second column description + color: backlog-blue + visible: true + index: 1 + - _id: thirdColumnTemplate + id: "2813b000-0002-4e23-adf7-c3fa19224bd4" + board_template: '{{ $.BoardTemplate.columnTemplatesTestBoard.ID }}' + name: Third column + description: Third column description + color: backlog-blue + visible: true + index: 2 + - model: Column rows: - _id: firstColumn From 2927be47c76f6315b02e2aa2cb47ac0b028a969f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 22:43:19 +0200 Subject: [PATCH 047/321] yarn(deps-dev): bump cypress from 13.13.2 to 13.13.3 (#4409) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7841403614..9ce40f52b5 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "cross-env": "^7.0.3", - "cypress": "^13.13.2", + "cypress": "^13.13.3", "eslint": "^8.57.0", "eslint-config-airbnb": "19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", diff --git a/yarn.lock b/yarn.lock index d9599d7df0..2c4eacc209 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4321,10 +4321,10 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== -cypress@^13.13.2: - version "13.13.2" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.13.2.tgz#c71f8d92056c430b1b879e5313f6de25ccce0eda" - integrity sha512-PvJQU33933NvS1StfzEb8/mu2kMy4dABwCF+yd5Bi7Qly1HOVf+Bufrygee/tlmty/6j5lX+KIi8j9Q3JUMbhA== +cypress@^13.13.3: + version "13.13.3" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.13.3.tgz#21ee054bb4e00b3858f2e33b4f8f4e69128470a9" + integrity sha512-hUxPrdbJXhUOTzuML+y9Av7CKoYznbD83pt8g3klgpioEha0emfx4WNIuVRx0C76r0xV2MIwAW9WYiXfVJYFQw== dependencies: "@cypress/request" "^3.0.1" "@cypress/xvfb" "^1.2.4" From 2ac39eac988a832e308bb9296ba04ac680fe6858 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 22:43:43 +0200 Subject: [PATCH 048/321] yarn(deps-dev): bump stylelint from 16.8.1 to 16.8.2 (#4412) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 88 ++++++++++++++++++++++++++-------------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 9ce40f52b5..e7355dbc4e 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "redux-mock-store": "^1.5.4", "resize-observer-polyfill": "^1.5.1", "sass": "^1.77.8", - "stylelint": "^16.8.1", + "stylelint": "^16.8.2", "stylelint-config-standard": "^36.0.1", "ts-jest": "^29.2.4", "typescript": "^5.4.5" diff --git a/yarn.lock b/yarn.lock index 2c4eacc209..91d9febd5d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1208,20 +1208,20 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@csstools/css-parser-algorithms@^2.7.1": - version "2.7.1" - resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.1.tgz#6d93a8f7d8aeb7cd9ed0868f946e46f021b6aa70" - integrity sha512-2SJS42gxmACHgikc1WGesXLIT8d/q2l0UFM7TaEeIzdFCE/FPMtTiizcPGGJtlPo2xuQzY09OhrLTzRxqJqwGw== +"@csstools/css-parser-algorithms@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.0.tgz#dd428c4569caea7185716fbba174202a4ba41fda" + integrity sha512-20hEErXV9GEx15qRbsJVzB91ryayx1F2duHPBrfZXQAHz/dJG0u/611URpr28+sFjm3EI7U17Pj9SVA9NSAGJA== -"@csstools/css-tokenizer@^2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.4.1.tgz#1d8b2e200197cf5f35ceb07ca2dade31f3a00ae8" - integrity sha512-eQ9DIktFJBhGjioABJRtUucoWR2mwllurfnM8LuNGAqX3ViZXaUchqk+1s7jjtkFiT9ySdACsFEA3etErkALUg== +"@csstools/css-tokenizer@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-3.0.0.tgz#9a8a1ea564dd92b8b567e0507c29f74252e01e04" + integrity sha512-efZvfJyYrqH9hPCKtOBywlTsCXnEzAI9sLHFzUsDpBb+1bQ+bxJnwL9V2bRKv9w4cpIp75yxGeZRaVKoMQnsEg== -"@csstools/media-query-list-parser@^2.1.13": - version "2.1.13" - resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.13.tgz#f00be93f6bede07c14ddf51a168ad2748e4fe9e5" - integrity sha512-XaHr+16KRU9Gf8XLi3q8kDlI18d5vzKSKCY510Vrtc9iNR0NJzbY9hhTmwhzYZj/ZwGL4VmB3TA9hJW0Um2qFA== +"@csstools/media-query-list-parser@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.0.tgz#a4388fa58e0981d705b8286fa3376e71c5954faa" + integrity sha512-W0JlkUFwXjo703wt06AcaWuUcS+6x6IEDyxV6W65Sw+vLCYp+uPsrps+PXTiIfN0V1Pqj5snPzN7EYLmbz1zjg== "@csstools/normalize.css@*": version "12.0.0" @@ -1334,10 +1334,10 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz#2cbcf822bf3764c9658c4d2e568bd0c0cb748016" integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw== -"@csstools/selector-specificity@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz#63085d2995ca0f0e55aa8b8a07d69bfd48b844fe" - integrity sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA== +"@csstools/selector-specificity@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz#7dfccb9df5499e627e7bfdbb4021a06813a45dba" + integrity sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ== "@cypress/request@^3.0.1": version "3.0.1" @@ -6566,10 +6566,10 @@ ieee754@^1.1.13: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^5.2.0, ignore@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== +ignore@^5.2.0, ignore@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== immer@^9.0.21, immer@^9.0.7: version "9.0.21" @@ -9280,10 +9280,10 @@ postcss-replace-overflow-wrap@^4.0.0: resolved "https://registry.yarnpkg.com/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz#d2df6bed10b477bf9c52fab28c568b4b29ca4319" integrity sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw== -postcss-resolve-nested-selector@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.4.tgz#0068767902fb40f0e6cd7b24faee4fa4bc14a5da" - integrity sha512-R6vHqZWgVnTAPq0C+xjyHfEZqfIYboCBVSy24MjxEDm+tIh1BU4O6o7DP7AA7kHzf136d+Qc5duI4tlpHjixDw== +postcss-resolve-nested-selector@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz#3d84dec809f34de020372c41b039956966896686" + integrity sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw== postcss-safe-parser@^7.0.0: version "7.0.0" @@ -9297,10 +9297,10 @@ postcss-selector-not@^6.0.1: dependencies: postcss-selector-parser "^6.0.10" -postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9, postcss-selector-parser@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.1.tgz#5be94b277b8955904476a2400260002ce6c56e38" - integrity sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg== +postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9, postcss-selector-parser@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" + integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" @@ -9333,10 +9333,10 @@ postcss@^7.0.35: picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.3.5, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.4, postcss@^8.4.40: - version "8.4.40" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.40.tgz#eb81f2a4dd7668ed869a6db25999e02e9ad909d8" - integrity sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q== +postcss@^8.3.5, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.4, postcss@^8.4.41: + version "8.4.41" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681" + integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== dependencies: nanoid "^3.3.7" picocolors "^1.0.1" @@ -10889,15 +10889,15 @@ stylelint-config-standard@^36.0.1: dependencies: stylelint-config-recommended "^14.0.1" -stylelint@^16.8.1: - version "16.8.1" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.8.1.tgz#7d4b2d7922771dd0514446a66f04e954f1dfa444" - integrity sha512-O8aDyfdODSDNz/B3gW2HQ+8kv8pfhSu7ZR7xskQ93+vI6FhKKGUJMQ03Ydu+w3OvXXE0/u4hWU4hCPNOyld+OA== +stylelint@^16.8.2: + version "16.8.2" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.8.2.tgz#7fda18b919a36e206e897417d4720baceb3af122" + integrity sha512-fInKATippQhcSm7AB+T32GpI+626yohrg33GkFT/5jzliUw5qhlwZq2UQQwgl3HsHrf09oeARi0ZwgY/UWEv9A== dependencies: - "@csstools/css-parser-algorithms" "^2.7.1" - "@csstools/css-tokenizer" "^2.4.1" - "@csstools/media-query-list-parser" "^2.1.13" - "@csstools/selector-specificity" "^3.1.1" + "@csstools/css-parser-algorithms" "^3.0.0" + "@csstools/css-tokenizer" "^3.0.0" + "@csstools/media-query-list-parser" "^3.0.0" + "@csstools/selector-specificity" "^4.0.0" "@dual-bundle/import-meta-resolve" "^4.1.0" balanced-match "^2.0.0" colord "^2.9.3" @@ -10912,7 +10912,7 @@ stylelint@^16.8.1: globby "^11.1.0" globjoin "^0.1.4" html-tags "^3.3.1" - ignore "^5.3.1" + ignore "^5.3.2" imurmurhash "^0.1.4" is-plain-object "^5.0.0" known-css-properties "^0.34.0" @@ -10921,10 +10921,10 @@ stylelint@^16.8.1: micromatch "^4.0.7" normalize-path "^3.0.0" picocolors "^1.0.1" - postcss "^8.4.40" - postcss-resolve-nested-selector "^0.1.4" + postcss "^8.4.41" + postcss-resolve-nested-selector "^0.1.6" postcss-safe-parser "^7.0.0" - postcss-selector-parser "^6.1.1" + postcss-selector-parser "^6.1.2" postcss-value-parser "^4.2.0" resolve-from "^5.0.0" string-width "^4.2.3" From 349c6e4022adb8f23cfe7e24f0e6b9128ef761ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 22:54:14 +0200 Subject: [PATCH 049/321] yarn(deps): bump i18next from 23.12.3 to 23.13.0 (#4411) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e7355dbc4e..97b16e785f 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "avataaars": "^2.0.0", "classnames": "^2.5.1", "file-saver": "^2.0.5", - "i18next": "^23.12.3", + "i18next": "^23.13.0", "i18next-browser-languagedetector": "^8.0.0", "js-cookie": "^3.0.5", "linkify-react": "^4.1.3", diff --git a/yarn.lock b/yarn.lock index 91d9febd5d..3ed085ab2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6523,10 +6523,10 @@ i18next@^21.0.1: dependencies: "@babel/runtime" "^7.17.2" -i18next@^23.12.3: - version "23.12.3" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.12.3.tgz#e0b811ef218f6d3fdb0b91f1a1eed099a1f7c48b" - integrity sha512-DyigQmrR10V9U2N6pjhbfahW13GY7n8BQD9swN09JuRRropgsksWVi4vRLeex0Qf7zCPnBfIqQfhcBzdZBQBYw== +i18next@^23.13.0: + version "23.13.0" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.13.0.tgz#d3cba6c5611b9826ff988f97a4929638a91875f6" + integrity sha512-B+g0/KTKmN3+NeMKPljQxdrih6Q6lyDF5O2e/Ofd0JQsTLojJD/BSTTN04iw6OVc0yBiHeypu5hoBNV6ag44Zw== dependencies: "@babel/runtime" "^7.23.2" From 1e5b41772dd9ced2cca0407c8c6fc8b0e2917a73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:00:54 +0200 Subject: [PATCH 050/321] yarn(deps): bump @fontsource/raleway from 5.0.19 to 5.0.20 (#4414) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 97b16e785f..01c7965622 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@dnd-kit/modifiers": "^7.0.0", "@dnd-kit/sortable": "^8.0.0", "@dnd-kit/utilities": "^3.2.2", - "@fontsource/raleway": "^5.0.19", + "@fontsource/raleway": "^5.0.20", "@react-hook/resize-observer": "^2.0.2", "@react-spring/web": "^9.7.4", "@reduxjs/toolkit": "^1.9.7", diff --git a/yarn.lock b/yarn.lock index 3ed085ab2d..36ba4a6720 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1467,10 +1467,10 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.1.tgz#16308cea045f0fc777b6ff20a9f25474dd8293d2" integrity sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q== -"@fontsource/raleway@^5.0.19": - version "5.0.19" - resolved "https://registry.yarnpkg.com/@fontsource/raleway/-/raleway-5.0.19.tgz#efefc830d7b76eec537ef4cd547bb730c38584a5" - integrity sha512-S4fAg/Kmvkw5g6Z2eoxGijeYcopsfQIla+iXbOYZsIUaFHcS49l/qBNO3MWZ8iJ+PCFulz9juv2OjPPvMW43oA== +"@fontsource/raleway@^5.0.20": + version "5.0.20" + resolved "https://registry.yarnpkg.com/@fontsource/raleway/-/raleway-5.0.20.tgz#114b865c92eec473ca5f4268c97bc918e57dc249" + integrity sha512-ZgTAEnlVYUIk75RM1Xsyk932zQ29DgxVr7io0QwVfDwcr88LHop0e2BZhBBI4MxL4b5L+T91RYwm6mLl/CXnpA== "@humanwhocodes/config-array@^0.11.14": version "0.11.14" From e6c1b1221f7f94d3960eae01df5dd1713d97f17a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:01:20 +0200 Subject: [PATCH 051/321] yarn(deps-dev): bump @types/node from 22.3.0 to 22.4.1 (#4415) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 01c7965622..da387ac333 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.12", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.3.0", + "@types/node": "^22.4.1", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index 36ba4a6720..40229489bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2369,12 +2369,12 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^22.3.0": - version "22.3.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.3.0.tgz#7f8da0e2b72c27c4f9bd3cb5ef805209d04d4f9e" - integrity sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g== +"@types/node@*", "@types/node@^22.4.1": + version "22.4.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.4.1.tgz#9b595d292c65b94c20923159e2ce947731b6fdce" + integrity sha512-1tbpb9325+gPnKK0dMm+/LMriX0vKxf6RnB0SZUqfyVkQ4fMgUSySqhxE/y8Jvs4NyF1yHzTfG9KlnkIODxPKg== dependencies: - undici-types "~6.18.2" + undici-types "~6.19.2" "@types/parse-json@^4.0.0": version "4.0.0" @@ -11477,10 +11477,10 @@ underscore@1.x.x, underscore@^1.13.7, underscore@^1.8.3: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== -undici-types@~6.18.2: - version "6.18.2" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.18.2.tgz#8b678cf939d4fc9ec56be3c68ed69c619dee28b0" - integrity sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ== +undici-types@~6.19.2: + version "6.19.6" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.6.tgz#e218c3df0987f4c0e0008ca00d6b6472d9b89b36" + integrity sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" From 1f9ee6b954f99c60dccebb834b2ab8e561a7b5b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 17:25:08 +0200 Subject: [PATCH 052/321] yarn(deps): bump i18next from 23.13.0 to 23.14.0 (#4416) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index da387ac333..51bc8cf4c1 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "avataaars": "^2.0.0", "classnames": "^2.5.1", "file-saver": "^2.0.5", - "i18next": "^23.13.0", + "i18next": "^23.14.0", "i18next-browser-languagedetector": "^8.0.0", "js-cookie": "^3.0.5", "linkify-react": "^4.1.3", diff --git a/yarn.lock b/yarn.lock index 40229489bd..afab432ae4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6523,10 +6523,10 @@ i18next@^21.0.1: dependencies: "@babel/runtime" "^7.17.2" -i18next@^23.13.0: - version "23.13.0" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.13.0.tgz#d3cba6c5611b9826ff988f97a4929638a91875f6" - integrity sha512-B+g0/KTKmN3+NeMKPljQxdrih6Q6lyDF5O2e/Ofd0JQsTLojJD/BSTTN04iw6OVc0yBiHeypu5hoBNV6ag44Zw== +i18next@^23.14.0: + version "23.14.0" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.14.0.tgz#d415a858390cc849f3db0df539cb2bbfe24a3cdb" + integrity sha512-Y5GL4OdA8IU2geRrt2+Uc1iIhsjICdHZzT9tNwQ3TVqdNzgxHToGCKf/TPRP80vTCAP6svg2WbbJL+Gx5MFQVA== dependencies: "@babel/runtime" "^7.23.2" From 29ba41cfb36614852069f07feabfe976f76da281 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:18:30 +0200 Subject: [PATCH 053/321] yarn(deps-dev): bump @types/node from 22.4.1 to 22.4.2 (#4419) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 51bc8cf4c1..8ae7c84c97 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.12", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.4.1", + "@types/node": "^22.4.2", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index afab432ae4..294a744d51 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2369,10 +2369,10 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^22.4.1": - version "22.4.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.4.1.tgz#9b595d292c65b94c20923159e2ce947731b6fdce" - integrity sha512-1tbpb9325+gPnKK0dMm+/LMriX0vKxf6RnB0SZUqfyVkQ4fMgUSySqhxE/y8Jvs4NyF1yHzTfG9KlnkIODxPKg== +"@types/node@*", "@types/node@^22.4.2": + version "22.4.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.4.2.tgz#55fefb1c3dba2ecd7eb76738c6b80da75760523f" + integrity sha512-nAvM3Ey230/XzxtyDcJ+VjvlzpzoHwLsF7JaDRfoI0ytO0mVheerNmM45CtA0yOILXwXXxOrcUWH3wltX+7PSw== dependencies: undici-types "~6.19.2" From 1a5a986172ca6053d0b817c2db49cb0af91d27f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:18:44 +0200 Subject: [PATCH 054/321] yarn(deps-dev): bump @types/react from 18.3.3 to 18.3.4 (#4418) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8ae7c84c97..78898fb684 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@types/js-cookie": "^3.0.6", "@types/node": "^22.4.2", "@types/qrcode.react": "^1.0.5", - "@types/react": "^18.3.3", + "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", "@types/react-helmet": "^6.1.11", "@types/redux-mock-store": "^1.0.6", diff --git a/yarn.lock b/yarn.lock index 294a744d51..ecd665973d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2427,10 +2427,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.3.3": - version "18.3.3" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.3.tgz#9679020895318b0915d7a3ab004d92d33375c45f" - integrity sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw== +"@types/react@*", "@types/react@^18.3.4": + version "18.3.4" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.4.tgz#dfdd534a1d081307144c00e325c06e00312c93a3" + integrity sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw== dependencies: "@types/prop-types" "*" csstype "^3.0.2" From 7a8d2e4356b64f7da83517f9dffe2090609cc517 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:19:01 +0200 Subject: [PATCH 055/321] yarn(deps-dev): bump husky from 9.1.4 to 9.1.5 (#4417) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 78898fb684..9cb5892d9c 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "eslint-plugin-react": "7.35.0", "eslint-plugin-react-hooks": "4.6.2", "hash-files": "^1.1.1", - "husky": "^9.1.4", + "husky": "^9.1.5", "i18next-fs-backend": "^2.3.2", "lint-staged": "^15.2.9", "prettier": "^3.3.3", diff --git a/yarn.lock b/yarn.lock index ecd665973d..b4f3aa1ddb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6499,10 +6499,10 @@ human-signals@^5.0.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== -husky@^9.1.4: - version "9.1.4" - resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.4.tgz#926fd19c18d345add5eab0a42b2b6d9a80259b34" - integrity sha512-bho94YyReb4JV7LYWRWxZ/xr6TtOTt8cMfmQ39MQYJ7f/YE268s3GdghGwi+y4zAeqewE5zYLvuhV0M0ijsDEA== +husky@^9.1.5: + version "9.1.5" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.5.tgz#2b6edede53ee1adbbd3a3da490628a23f5243b83" + integrity sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag== i18next-browser-languagedetector@^8.0.0: version "8.0.0" From dc3421e11e6f608a445fe6c55781667b20ea21a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:19:16 +0200 Subject: [PATCH 056/321] yarn(deps): bump react-router-dom from 6.23.1 to 6.26.1 (#4413) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 9cb5892d9c..fc5c5e438a 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "react-i18next": "^15.0.1", "react-redux": "^9.1.2", "react-router": "^6.22.0", - "react-router-dom": "^6.23.1", + "react-router-dom": "^6.26.1", "react-to-print": "^2.15.1", "react-toastify": "^10.0.5", "react-tooltip": "^5.28.0", diff --git a/yarn.lock b/yarn.lock index b4f3aa1ddb..371ae7174c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1919,10 +1919,10 @@ redux-thunk "^2.4.2" reselect "^4.1.8" -"@remix-run/router@1.16.1": - version "1.16.1" - resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.16.1.tgz#73db3c48b975eeb06d0006481bde4f5f2d17d1cd" - integrity sha512-es2g3dq6Nb07iFxGk5GuHN20RwBZOsuDQN7izWIisUcv9r+d2C5jQxqmgkdebXgReWfiyUabcki6Fg77mSNrig== +"@remix-run/router@1.19.1": + version "1.19.1" + resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.1.tgz#984771bfd1de2715f42394c87fb716c1349e014f" + integrity sha512-S45oynt/WH19bHbIXjtli6QmwNYvaz+vtnubvNpNDvUOoA/OWh6j1OikIP3G+v5GHdxyC6EXoChG3HgYGEUfcg== "@rollup/plugin-babel@^5.2.0": version "5.3.1" @@ -9688,20 +9688,20 @@ react-refresh@^0.11.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046" integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A== -react-router-dom@^6.23.1: - version "6.23.1" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.23.1.tgz#30cbf266669693e9492aa4fc0dde2541ab02322f" - integrity sha512-utP+K+aSTtEdbWpC+4gxhdlPFwuEfDKq8ZrPFU65bbRJY+l706qjR7yaidBpo3MSeA/fzwbXWbKBI6ftOnP3OQ== +react-router-dom@^6.26.1: + version "6.26.1" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.26.1.tgz#a408892b41767a49dc94b3564b0e7d8e3959f623" + integrity sha512-veut7m41S1fLql4pLhxeSW3jlqs+4MtjRLj0xvuCEXsxusJCbs6I8yn9BxzzDX2XDgafrccY6hwjmd/bL54tFw== dependencies: - "@remix-run/router" "1.16.1" - react-router "6.23.1" + "@remix-run/router" "1.19.1" + react-router "6.26.1" -react-router@6.23.1, react-router@^6.22.0: - version "6.23.1" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.23.1.tgz#d08cbdbd9d6aedc13eea6e94bc6d9b29cb1c4be9" - integrity sha512-fzcOaRF69uvqbbM7OhvQyBTFDVrrGlsFdS3AL+1KfIBtGETibHzi3FkoTRyiDJnWNc2VxrfvR+657ROHjaNjqQ== +react-router@6.26.1, react-router@^6.22.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.26.1.tgz#88c64837e05ffab6899a49df2a1484a22471e4ce" + integrity sha512-kIwJveZNwp7teQRI5QmwWo39A5bXRyqpH0COKKmPnyD2vBvDwgFXSqDUYtt1h+FEyfnE8eXr7oe0MxRzVwCcvQ== dependencies: - "@remix-run/router" "1.16.1" + "@remix-run/router" "1.19.1" react-scripts@^5.0.1: version "5.0.1" From a19394831e5aa40f245d5d0a03270c558af65734 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:11:13 +0200 Subject: [PATCH 057/321] yarn(deps-dev): bump typescript from 5.4.5 to 5.5.3 (#4281) Signed-off-by: dependabot[bot] Co-authored-by: Jakob Schwehn Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- .../BoardUsers/__tests__/BoardUsers.test.tsx | 3 -- .../__tests__/CookiePolicy.test.tsx | 10 ++-- .../__tests__/LoginProviders.test.tsx | 15 +++++- .../MenuBars/__tests__/MenuBars.test.tsx | 2 +- .../__snapshots__/MenuBars.test.tsx.snap | 4 +- .../ExportBoard/PrintView/PrintView.tsx | 7 ++- .../SettingsDialog/ExportBoard/types.ts | 50 ------------------- .../Feedback/__tests__/Feedback.test.tsx | 15 +++++- .../__tests__/Participants.test.tsx | 4 +- src/constants/colors.scss | 3 +- src/constants/{name.ts => nameList.ts} | 35 ++----------- src/routes/LoginBoard/LoginBoard.tsx | 2 +- src/store/reducer/participants.ts | 4 +- src/store/reducer/skinTone.ts | 2 +- src/types/participant.ts | 2 +- src/utils/export.ts | 35 +++++++------ src/utils/test/export.test.ts | 1 - src/utils/test/getTestApplicationState.ts | 1 - yarn.lock | 8 +-- 20 files changed, 77 insertions(+), 128 deletions(-) delete mode 100644 src/components/SettingsDialog/ExportBoard/types.ts rename src/constants/{name.ts => nameList.ts} (91%) diff --git a/package.json b/package.json index fc5c5e438a..0425b62ad8 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "stylelint": "^16.8.2", "stylelint-config-standard": "^36.0.1", "ts-jest": "^29.2.4", - "typescript": "^5.4.5" + "typescript": "^5.5.3" }, "scripts": { "start": "react-scripts start", diff --git a/src/components/BoardUsers/__tests__/BoardUsers.test.tsx b/src/components/BoardUsers/__tests__/BoardUsers.test.tsx index 2aae495b87..b72573953a 100644 --- a/src/components/BoardUsers/__tests__/BoardUsers.test.tsx +++ b/src/components/BoardUsers/__tests__/BoardUsers.test.tsx @@ -25,7 +25,6 @@ describe("users", () => { getTestParticipant({user: {id: "other-3", name: "other-3"}}), getTestParticipant({user: {id: "other-4", name: "other-4"}}), ], - focusInitiator: null, }, }) ); @@ -42,7 +41,6 @@ describe("users", () => { getTestParticipant({user: {id: "other-3", name: "other-3"}}), getTestParticipant({user: {id: "other-4", name: "other-4"}}), ], - focusInitiator: null, }, }) ); @@ -60,7 +58,6 @@ describe("users", () => { getTestParticipant({user: {id: "other-4", name: "other-4"}}), getTestParticipant({user: {id: "other-5", name: "other-5"}}), ], - focusInitiator: null, }, }) ); diff --git a/src/components/CookieNotice/__tests__/CookiePolicy.test.tsx b/src/components/CookieNotice/__tests__/CookiePolicy.test.tsx index ac0c8b4579..f9afc191c4 100644 --- a/src/components/CookieNotice/__tests__/CookiePolicy.test.tsx +++ b/src/components/CookieNotice/__tests__/CookiePolicy.test.tsx @@ -17,7 +17,7 @@ describe("Cookie Policy should be rendered with:", () => { const {container} = render( - {}} decline={() => {}} onClose={() => {}} show darkBackground /> + {}} decline={() => {}} onClose={() => {}} show /> , {container: global.document.querySelector("#portal")!} ); @@ -31,7 +31,7 @@ describe("Cookie Policy should be rendered with:", () => { const {container} = render( - {}} decline={() => {}} onClose={() => {}} show darkBackground /> + {}} decline={() => {}} onClose={() => {}} show /> , {container: global.document.querySelector("#portal")!} ); @@ -45,7 +45,7 @@ describe("Cookie Policy should be rendered with:", () => { const {container} = render( - {}} decline={() => {}} onClose={() => {}} show darkBackground /> + {}} decline={() => {}} onClose={() => {}} show /> , {container: global.document.querySelector("#portal")!} ); @@ -59,7 +59,7 @@ describe("Cookie Policy should be rendered with:", () => { const {container} = render( - {}} decline={() => {}} onClose={() => {}} show darkBackground /> + {}} decline={() => {}} onClose={() => {}} show /> , {container: global.document.querySelector("#portal")!} ); @@ -73,7 +73,7 @@ describe("Cookie Policy should be rendered with:", () => { const {container} = render( - {}} decline={() => {}} onClose={() => {}} show darkBackground /> + {}} decline={() => {}} onClose={() => {}} show /> , {container: global.document.querySelector("#portal")!} ); diff --git a/src/components/LoginProviders/__tests__/LoginProviders.test.tsx b/src/components/LoginProviders/__tests__/LoginProviders.test.tsx index dd3b8c1571..d5d6bc60c5 100644 --- a/src/components/LoginProviders/__tests__/LoginProviders.test.tsx +++ b/src/components/LoginProviders/__tests__/LoginProviders.test.tsx @@ -7,7 +7,20 @@ import getTestStore from "utils/test/getTestStore"; describe("check for all provider buttons", () => { const createLoginProviders = (providers?: string[]) => ( - + ); diff --git a/src/components/MenuBars/__tests__/MenuBars.test.tsx b/src/components/MenuBars/__tests__/MenuBars.test.tsx index 5c0c4f61e1..a4e5f59711 100644 --- a/src/components/MenuBars/__tests__/MenuBars.test.tsx +++ b/src/components/MenuBars/__tests__/MenuBars.test.tsx @@ -7,7 +7,7 @@ import getTestParticipant from "../../../utils/test/getTestParticipant"; const createMenuBars = (store: MockStoreEnhanced) => ( - + {}} onPreviousColumn={() => {}} /> ); diff --git a/src/components/MenuBars/__tests__/__snapshots__/MenuBars.test.tsx.snap b/src/components/MenuBars/__tests__/__snapshots__/MenuBars.test.tsx.snap index b22d65b87a..39e6539d7a 100644 --- a/src/components/MenuBars/__tests__/__snapshots__/MenuBars.test.tsx.snap +++ b/src/components/MenuBars/__tests__/__snapshots__/MenuBars.test.tsx.snap @@ -169,7 +169,7 @@ exports[`MenuBars should match snapshot 1`] = ` + +
  • + +
  • +
  • + +
  • +
  • + +
  • + + + +
    + + + + +`; + +exports[`Mark me as Done Tooltip Logic Does not expand the tooltip if the timer is not expired 1`] = ` + + + + +`; + +exports[`Mark me as Done Tooltip Logic Expand the tooltip everytime a potential ready state in voting is fulfilled. 1`] = ` + + + + +`; + exports[`MenuBars should match snapshot 1`] = `
    ); }; diff --git a/src/components/LoginProviders/__tests__/LoginProviders.test.tsx b/src/components/LoginProviders/__tests__/LoginProviders.test.tsx index d5d6bc60c5..2d7af03aa9 100644 --- a/src/components/LoginProviders/__tests__/LoginProviders.test.tsx +++ b/src/components/LoginProviders/__tests__/LoginProviders.test.tsx @@ -34,12 +34,21 @@ describe("check for all provider buttons", () => { const {container} = render(createLoginProviders(["GOOGLE"])); expect(container.querySelector("#google")).toBeInTheDocument(); expect(container.querySelector("#microsoft")).not.toBeInTheDocument(); + expect(container.querySelector("#oidc")).not.toBeInTheDocument(); }); test("microsoft sign in", () => { const {container} = render(createLoginProviders(["MICROSOFT"])); expect(container.querySelector("#google")).not.toBeInTheDocument(); expect(container.querySelector("#microsoft")).toBeInTheDocument(); + expect(container.querySelector("#oidc")).not.toBeInTheDocument(); + }); + + test("oidc sign in", () => { + const {container} = render(createLoginProviders(["OIDC"])); + expect(container.querySelector("#google")).not.toBeInTheDocument(); + expect(container.querySelector("#microsoft")).not.toBeInTheDocument(); + expect(container.querySelector("#oidc")).toBeInTheDocument(); }); describe("click-handler", () => { @@ -58,5 +67,12 @@ describe("check for all provider buttons", () => { fireEvent.click(button!); expect(signInSpy).toHaveBeenCalledWith("microsoft", expect.anything()); }); + + test("oidc sign in", () => { + const {container} = render(createLoginProviders(["OIDC"])); + const button = container.querySelector("#oidc"); + fireEvent.click(button!); + expect(signInSpy).toHaveBeenCalledWith("oidc", expect.anything()); + }); }); }); diff --git a/src/i18n/de/translation.json b/src/i18n/de/translation.json index dcf52a25fb..9a16713bad 100644 --- a/src/i18n/de/translation.json +++ b/src/i18n/de/translation.json @@ -155,7 +155,8 @@ "signInWithGitHub": "Einloggen mit Github", "signInWithMicrosoft": "Einloggen mit Microsoft", "signInWithAzureAd": "Einloggen mit Azure AD", - "signInWithApple": "Einloggen mit Apple" + "signInWithApple": "Einloggen mit Apple", + "signInWithOIDC": "Einloggen mit OpenID Connect" }, "NoteInput": { "placeholder": "FΓΌge ein KΓ€rtchen hinzu...", diff --git a/src/i18n/en/translation.json b/src/i18n/en/translation.json index 34043df6d6..a07e617e6a 100644 --- a/src/i18n/en/translation.json +++ b/src/i18n/en/translation.json @@ -155,7 +155,8 @@ "signInWithGitHub": "Sign in with Github", "signInWithMicrosoft": "Sign in with Microsoft", "signInWithAzureAd": "Sign in with Azure AD", - "signInWithApple": "Sign in with Apple" + "signInWithApple": "Sign in with Apple", + "signInWithOIDC": "Sign in with OpenID Connect" }, "NoteInput": { "placeholder": "Add your note...", From 30fe50535ff71c497681e4d7fa352670ff28f25f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:09:40 +0200 Subject: [PATCH 132/321] yarn(deps-dev): bump @types/node from 22.5.5 to 22.7.0 (#4509) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4c2626bed6..798a9681bb 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.13", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.5.5", + "@types/node": "^22.7.0", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.8", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index b3d6281572..fbeff66903 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2383,10 +2383,10 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^22.5.5": - version "22.5.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44" - integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== +"@types/node@*", "@types/node@^22.7.0": + version "22.7.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.0.tgz#670aa1874bc836863e5c116f9f2c32416ff27e1f" + integrity sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw== dependencies: undici-types "~6.19.2" From e2410af6c20d68accbdd81d2c7cbf6adb7b54a05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:09:55 +0200 Subject: [PATCH 133/321] yarn(deps-dev): bump @types/react from 18.3.8 to 18.3.9 (#4510) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 798a9681bb..e793aaf306 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@types/js-cookie": "^3.0.6", "@types/node": "^22.7.0", "@types/qrcode.react": "^1.0.5", - "@types/react": "^18.3.8", + "@types/react": "^18.3.9", "@types/react-dom": "^18.3.0", "@types/react-helmet": "^6.1.11", "@types/redux-mock-store": "^1.0.6", diff --git a/yarn.lock b/yarn.lock index fbeff66903..93ef87a98d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2441,10 +2441,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.3.8": - version "18.3.8" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.8.tgz#1672ab19993f8aca7c7dc844c07d5d9e467d5a79" - integrity sha512-syBUrW3/XpnW4WJ41Pft+I+aPoDVbrBVQGEnbD7NijDGlVC+8gV/XKRY+7vMDlfPpbwYt0l1vd/Sj8bJGMbs9Q== +"@types/react@*", "@types/react@^18.3.9": + version "18.3.9" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.9.tgz#2cdf5f425ec8a133d67e9e3673909738b783db20" + integrity sha512-+BpAVyTpJkNWWSSnaLBk6ePpHLOGJKnEQNbINNovPWzvEUyAe3e+/d494QdEh71RekM/qV7lw6jzf1HGrJyAtQ== dependencies: "@types/prop-types" "*" csstype "^3.0.2" From 07354e3454420bd5f723808d73ae8815a7664de8 Mon Sep 17 00:00:00 2001 From: Manuel Brandstetter <36969812+brandstetterm@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:43:38 +0200 Subject: [PATCH 134/321] Bump version to 3.9.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e793aaf306..156de67ed9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "url": "https://github.com/inovex/scrumlr.io/issues", "email": "info@scrumlr.io" }, - "version": "3.8.2", + "version": "3.9.0", "private": true, "license": "MIT", "dependencies": { From c7cbfe415abaa0559d3e9bc684a6951772c6efc5 Mon Sep 17 00:00:00 2001 From: Jakob Schwehn Date: Mon, 30 Sep 2024 16:12:58 +0200 Subject: [PATCH 135/321] fix: scss warnings (#4486) --- src/components/MenuBars/MenuBars.scss | 3 ++- .../SettingsDialog/BoardSettings/BoardSettings.scss | 5 +++-- .../SettingsDialog/ProfileSettings/ProfileSettings.scss | 4 ++-- src/constants/colors.scss | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/MenuBars/MenuBars.scss b/src/components/MenuBars/MenuBars.scss index 95a8348061..8fe4b0cc99 100644 --- a/src/components/MenuBars/MenuBars.scss +++ b/src/components/MenuBars/MenuBars.scss @@ -129,10 +129,11 @@ $menu-mobile__width: 72px; } .menu-bars-mobile__fab-main--isExpanded { + background: $gray--000; + svg { color: $navy--900; } - background: $gray--000; } } diff --git a/src/components/SettingsDialog/BoardSettings/BoardSettings.scss b/src/components/SettingsDialog/BoardSettings/BoardSettings.scss index 57794b98e7..4e2431f25c 100644 --- a/src/components/SettingsDialog/BoardSettings/BoardSettings.scss +++ b/src/components/SettingsDialog/BoardSettings/BoardSettings.scss @@ -7,12 +7,12 @@ margin-right: calc(-1 * ($spacing--xs + 10px)); padding-bottom: $settings-dialog-container--bottom; + @include scrollbar(); + &:focus-visible { outline: 2px dashed rgba(var(--accent-color--light-rgb), 0.5); border-radius: 8px; } - - @include scrollbar(); } @media screen and (min-width: 920px) { @@ -80,6 +80,7 @@ .board-settings__board-name-button_input { color: $gray--000; } + .board-settings__board-name-button_input::placeholder { color: $gray--000; } diff --git a/src/components/SettingsDialog/ProfileSettings/ProfileSettings.scss b/src/components/SettingsDialog/ProfileSettings/ProfileSettings.scss index 97f77792aa..fdea209945 100644 --- a/src/components/SettingsDialog/ProfileSettings/ProfileSettings.scss +++ b/src/components/SettingsDialog/ProfileSettings/ProfileSettings.scss @@ -27,13 +27,13 @@ $settings__item-height: 48px; margin-right: calc(-1 * (#{$spacing--xs} + 10px)); padding-bottom: $settings-dialog-container--bottom; + @include scrollbar(); + @media screen and (min-width: 920px) { padding-right: $spacing--lg; margin-right: calc(-1 * (#{$spacing--lg} + 10px)); } - @include scrollbar(); - &:focus-visible { outline: 2px dashed rgba(var(--accent-color--light-rgb), 0.5); border-radius: 8px; diff --git a/src/constants/colors.scss b/src/constants/colors.scss index 3a48bb6b4c..bc97345d66 100644 --- a/src/constants/colors.scss +++ b/src/constants/colors.scss @@ -186,7 +186,7 @@ $secondary-colors: ( ); $base-colors: ( - navy: ( + "navy": ( 900: $navy--900, 800: $navy--800, 700: $navy--700, @@ -197,7 +197,7 @@ $base-colors: ( 200: $navy--200, 100: $navy--100, ), - gray: ( + "gray": ( 800: $gray--800, 700: $gray--700, 600: $gray--600, From b26b94bc1d19d0829e9b8076d40ede4bb096812a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:13:13 +0200 Subject: [PATCH 136/321] yarn(deps-dev): bump cypress from 13.14.2 to 13.15.0 (#4511) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 55 +++++++++++++++++++++++----------------------------- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 156de67ed9..c2e0b4a038 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "cross-env": "^7.0.3", - "cypress": "^13.14.2", + "cypress": "^13.15.0", "eslint": "^8.57.1", "eslint-config-airbnb": "19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", diff --git a/yarn.lock b/yarn.lock index 93ef87a98d..d6fe2eef8c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1339,10 +1339,10 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz#7dfccb9df5499e627e7bfdbb4021a06813a45dba" integrity sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ== -"@cypress/request@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960" - integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ== +"@cypress/request@^3.0.4": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.5.tgz#d893a6e68ce2636c085fcd8d7283c3186499ba63" + integrity sha512-v+XHd9XmWbufxF1/bTaVm2yhbxY+TB4YtWRqF2zaXBlDNMkls34KiATz0AVDLavL3iB6bQk9/7n3oY1EoLSWGA== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -1350,14 +1350,14 @@ combined-stream "~1.0.6" extend "~3.0.2" forever-agent "~0.6.1" - form-data "~2.3.2" - http-signature "~1.3.6" + form-data "~4.0.0" + http-signature "~1.4.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" mime-types "~2.1.19" performance-now "^2.1.0" - qs "6.10.4" + qs "6.13.0" safe-buffer "^5.1.2" tough-cookie "^4.1.3" tunnel-agent "^0.6.0" @@ -3919,7 +3919,7 @@ colorette@^2.0.10, colorette@^2.0.16, colorette@^2.0.20: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -4331,12 +4331,12 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== -cypress@^13.14.2: - version "13.14.2" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.14.2.tgz#4237eb7b26de2baeaa1f01e585f965d88fca7f39" - integrity sha512-lsiQrN17vHMB2fnvxIrKLAjOr9bPwsNbPZNrWf99s4u+DVmCY6U+w7O3GGG9FvP4EUVYaDu+guWeNLiUzBrqvA== +cypress@^13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.15.0.tgz#5eca5387ef34b2e611cfa291967c69c2cd39381d" + integrity sha512-53aO7PwOfi604qzOkCSzNlWquCynLlKE/rmmpSPcziRH6LNfaDUAklQT6WJIsD8ywxlIy+uVZsnTMCCQVd2kTw== dependencies: - "@cypress/request" "^3.0.1" + "@cypress/request" "^3.0.4" "@cypress/xvfb" "^1.2.4" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" @@ -5919,13 +5919,13 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== +form-data@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== dependencies: asynckit "^0.4.0" - combined-stream "^1.0.6" + combined-stream "^1.0.8" mime-types "^2.1.12" forwarded@0.2.0: @@ -6492,14 +6492,14 @@ http-proxy@^1.18.1: follow-redirects "^1.0.0" requires-port "^1.0.0" -http-signature@~1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.3.6.tgz#cb6fbfdf86d1c974f343be94e87f7fc128662cf9" - integrity sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw== +http-signature@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.4.0.tgz#dee5a9ba2bf49416abc544abd6d967f6a94c8c3f" + integrity sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg== dependencies: assert-plus "^1.0.0" jsprim "^2.0.2" - sshpk "^1.14.1" + sshpk "^1.18.0" https-proxy-agent@^5.0.0: version "5.0.1" @@ -9499,13 +9499,6 @@ qrcode.react@^4.0.1: resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-4.0.1.tgz#1caf1d3f45bf1b6d9cf800cb0f0d671f6a89e68f" integrity sha512-Lpj0tPBn561WiQ3QQWXbkx8xTtB8BZkJeMZWLJIL8iaPBCoWzW1IpCeU3gY5MDqsb0+efCvEGkl9O0naP64crA== -qs@6.10.4: - version "6.10.4" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7" - integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g== - dependencies: - side-channel "^1.0.4" - qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -10634,7 +10627,7 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -sshpk@^1.14.1: +sshpk@^1.18.0: version "1.18.0" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== From 8c9383220152ff0e10522933b1feaf1c0782cf2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:13:26 +0200 Subject: [PATCH 137/321] yarn(deps-dev): bump eslint-plugin-react from 7.36.1 to 7.37.0 (#4513) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c2e0b4a038..ef6cd5c356 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "eslint-plugin-jsx-a11y": "6.10.0", "eslint-plugin-only-warn": "^1.1.0", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-react": "7.36.1", + "eslint-plugin-react": "7.37.0", "eslint-plugin-react-hooks": "4.6.2", "hash-files": "^1.1.1", "husky": "^9.1.6", diff --git a/yarn.lock b/yarn.lock index d6fe2eef8c..a6a3583eb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5347,10 +5347,10 @@ eslint-plugin-react-hooks@4.6.2, eslint-plugin-react-hooks@^4.3.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== -eslint-plugin-react@7.36.1, eslint-plugin-react@^7.27.1: - version "7.36.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.36.1.tgz#f1dabbb11f3d4ebe8b0cf4e54aff4aee81144ee5" - integrity sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA== +eslint-plugin-react@7.37.0, eslint-plugin-react@^7.27.1: + version "7.37.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.0.tgz#c21f64a32fc34df1eaeca571ec8f70bdc40dd20a" + integrity sha512-IHBePmfWH5lKhJnJ7WB1V+v/GolbB0rjS8XYVCSQCZKaQCAUhMoVoOEn1Ef8Z8Wf0a7l8KTJvuZg5/e4qrZ6nA== dependencies: array-includes "^3.1.8" array.prototype.findlast "^1.2.5" From f5b18c355f2ae3eff1779896b76c9f25dfe934b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:13:41 +0200 Subject: [PATCH 138/321] build(deps): bump rollup from 2.79.1 to 2.79.2 (#4515) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a6a3583eb9..d92489ddbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10141,9 +10141,9 @@ rollup-plugin-terser@^7.0.0: terser "^5.0.0" rollup@^2.43.1: - version "2.79.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" - integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== + version "2.79.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.2.tgz#f150e4a5db4b121a21a747d762f701e5e9f49090" + integrity sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ== optionalDependencies: fsevents "~2.3.2" From 120d4d74f96c7974c3ed38649d4ac98f285f7158 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:13:54 +0200 Subject: [PATCH 139/321] yarn(deps-dev): bump @types/node from 22.7.0 to 22.7.4 (#4516) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ef6cd5c356..596f34471f 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/i18next-fs-backend": "^1.1.5", "@types/jest": "^29.5.13", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.7.0", + "@types/node": "^22.7.4", "@types/qrcode.react": "^1.0.5", "@types/react": "^18.3.9", "@types/react-dom": "^18.3.0", diff --git a/yarn.lock b/yarn.lock index d92489ddbd..b35ac80483 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2383,10 +2383,10 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^22.7.0": - version "22.7.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.0.tgz#670aa1874bc836863e5c116f9f2c32416ff27e1f" - integrity sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw== +"@types/node@*", "@types/node@^22.7.4": + version "22.7.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.4.tgz#e35d6f48dca3255ce44256ddc05dee1c23353fcc" + integrity sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg== dependencies: undici-types "~6.19.2" From 87957dcb26cef18eb3a5a418eb8c43ac0d3f1638 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:14:09 +0000 Subject: [PATCH 140/321] yarn(deps-dev): bump sass from 1.79.3 to 1.79.4 (#4517) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 596f34471f..1433258d81 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "react-scripts": "^5.0.1", "redux-mock-store": "^1.5.4", "resize-observer-polyfill": "^1.5.1", - "sass": "^1.79.3", + "sass": "^1.79.4", "stylelint": "^16.9.0", "stylelint-config-standard": "^36.0.1", "ts-jest": "^29.2.5", diff --git a/yarn.lock b/yarn.lock index b35ac80483..54c36dcffc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10228,10 +10228,10 @@ sass-loader@^12.3.0: klona "^2.0.4" neo-async "^2.6.2" -sass@^1.79.3: - version "1.79.3" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.79.3.tgz#7811b000eb68195fe51dea89177e73e7ef7f546f" - integrity sha512-m7dZxh0W9EZ3cw50Me5GOuYm/tVAJAn91SUnohLRo9cXBixGUOdvmryN+dXpwR831bhoY3Zv7rEFt85PUwTmzA== +sass@^1.79.4: + version "1.79.4" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.79.4.tgz#f9c45af35fbeb53d2c386850ec842098d9935267" + integrity sha512-K0QDSNPXgyqO4GZq2HO5Q70TLxTH6cIT59RdoCHMivrC8rqzaTw5ab9prjz9KUN1El4FLXrBXJhik61JR4HcGg== dependencies: chokidar "^4.0.0" immutable "^4.0.0" From 1086d979558d1904347a24849d2853f80f1a778c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:14:21 +0000 Subject: [PATCH 141/321] yarn(deps-dev): bump @types/react from 18.3.9 to 18.3.10 (#4519) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1433258d81..c27bcf277f 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@types/js-cookie": "^3.0.6", "@types/node": "^22.7.4", "@types/qrcode.react": "^1.0.5", - "@types/react": "^18.3.9", + "@types/react": "^18.3.10", "@types/react-dom": "^18.3.0", "@types/react-helmet": "^6.1.11", "@types/redux-mock-store": "^1.0.6", diff --git a/yarn.lock b/yarn.lock index 54c36dcffc..59be334b03 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2441,10 +2441,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.3.9": - version "18.3.9" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.9.tgz#2cdf5f425ec8a133d67e9e3673909738b783db20" - integrity sha512-+BpAVyTpJkNWWSSnaLBk6ePpHLOGJKnEQNbINNovPWzvEUyAe3e+/d494QdEh71RekM/qV7lw6jzf1HGrJyAtQ== +"@types/react@*", "@types/react@^18.3.10": + version "18.3.10" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.10.tgz#6edc26dc22ff8c9c226d3c7bf8357b013c842219" + integrity sha512-02sAAlBnP39JgXwkAq3PeU9DVaaGpZyF3MGcC0MKgQVkZor5IiiDAipVaxQHtDJAmO4GIy/rVBy/LzVj76Cyqg== dependencies: "@types/prop-types" "*" csstype "^3.0.2" From d14f0a332cca78afe65f07512bb87cdbd6869055 Mon Sep 17 00:00:00 2001 From: Jakob Schwehn Date: Mon, 30 Sep 2024 16:29:33 +0200 Subject: [PATCH 142/321] refactor: redux store (#4485) --- package.json | 2 +- src/api/auth.ts | 2 +- src/api/board.ts | 2 +- src/api/boardReaction.ts | 4 +- src/api/column.ts | 4 +- src/api/info.ts | 15 +- src/api/note.ts | 2 +- src/api/participant.ts | 2 +- src/api/reaction.ts | 2 +- src/api/request.ts | 2 +- src/api/user.ts | 2 +- src/api/vote.ts | 2 +- src/api/votings.ts | 2 +- .../AccessPolicySelection.tsx | 2 +- .../__tests__/AccessPolicySelection.test.tsx | 2 +- src/components/BoardHeader/BoardHeader.tsx | 7 +- .../HeaderMenu/BoardOptions/LockBoard.tsx | 11 +- .../BoardOptions/ShowAuthorOption.tsx | 9 +- .../BoardOptions/ShowHiddenColumnsOption.tsx | 13 +- .../ShowOtherUsersNotesOption.tsx | 9 +- .../BoardSettings/BoardSettings.tsx | 8 +- .../__tests__/BoardHeader.test.tsx | 3 +- .../BoardReaction/BoardReaction.tsx | 6 +- .../BoardReactionMenu/BoardReactionMenu.tsx | 15 +- src/components/BoardUsers/BoardUsers.tsx | 2 +- .../BoardUsers/__tests__/BoardUsers.test.tsx | 28 +- src/components/ColorPicker/ColorPicker.tsx | 30 ++- src/components/Column/Column.tsx | 53 +++- src/components/Column/ColumnSettings.tsx | 27 +- .../Column/__tests__/Column.test.tsx | 2 +- .../DragAndDrop/CustomDndContext.tsx | 2 +- src/components/DragAndDrop/Sortable.tsx | 23 +- .../__test__/EmojiSuggestions.test.tsx | 2 +- src/components/HotkeyAnchor/HotkeyAnchor.tsx | 63 +++-- src/components/Infobar/Infobar.tsx | 2 +- .../Infobar/__tests__/Infobar.test.tsx | 4 +- .../LoginProviders/LoginProviders.tsx | 2 +- src/components/MenuBars/MenuBars.tsx | 21 +- src/components/Note/Note.tsx | 22 +- .../Note/NoteAuthorList/NoteAuthorList.tsx | 12 +- .../__tests__/NoteAuthorList.test.tsx | 16 +- .../NoteReactionBar/NoteReactionBar.test.tsx | 4 +- .../NoteReactionBar/NoteReactionBar.tsx | 2 +- .../NoteReactionChip/NoteReactionChip.tsx | 4 +- .../NoteReactionChipCondensed.tsx | 2 +- .../NoteReactionList/NoteReactionList.tsx | 33 ++- .../NoteReactionPopup/NoteReactionPopup.tsx | 13 +- .../__tests__/NoteReactionList.test.tsx | 2 +- src/components/Note/__tests__/Note.test.tsx | 5 +- .../NoteDialogComponents/NoteDialogNote.tsx | 4 +- .../NoteDialogNoteContent.tsx | 26 +- .../NoteDialogNoteHeader.tsx | 2 +- .../NoteDialogNoteOptions.tsx | 12 +- src/components/NoteInput/NoteInput.tsx | 15 +- src/components/Requests/Request/Request.tsx | 2 +- src/components/Requests/Requests.tsx | 20 +- .../BoardSettings/BoardSettings.tsx | 27 +- .../Components/AvatarSettings.tsx | 11 +- .../Components/BoardReactionsSettings.tsx | 9 +- .../Components/NotificationSettings.tsx | 7 +- .../Components/SkinToneSelector.tsx | 11 +- .../Components/ThemeSettings.tsx | 19 +- .../Participants/Participants.tsx | 23 +- .../__tests__/Participants.test.tsx | 6 +- .../ProfileSettings/ProfileSettings.tsx | 13 +- .../SettingsDialog/SettingsDialog.tsx | 4 +- .../Dots/StackNavigationDots.tsx | 2 +- .../StackNavigation/StackNavigation.tsx | 7 +- src/components/Timer/Timer.tsx | 23 +- src/components/TimerDialog/TimerDialog.tsx | 9 +- .../__tests__/TimerDialog.test.tsx | 37 +-- .../Votes/VoteButtons/AddVoteButton.tsx | 12 +- .../Votes/VoteButtons/RemoveVoteButton.tsx | 12 +- .../Votes/VoteDisplay/VoteDisplay.tsx | 11 +- src/components/Votes/Votes.tsx | 2 +- src/components/Votes/__tests__/Votes.test.tsx | 6 +- src/components/VotingDialog/VotingDialog.tsx | 13 +- .../__tests__/VotingDialog.test.tsx | 30 +-- src/i18n/index.ts | 9 +- src/index.tsx | 6 +- src/routes/Board/Board.tsx | 20 +- src/routes/Board/BoardGuard.tsx | 13 +- src/routes/Homepage/Homepage.tsx | 9 +- src/routes/NewBoard/NewBoard.tsx | 2 +- src/routes/RouteChangeObserver.tsx | 8 +- src/routes/StackView/StackView.tsx | 23 +- .../StackView/__tests__/StackView.test.tsx | 2 +- .../__tests__/RequireAuthentication.test.tsx | 4 +- src/store/action/auth.ts | 28 -- src/store/action/board.ts | 170 ------------ src/store/action/boardReaction.ts | 33 --- src/store/action/column.ts | 85 ------ src/store/action/index.ts | 61 ----- src/store/action/note.ts | 121 --------- src/store/action/participants.ts | 127 --------- src/store/action/reaction.ts | 93 ------- src/store/action/request.ts | 39 --- src/store/action/skinTone.ts | 14 - src/store/action/view.ts | 78 ------ src/store/action/vote.ts | 40 --- src/store/action/votings.ts | 52 ---- src/store/features/auth/actions.ts | 6 + src/store/features/auth/index.ts | 4 + src/store/features/auth/reducer.ts | 21 ++ src/store/features/auth/thunks.ts | 28 ++ .../auth.ts => store/features/auth/types.ts} | 0 src/store/features/board/actions.ts | 14 + src/store/features/board/index.ts | 4 + src/store/features/board/reducer.ts | 64 +++++ src/store/features/board/thunks.ts | 227 ++++++++++++++++ .../features/board/types.ts} | 21 ++ src/store/features/boardReactions/actions.ts | 5 + src/store/features/boardReactions/index.ts | 4 + src/store/features/boardReactions/reducer.ts | 13 + src/store/features/boardReactions/thunks.ts | 9 + .../features/boardReactions/types.ts} | 2 +- src/store/features/columns/actions.ts | 13 + src/store/features/columns/index.ts | 4 + src/store/features/columns/reducer.ts | 21 ++ src/store/features/columns/thunks.ts | 34 +++ .../features/columns/types.ts} | 2 +- src/store/features/index.ts | 12 + src/store/features/notes/actions.ts | 10 + src/store/features/notes/index.ts | 4 + src/store/features/notes/reducer.ts | 86 ++++++ src/store/features/notes/thunks.ts | 56 ++++ .../note.ts => store/features/notes/types.ts} | 3 - src/store/features/participants/actions.ts | 11 + src/store/features/participants/index.ts | 4 + src/store/features/participants/reducer.ts | 43 +++ src/store/features/participants/thunks.ts | 98 +++++++ .../features/participants/types.ts} | 8 +- src/store/features/reactions/actions.ts | 8 + src/store/features/reactions/index.ts | 4 + src/store/features/reactions/reducer.ts | 16 ++ src/store/features/reactions/thunks.ts | 22 ++ .../features/reactions/types.ts} | 3 - src/store/features/requests/actions.ts | 6 + src/store/features/requests/index.ts | 4 + src/store/features/requests/reducer.ts | 15 ++ src/store/features/requests/thunks.ts | 92 +++++++ .../features/requests/types.ts} | 2 +- src/store/features/skinTone/actions.ts | 0 src/store/features/skinTone/index.ts | 4 + src/store/features/skinTone/reducer.ts | 19 ++ src/store/features/skinTone/thunks.ts | 9 + .../features/skinTone/types.ts} | 0 src/store/features/view/actions.ts | 6 + src/store/features/view/index.ts | 4 + src/store/features/view/reducer.ts | 70 +++++ src/store/features/view/thunks.ts | 31 +++ .../view.ts => store/features/view/types.ts} | 31 ++- src/store/features/votes/actions.ts | 8 + src/store/features/votes/index.ts | 4 + src/store/features/votes/reducer.ts | 16 ++ src/store/features/votes/thunks.ts | 27 ++ .../vote.ts => store/features/votes/types.ts} | 0 src/store/features/votings/actions.ts | 7 + src/store/features/votings/index.ts | 4 + src/store/features/votings/reducer.ts | 30 +++ src/store/features/votings/thunks.ts | 26 ++ .../features/votings/types.ts} | 0 src/store/index.ts | 81 +----- src/store/middleware/auth.tsx | 52 ---- src/store/middleware/board.tsx | 211 --------------- src/store/middleware/boardReaction.tsx | 10 - src/store/middleware/column.tsx | 37 --- src/store/middleware/note.tsx | 60 ----- src/store/middleware/participants.tsx | 78 ------ src/store/middleware/reaction.tsx | 16 -- src/store/middleware/request.tsx | 94 ------- src/store/middleware/skinTone.tsx | 13 - src/store/middleware/view.tsx | 52 ---- src/store/middleware/vote.tsx | 39 --- src/store/middleware/votings.tsx | 32 --- src/store/reducer/auth.ts | 34 --- src/store/reducer/board.ts | 114 -------- src/store/reducer/boardReaction.ts | 14 - src/store/reducer/columns.ts | 26 -- src/store/reducer/note.ts | 93 ------- src/store/reducer/participants.ts | 86 ------ src/store/reducer/reaction.ts | 27 -- src/store/reducer/requests.ts | 24 -- src/store/reducer/skinTone.ts | 28 -- src/store/reducer/view.ts | 122 --------- src/store/reducer/vote.ts | 28 -- src/store/reducer/votings.ts | 34 --- src/store/retryable.ts | 33 +++ src/store/store.md | 245 ++++++++++++++++++ src/store/store.ts | 42 +++ src/types/index.ts | 27 -- src/types/websocket.ts | 18 +- src/utils/auth.ts | 6 +- src/utils/boardReaction.ts | 2 +- src/utils/export.ts | 10 +- src/utils/hooks/useAutoTheme.ts | 2 +- src/utils/hooks/useEmojiAutocomplete.ts | 2 +- src/utils/reactions.ts | 2 +- src/utils/test/getTestApplicationState.ts | 2 +- src/utils/test/getTestNote.ts | 2 +- src/utils/test/getTestParticipant.ts | 2 +- src/utils/test/getTestStore.ts | 6 +- src/utils/test/getTestVoting.ts | 2 +- yarn.lock | 46 ++-- 204 files changed, 2161 insertions(+), 2908 deletions(-) delete mode 100644 src/store/action/auth.ts delete mode 100644 src/store/action/board.ts delete mode 100644 src/store/action/boardReaction.ts delete mode 100644 src/store/action/column.ts delete mode 100644 src/store/action/index.ts delete mode 100644 src/store/action/note.ts delete mode 100644 src/store/action/participants.ts delete mode 100644 src/store/action/reaction.ts delete mode 100644 src/store/action/request.ts delete mode 100644 src/store/action/skinTone.ts delete mode 100644 src/store/action/view.ts delete mode 100644 src/store/action/vote.ts delete mode 100644 src/store/action/votings.ts create mode 100644 src/store/features/auth/actions.ts create mode 100644 src/store/features/auth/index.ts create mode 100644 src/store/features/auth/reducer.ts create mode 100644 src/store/features/auth/thunks.ts rename src/{types/auth.ts => store/features/auth/types.ts} (100%) create mode 100644 src/store/features/board/actions.ts create mode 100644 src/store/features/board/index.ts create mode 100644 src/store/features/board/reducer.ts create mode 100644 src/store/features/board/thunks.ts rename src/{types/board.ts => store/features/board/types.ts} (57%) create mode 100644 src/store/features/boardReactions/actions.ts create mode 100644 src/store/features/boardReactions/index.ts create mode 100644 src/store/features/boardReactions/reducer.ts create mode 100644 src/store/features/boardReactions/thunks.ts rename src/{types/boardReaction.ts => store/features/boardReactions/types.ts} (90%) create mode 100644 src/store/features/columns/actions.ts create mode 100644 src/store/features/columns/index.ts create mode 100644 src/store/features/columns/reducer.ts create mode 100644 src/store/features/columns/thunks.ts rename src/{types/column.ts => store/features/columns/types.ts} (78%) create mode 100644 src/store/features/index.ts create mode 100644 src/store/features/notes/actions.ts create mode 100644 src/store/features/notes/index.ts create mode 100644 src/store/features/notes/reducer.ts create mode 100644 src/store/features/notes/thunks.ts rename src/{types/note.ts => store/features/notes/types.ts} (83%) create mode 100644 src/store/features/participants/actions.ts create mode 100644 src/store/features/participants/index.ts create mode 100644 src/store/features/participants/reducer.ts create mode 100644 src/store/features/participants/thunks.ts rename src/{types/participant.ts => store/features/participants/types.ts} (76%) create mode 100644 src/store/features/reactions/actions.ts create mode 100644 src/store/features/reactions/index.ts create mode 100644 src/store/features/reactions/reducer.ts create mode 100644 src/store/features/reactions/thunks.ts rename src/{types/reaction.ts => store/features/reactions/types.ts} (92%) create mode 100644 src/store/features/requests/actions.ts create mode 100644 src/store/features/requests/index.ts create mode 100644 src/store/features/requests/reducer.ts create mode 100644 src/store/features/requests/thunks.ts rename src/{types/request.ts => store/features/requests/types.ts} (90%) create mode 100644 src/store/features/skinTone/actions.ts create mode 100644 src/store/features/skinTone/index.ts create mode 100644 src/store/features/skinTone/reducer.ts create mode 100644 src/store/features/skinTone/thunks.ts rename src/{types/skinTone.ts => store/features/skinTone/types.ts} (100%) create mode 100644 src/store/features/view/actions.ts create mode 100644 src/store/features/view/index.ts create mode 100644 src/store/features/view/reducer.ts create mode 100644 src/store/features/view/thunks.ts rename src/{types/view.ts => store/features/view/types.ts} (53%) create mode 100644 src/store/features/votes/actions.ts create mode 100644 src/store/features/votes/index.ts create mode 100644 src/store/features/votes/reducer.ts create mode 100644 src/store/features/votes/thunks.ts rename src/{types/vote.ts => store/features/votes/types.ts} (100%) create mode 100644 src/store/features/votings/actions.ts create mode 100644 src/store/features/votings/index.ts create mode 100644 src/store/features/votings/reducer.ts create mode 100644 src/store/features/votings/thunks.ts rename src/{types/voting.ts => store/features/votings/types.ts} (100%) delete mode 100644 src/store/middleware/auth.tsx delete mode 100644 src/store/middleware/board.tsx delete mode 100644 src/store/middleware/boardReaction.tsx delete mode 100644 src/store/middleware/column.tsx delete mode 100644 src/store/middleware/note.tsx delete mode 100644 src/store/middleware/participants.tsx delete mode 100644 src/store/middleware/reaction.tsx delete mode 100644 src/store/middleware/request.tsx delete mode 100644 src/store/middleware/skinTone.tsx delete mode 100644 src/store/middleware/view.tsx delete mode 100644 src/store/middleware/vote.tsx delete mode 100644 src/store/middleware/votings.tsx delete mode 100644 src/store/reducer/auth.ts delete mode 100644 src/store/reducer/board.ts delete mode 100644 src/store/reducer/boardReaction.ts delete mode 100644 src/store/reducer/columns.ts delete mode 100644 src/store/reducer/note.ts delete mode 100644 src/store/reducer/participants.ts delete mode 100644 src/store/reducer/reaction.ts delete mode 100644 src/store/reducer/requests.ts delete mode 100644 src/store/reducer/skinTone.ts delete mode 100644 src/store/reducer/view.ts delete mode 100644 src/store/reducer/vote.ts delete mode 100644 src/store/reducer/votings.ts create mode 100644 src/store/retryable.ts create mode 100644 src/store/store.md create mode 100644 src/store/store.ts delete mode 100644 src/types/index.ts diff --git a/package.json b/package.json index c27bcf277f..2e9f7c7abe 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@fontsource/raleway": "^5.1.0", "@react-hook/resize-observer": "^2.0.2", "@react-spring/web": "^9.7.4", - "@reduxjs/toolkit": "^1.9.7", + "@reduxjs/toolkit": "^2.2.7", "avataaars": "^2.0.0", "classnames": "^2.5.1", "file-saver": "^2.0.5", diff --git a/src/api/auth.ts b/src/api/auth.ts index 276d5fa8f1..c83957bc75 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -1,5 +1,5 @@ import {SERVER_HTTP_URL} from "../config"; -import {AuthDto} from "../types/auth"; +import {AuthDto} from "../store/features/auth/types"; export const AuthAPI = { /** diff --git a/src/api/board.ts b/src/api/board.ts index 7caf3ed27c..c24d23e18f 100644 --- a/src/api/board.ts +++ b/src/api/board.ts @@ -1,5 +1,5 @@ import {Color} from "constants/colors"; -import {EditBoardRequest} from "types/board"; +import {EditBoardRequest} from "store/features/board/types"; import {SERVER_HTTP_URL} from "../config"; export const BoardAPI = { diff --git a/src/api/boardReaction.ts b/src/api/boardReaction.ts index ed80c3c3e9..135e7cfdc8 100644 --- a/src/api/boardReaction.ts +++ b/src/api/boardReaction.ts @@ -1,6 +1,6 @@ import {SERVER_HTTP_URL} from "config"; -import {ReactionType} from "types/reaction"; -import {BoardReactionType} from "types/boardReaction"; +import {ReactionType} from "store/features/reactions/types"; +import {BoardReactionType} from "store/features/boardReactions/types"; export const BoardReactionAPI = { addBoardReaction: async (boardId: string, reactionType: ReactionType) => { diff --git a/src/api/column.ts b/src/api/column.ts index 593144c0c2..83d40f410f 100644 --- a/src/api/column.ts +++ b/src/api/column.ts @@ -1,4 +1,4 @@ -import {EditColumnRequest} from "types/column"; +import {ColumnWithoutId} from "store/features/columns/types"; import {SERVER_HTTP_URL} from "../config"; export const ColumnAPI = { @@ -14,7 +14,7 @@ export const ColumnAPI = { * * @returns a {status, description} object */ - editColumn: async (boardId: string, columnId: string, column: EditColumnRequest) => { + editColumn: async (boardId: string, columnId: string, column: ColumnWithoutId) => { try { const response = await fetch(`${SERVER_HTTP_URL}/boards/${boardId}/columns/${columnId}`, { method: "PUT", diff --git a/src/api/info.ts b/src/api/info.ts index e10af5f3c5..8314c43017 100644 --- a/src/api/info.ts +++ b/src/api/info.ts @@ -1,6 +1,8 @@ -import {SERVER_HTTP_URL} from "../config"; +import {SERVER_HTTP_URL} from "config"; +import {ServerInfo} from "store/features"; -interface ServerInformation { +// type as received from the backend +interface ServerInformationDto { anonymousLoginDisabled: boolean; authProvider: string[]; serverTime: string; @@ -21,7 +23,14 @@ export const InfoAPI = { const response = await fetch(`${SERVER_HTTP_URL}/info`); if (response.status === 200) { - return (await response.json()) as ServerInformation; + const info = (await response.json()) as ServerInformationDto; + // convert to frontend type, don't ask me why they're different in the first place though + return { + serverTime: new Date(info.serverTime).getTime(), + enabledAuthProvider: info.authProvider, + anonymousLoginDisabled: info.anonymousLoginDisabled, + feedbackEnabled: info.feedbackEnabled, + } as ServerInfo; } throw new Error(`responded with status code ${response.status}`); diff --git a/src/api/note.ts b/src/api/note.ts index d46ecbff2b..8b90f9b011 100644 --- a/src/api/note.ts +++ b/src/api/note.ts @@ -1,5 +1,5 @@ import {SERVER_HTTP_URL} from "../config"; -import {EditNote, Note} from "../types/note"; +import {EditNote, Note} from "../store/features/notes/types"; export const NoteAPI = { /** diff --git a/src/api/participant.ts b/src/api/participant.ts index dd26d416b7..6177225235 100644 --- a/src/api/participant.ts +++ b/src/api/participant.ts @@ -1,4 +1,4 @@ -import {Participant} from "types/participant"; +import {Participant} from "store/features/participants/types"; import {SERVER_HTTP_URL} from "../config"; export const ParticipantsAPI = { diff --git a/src/api/reaction.ts b/src/api/reaction.ts index 1d8cef8804..45f8ff811e 100644 --- a/src/api/reaction.ts +++ b/src/api/reaction.ts @@ -1,5 +1,5 @@ import {SERVER_HTTP_URL} from "../config"; -import {Reaction, ReactionType} from "../types/reaction"; +import {Reaction, ReactionType} from "../store/features/reactions/types"; export const ReactionAPI = { addReaction: async (board: string, note: string, reactionType: ReactionType) => { diff --git a/src/api/request.ts b/src/api/request.ts index e635e93530..944911b236 100644 --- a/src/api/request.ts +++ b/src/api/request.ts @@ -1,4 +1,4 @@ -import {Request} from "types/request"; +import {Request} from "store/features/requests/types"; import {SERVER_HTTP_URL} from "../config"; export const RequestAPI = { diff --git a/src/api/user.ts b/src/api/user.ts index 85e259d84c..4b7a69de51 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -1,4 +1,4 @@ -import {Auth} from "types/auth"; +import {Auth} from "store/features/auth/types"; import {SERVER_HTTP_URL} from "../config"; export const UserAPI = { diff --git a/src/api/vote.ts b/src/api/vote.ts index 5cea3015db..6be94d1dff 100644 --- a/src/api/vote.ts +++ b/src/api/vote.ts @@ -1,5 +1,5 @@ import {SERVER_HTTP_URL} from "../config"; -import {Vote} from "../types/vote"; +import {Vote} from "../store/features/votes/types"; export const VoteAPI = { /** diff --git a/src/api/votings.ts b/src/api/votings.ts index 8c2384c701..7c1846766d 100644 --- a/src/api/votings.ts +++ b/src/api/votings.ts @@ -1,4 +1,4 @@ -import {CreateVotingRequest} from "types/voting"; +import {CreateVotingRequest} from "store/features/votings/types"; import {SERVER_HTTP_URL} from "../config"; export const VotingAPI = { diff --git a/src/components/AccessPolicySelection/AccessPolicySelection.tsx b/src/components/AccessPolicySelection/AccessPolicySelection.tsx index 78b284f105..f3a7392789 100644 --- a/src/components/AccessPolicySelection/AccessPolicySelection.tsx +++ b/src/components/AccessPolicySelection/AccessPolicySelection.tsx @@ -1,6 +1,6 @@ import {FC, useState} from "react"; import "./AccessPolicySelection.scss"; -import {AccessPolicy} from "types/board"; +import {AccessPolicy} from "store/features/board/types"; import {generateRandomString} from "utils/random"; import {useTranslation} from "react-i18next"; import {Visible, Hidden, Duplicate, Refresh} from "components/Icon"; diff --git a/src/components/AccessPolicySelection/__tests__/AccessPolicySelection.test.tsx b/src/components/AccessPolicySelection/__tests__/AccessPolicySelection.test.tsx index be1f2f61ca..9da18972a3 100644 --- a/src/components/AccessPolicySelection/__tests__/AccessPolicySelection.test.tsx +++ b/src/components/AccessPolicySelection/__tests__/AccessPolicySelection.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, waitFor} from "@testing-library/react"; import {AccessPolicySelection} from "components/AccessPolicySelection/AccessPolicySelection"; -import {AccessPolicy} from "types/board"; +import {AccessPolicy} from "store/features/board/types"; import {render} from "testUtils"; describe("AccessPolicySelection", () => { diff --git a/src/components/BoardHeader/BoardHeader.tsx b/src/components/BoardHeader/BoardHeader.tsx index f6e40f8d38..9a6e1fedce 100644 --- a/src/components/BoardHeader/BoardHeader.tsx +++ b/src/components/BoardHeader/BoardHeader.tsx @@ -1,16 +1,16 @@ import {useState, VFC} from "react"; import {LockClosed, Open as Globe, KeyProtected, Share} from "components/Icon"; import {BoardUsers} from "components/BoardUsers"; -import store, {useAppSelector} from "store"; +import {useAppDispatch, useAppSelector} from "store"; import {ScrumlrLogo} from "components/ScrumlrLogo"; import {HeaderMenu} from "components/BoardHeader/HeaderMenu"; import {useTranslation} from "react-i18next"; -import {Actions} from "store/action"; import {ConfirmationDialog} from "components/ConfirmationDialog"; import {shallowEqual} from "react-redux"; import "./BoardHeader.scss"; import {ShareButton} from "components/ShareButton"; import {Tooltip} from "react-tooltip"; +import {leaveBoard} from "store/features"; import {DEFAULT_BOARD_NAME} from "../../constants/misc"; export interface BoardHeaderProps { @@ -18,6 +18,7 @@ export interface BoardHeaderProps { } export const BoardHeader: VFC = (props) => { + const dispatch = useAppDispatch(); const {t} = useTranslation(); const state = useAppSelector( (rootState) => ({ @@ -36,7 +37,7 @@ export const BoardHeader: VFC = (props) => { { - store.dispatch(Actions.leaveBoard()); + dispatch(leaveBoard()); window.location.pathname = "/"; }} onDecline={() => setShowConfirmationDialog(false)} diff --git a/src/components/BoardHeader/HeaderMenu/BoardOptions/LockBoard.tsx b/src/components/BoardHeader/HeaderMenu/BoardOptions/LockBoard.tsx index 9c263e5426..2f2dda6246 100644 --- a/src/components/BoardHeader/HeaderMenu/BoardOptions/LockBoard.tsx +++ b/src/components/BoardHeader/HeaderMenu/BoardOptions/LockBoard.tsx @@ -1,19 +1,20 @@ -import store, {useAppSelector} from "store"; +import {useAppDispatch, useAppSelector} from "store"; import {useTranslation} from "react-i18next"; -import {Actions} from "store/action"; +import {editBoard} from "store/features"; import {BoardOption} from "./BoardOption"; import {BoardOptionButton} from "./BoardOptionButton"; import {BoardOptionToggle} from "./BoardOptionToggle"; import "../BoardSettings/BoardSettings.scss"; export const LockBoard = () => { + const dispatch = useAppDispatch(); const {t} = useTranslation(); - const allowEditing = useAppSelector((state) => state.board.data!.isLocked); + const isLocked = useAppSelector((state) => state.board.data!.isLocked); return ( - store.dispatch(Actions.editBoard({isLocked: !allowEditing}))}> - + dispatch(editBoard({isLocked: !isLocked}))}> + ); diff --git a/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowAuthorOption.tsx b/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowAuthorOption.tsx index 092e61ce2f..3ffe859f72 100644 --- a/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowAuthorOption.tsx +++ b/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowAuthorOption.tsx @@ -1,7 +1,6 @@ -import {useAppSelector} from "store"; -import {useDispatch} from "react-redux"; +import {useAppDispatch, useAppSelector} from "store"; +import {editBoard} from "store/features"; import {useTranslation} from "react-i18next"; -import {Actions} from "store/action"; import {BoardOption} from "./BoardOption"; import {BoardOptionButton} from "./BoardOptionButton"; import {BoardOptionToggle} from "./BoardOptionToggle"; @@ -9,7 +8,7 @@ import "../BoardSettings/BoardSettings.scss"; export const ShowAuthorOption = () => { const {t} = useTranslation(); - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const showAuthors = useAppSelector((state) => state.board.data?.showAuthors); return ( @@ -17,7 +16,7 @@ export const ShowAuthorOption = () => { { - dispatch(Actions.editBoard({showAuthors: !showAuthors})); + dispatch(editBoard({showAuthors: !showAuthors})); }} > diff --git a/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowHiddenColumnsOption.tsx b/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowHiddenColumnsOption.tsx index 297fa37bbf..5261a4b703 100644 --- a/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowHiddenColumnsOption.tsx +++ b/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowHiddenColumnsOption.tsx @@ -1,7 +1,6 @@ -import {useAppSelector} from "store"; +import {useAppDispatch, useAppSelector} from "store"; +import {setShowHiddenColumns} from "store/features"; import {useTranslation} from "react-i18next"; -import {useDispatch} from "react-redux"; -import {Actions} from "store/action"; import {BoardOption} from "./BoardOption"; import {BoardOptionButton} from "./BoardOptionButton"; import {BoardOptionToggle} from "./BoardOptionToggle"; @@ -9,18 +8,18 @@ import "../BoardSettings/BoardSettings.scss"; export const ShowHiddenColumnsOption = () => { const {t} = useTranslation(); - const showHiddenColumns = useAppSelector((state) => state.participants?.self.showHiddenColumns); - const dispatch = useDispatch(); + const showHiddenColumns = useAppSelector((state) => !!state.participants?.self?.showHiddenColumns); + const dispatch = useAppDispatch(); return ( { - dispatch(Actions.setShowHiddenColumns(!showHiddenColumns)); + dispatch(setShowHiddenColumns({showHiddenColumns: !showHiddenColumns})); }} > - + ); diff --git a/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowOtherUsersNotesOption.tsx b/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowOtherUsersNotesOption.tsx index 0d4a070841..81bb3f4a6e 100644 --- a/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowOtherUsersNotesOption.tsx +++ b/src/components/BoardHeader/HeaderMenu/BoardOptions/ShowOtherUsersNotesOption.tsx @@ -1,7 +1,6 @@ -import {useAppSelector} from "store"; -import {useDispatch} from "react-redux"; +import {useAppDispatch, useAppSelector} from "store"; +import {editBoard} from "store/features"; import {useTranslation} from "react-i18next"; -import {Actions} from "store/action"; import {BoardOption} from "./BoardOption"; import {BoardOptionButton} from "./BoardOptionButton"; import {BoardOptionToggle} from "./BoardOptionToggle"; @@ -9,7 +8,7 @@ import "../BoardSettings/BoardSettings.scss"; export const ShowOtherUsersNotesOption = () => { const {t} = useTranslation(); - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const showNotesOfOtherParticipants = useAppSelector((state) => state.board.data?.showNotesOfOtherUsers); return ( @@ -17,7 +16,7 @@ export const ShowOtherUsersNotesOption = () => { { - dispatch(Actions.editBoard({showNotesOfOtherUsers: !showNotesOfOtherParticipants})); + dispatch(editBoard({showNotesOfOtherUsers: !showNotesOfOtherParticipants})); }} > diff --git a/src/components/BoardHeader/HeaderMenu/BoardSettings/BoardSettings.tsx b/src/components/BoardHeader/HeaderMenu/BoardSettings/BoardSettings.tsx index 40afcb9ea7..0ce68ec255 100644 --- a/src/components/BoardHeader/HeaderMenu/BoardSettings/BoardSettings.tsx +++ b/src/components/BoardHeader/HeaderMenu/BoardSettings/BoardSettings.tsx @@ -1,10 +1,9 @@ import "./BoardSettings.scss"; import {Dispatch, SetStateAction, useState} from "react"; -import store, {useAppSelector} from "store"; -import {ApplicationState} from "types"; -import {Actions} from "store/action"; +import {ApplicationState, useAppDispatch, useAppSelector} from "store"; import {useTranslation} from "react-i18next"; import {DEFAULT_BOARD_NAME} from "constants/misc"; +import {editBoard} from "store/features"; export type BoardSettingsProps = { activeEditMode: boolean; @@ -13,6 +12,7 @@ export type BoardSettingsProps = { }; export const BoardSettings = (props: BoardSettingsProps) => { + const dispatch = useAppDispatch(); const {t} = useTranslation(); const name = useAppSelector((state: ApplicationState) => state.board.data!.name) ?? ""; @@ -20,7 +20,7 @@ export const BoardSettings = (props: BoardSettingsProps) => { const onSubmit = () => { if (props.activeEditMode && name !== boardName) { - store.dispatch(Actions.editBoard({name: boardName})); + dispatch(editBoard({name: boardName})); } props.setActiveEditMode(!props.activeEditMode); }; diff --git a/src/components/BoardHeader/__tests__/BoardHeader.test.tsx b/src/components/BoardHeader/__tests__/BoardHeader.test.tsx index e58321ad9a..4fb82012e8 100644 --- a/src/components/BoardHeader/__tests__/BoardHeader.test.tsx +++ b/src/components/BoardHeader/__tests__/BoardHeader.test.tsx @@ -2,7 +2,7 @@ import {render} from "testUtils"; import {Provider} from "react-redux"; import {BoardHeader} from "components/BoardHeader/BoardHeader"; import getTestStore from "utils/test/getTestStore"; -import {ApplicationState} from "types"; +import {ApplicationState} from "store"; import i18n from "i18nTest"; const createBoardHeader = (overwrite?: Partial) => { @@ -70,6 +70,7 @@ describe("Board Header", () => { showNotesOfOtherUsers: true, allowStacking: true, showNoteReactions: true, + isLocked: false, }, }, }) diff --git a/src/components/BoardReaction/BoardReaction.tsx b/src/components/BoardReaction/BoardReaction.tsx index 8526009540..9f5697e1ff 100644 --- a/src/components/BoardReaction/BoardReaction.tsx +++ b/src/components/BoardReaction/BoardReaction.tsx @@ -1,4 +1,4 @@ -import {BOARD_REACTION_EMOJI_MAP, BoardReactionType} from "types/boardReaction"; +import {BOARD_REACTION_EMOJI_MAP, BoardReactionType} from "store/features/boardReactions/types"; import {memo, useEffect, useRef, useState} from "react"; import {getRandomNumberInRange} from "utils/random"; import {useAppSelector} from "store"; @@ -18,8 +18,8 @@ export const BoardReaction = memo((props: BoardReactionProps) => { const [displayOffset, setDisplayOffset] = useState(-100); const {t} = useTranslation(); const emoji = BOARD_REACTION_EMOJI_MAP.get(props.reaction.reactionType); - const me = useAppSelector((state) => state.participants!.self); - const others = useAppSelector((state) => state.participants!.others); + const me = useAppSelector((state) => state.participants!.self)!; + const others = useAppSelector((state) => state.participants!.others) ?? []; const skinTone = useAppSelector((state) => state.skinTone); const all = [me, ...others]; const reactionUser = all.find((p) => p.user.id === props.reaction.user)!; diff --git a/src/components/BoardReactionMenu/BoardReactionMenu.tsx b/src/components/BoardReactionMenu/BoardReactionMenu.tsx index 9d41c7c98c..bd7ea98278 100644 --- a/src/components/BoardReactionMenu/BoardReactionMenu.tsx +++ b/src/components/BoardReactionMenu/BoardReactionMenu.tsx @@ -1,16 +1,15 @@ import {ForwardedRef, forwardRef, MouseEvent} from "react"; import {Close} from "components/Icon"; -import {ReactionType} from "types/reaction"; -import {BOARD_REACTION_EMOJI_MAP} from "types/boardReaction"; -import {Actions} from "store/action"; -import {useDispatch} from "react-redux"; +import {ReactionType} from "store/features/reactions/types"; +import {BOARD_REACTION_EMOJI_MAP} from "store/features/boardReactions/types"; import {useHotkeys} from "react-hotkeys-hook"; -import {useAppSelector} from "store"; +import {useAppDispatch, useAppSelector} from "store"; import {Toast} from "utils/Toast"; import {useTranslation} from "react-i18next"; import {useDelayedReset} from "utils/hooks/useDelayedReset"; import {animated, useTransition} from "@react-spring/web"; import "./BoardReactionMenu.scss"; +import {addBoardReaction, setShowBoardReactions} from "store/features"; type BoardReactionMenuProps = { showMenu: boolean; @@ -20,7 +19,7 @@ type BoardReactionMenuProps = { const REACTION_DEBOUNCE_TIME = 300; // milliseconds export const BoardReactionMenu = forwardRef((props: BoardReactionMenuProps, ref: ForwardedRef) => { - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const {t} = useTranslation(); const boardReactions = [...BOARD_REACTION_EMOJI_MAP]; @@ -37,12 +36,12 @@ export const BoardReactionMenu = forwardRef((props: BoardReactionMenuProps, ref: Toast.info({ title: t("Toast.boardReactionsDisabled"), buttons: [t("Toast.enable")], - firstButtonOnClick: () => dispatch(Actions.setShowBoardReactions(true)), + firstButtonOnClick: () => dispatch(setShowBoardReactions(true)), }); } else if (debounce) { // not ready yet } else { - dispatch(Actions.addBoardReaction(reaction)); + dispatch(addBoardReaction(reaction)); resetDebounce(); } }; diff --git a/src/components/BoardUsers/BoardUsers.tsx b/src/components/BoardUsers/BoardUsers.tsx index fef1fa4df1..93a71d4a31 100644 --- a/src/components/BoardUsers/BoardUsers.tsx +++ b/src/components/BoardUsers/BoardUsers.tsx @@ -41,7 +41,7 @@ export const BoardUsers = () => { const {me, them} = useAppSelector( (state) => ({ - them: state.participants!.others.filter((participant) => participant.connected), + them: state.participants!.others!.filter((participant) => participant.connected), me: state.participants!.self, }), isEqual diff --git a/src/components/BoardUsers/__tests__/BoardUsers.test.tsx b/src/components/BoardUsers/__tests__/BoardUsers.test.tsx index b72573953a..e1542e5591 100644 --- a/src/components/BoardUsers/__tests__/BoardUsers.test.tsx +++ b/src/components/BoardUsers/__tests__/BoardUsers.test.tsx @@ -1,7 +1,7 @@ import {render} from "testUtils"; import {Provider} from "react-redux"; import {BoardUsers} from "components/BoardUsers"; -import {ApplicationState} from "types"; +import {ApplicationState} from "store"; import getTestStore from "utils/test/getTestStore"; import getTestParticipant from "utils/test/getTestParticipant"; @@ -20,10 +20,10 @@ describe("users", () => { participants: { self: getTestParticipant(), others: [ - getTestParticipant({user: {id: "other-1", name: "other-1"}, connected: false}), - getTestParticipant({user: {id: "other-2", name: "other-2"}}), - getTestParticipant({user: {id: "other-3", name: "other-3"}}), - getTestParticipant({user: {id: "other-4", name: "other-4"}}), + getTestParticipant({user: {id: "other-1", name: "other-1", isAnonymous: true}, connected: false}), + getTestParticipant({user: {id: "other-2", name: "other-2", isAnonymous: true}}), + getTestParticipant({user: {id: "other-3", name: "other-3", isAnonymous: true}}), + getTestParticipant({user: {id: "other-4", name: "other-4", isAnonymous: true}}), ], }, }) @@ -36,10 +36,10 @@ describe("users", () => { participants: { self: getTestParticipant(), others: [ - getTestParticipant({user: {id: "other-1", name: "other-1"}}), - getTestParticipant({user: {id: "other-2", name: "other-2"}}), - getTestParticipant({user: {id: "other-3", name: "other-3"}}), - getTestParticipant({user: {id: "other-4", name: "other-4"}}), + getTestParticipant({user: {id: "other-1", name: "other-1", isAnonymous: true}}), + getTestParticipant({user: {id: "other-2", name: "other-2", isAnonymous: true}}), + getTestParticipant({user: {id: "other-3", name: "other-3", isAnonymous: true}}), + getTestParticipant({user: {id: "other-4", name: "other-4", isAnonymous: true}}), ], }, }) @@ -52,11 +52,11 @@ describe("users", () => { participants: { self: getTestParticipant(), others: [ - getTestParticipant({user: {id: "other-1", name: "other-1"}}), - getTestParticipant({user: {id: "other-2", name: "other-2"}}), - getTestParticipant({user: {id: "other-3", name: "other-3"}}), - getTestParticipant({user: {id: "other-4", name: "other-4"}}), - getTestParticipant({user: {id: "other-5", name: "other-5"}}), + getTestParticipant({user: {id: "other-1", name: "other-1", isAnonymous: true}}), + getTestParticipant({user: {id: "other-2", name: "other-2", isAnonymous: true}}), + getTestParticipant({user: {id: "other-3", name: "other-3", isAnonymous: true}}), + getTestParticipant({user: {id: "other-4", name: "other-4", isAnonymous: true}}), + getTestParticipant({user: {id: "other-5", name: "other-5", isAnonymous: true}}), ], }, }) diff --git a/src/components/ColorPicker/ColorPicker.tsx b/src/components/ColorPicker/ColorPicker.tsx index 3685461772..5bb40d966b 100644 --- a/src/components/ColorPicker/ColorPicker.tsx +++ b/src/components/ColorPicker/ColorPicker.tsx @@ -1,9 +1,9 @@ import {useEffect} from "react"; -import {useDispatch} from "react-redux"; import {uniqueId} from "underscore"; import ReactFocusLock from "react-focus-lock"; import {Color, getColorClassName, formatColorName} from "constants/colors"; -import {Actions} from "../../store/action"; +import {useAppDispatch} from "store"; +import {editColumn} from "store/features"; import {Tooltip} from "../Tooltip"; type ColorPickerProps = { @@ -18,7 +18,7 @@ type ColorPickerProps = { }; export const ColorPicker = (props: ColorPickerProps) => { - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const colorsWithoutSelectedColor = props.colors.filter((curColor) => curColor !== props.color); const primColorAnchor = uniqueId(`color-picker-${props.color.toString()}`); @@ -44,7 +44,17 @@ export const ColorPicker = (props: ColorPickerProps) => { title={formatColorName(props.color)} onClick={() => { props.onClose?.(); - dispatch(Actions.editColumn(props.id, {name: props.name, color: props.color, index: props.index, visible: props.visible})); + dispatch( + editColumn({ + id: props.id, + column: { + name: props.name, + color: props.color, + index: props.index, + visible: props.visible, + }, + }) + ); }} className="color-picker__item-button" > @@ -62,7 +72,17 @@ export const ColorPicker = (props: ColorPickerProps) => { title={formatColorName(item)} onClick={() => { props.onClose?.(); - dispatch(Actions.editColumn(props.id, {name: props.name, color: item, index: props.index, visible: props.visible})); + dispatch( + editColumn({ + id: props.id, + column: { + name: props.name, + color: item, + index: props.index, + visible: props.visible, + }, + }) + ); }} className={`${item.toString()} color-picker__item-button`} > diff --git a/src/components/Column/Column.tsx b/src/components/Column/Column.tsx index c3ba131b01..adcbbe1d1d 100644 --- a/src/components/Column/Column.tsx +++ b/src/components/Column/Column.tsx @@ -4,11 +4,9 @@ import {NoteInput} from "components/NoteInput"; import {useEffect, useRef, useState} from "react"; import classNames from "classnames"; import {Tooltip} from "react-tooltip"; -import {useAppSelector} from "store"; -import {Actions} from "store/action"; +import {useAppDispatch, useAppSelector} from "store"; import {Close, MarkAsDone, Hidden, ThreeDots} from "components/Icon"; import _ from "underscore"; -import {useDispatch} from "react-redux"; import {useTranslation} from "react-i18next"; import {hotkeyMap} from "constants/hotkeys"; import {Droppable} from "components/DragAndDrop/Droppable"; @@ -17,6 +15,7 @@ import {EmojiSuggestions} from "components/EmojiSuggestions"; import {useEmojiAutocomplete} from "utils/hooks/useEmojiAutocomplete"; import {Note} from "../Note"; import {ColumnSettings} from "./ColumnSettings"; +import {createColumn, deleteColumnOptimistically, editColumn, editColumnOptimistically} from "../../store/features"; const {SELECT_NOTE_INPUT_FIRST_KEY} = hotkeyMap; @@ -30,7 +29,7 @@ export interface ColumnProps { export const Column = ({id, name, color, visible, index}: ColumnProps) => { const {t} = useTranslation(); - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const notes = useAppSelector( (state) => @@ -46,7 +45,7 @@ export const Column = ({id, name, color, visible, index}: ColumnProps) => { const viewer = useAppSelector((state) => state.participants!.self); const colorClassName = getColorClassName(color); - const isModerator = viewer.role === "OWNER" || viewer.role === "MODERATOR"; + const isModerator = viewer?.role === "OWNER" || viewer?.role === "MODERATOR"; const {value: columnName, ...emoji} = useEmojiAutocomplete({maxInputLength: 32, initialValue: name}); const [columnNameMode, setColumnNameMode] = useState<"VIEW" | "EDIT">("VIEW"); @@ -58,7 +57,17 @@ export const Column = ({id, name, color, visible, index}: ColumnProps) => { const closeButtonRef = useRef(null); const toggleVisibilityHandler = () => { - dispatch(Actions.editColumn(id, {name, color, index, visible: !visible})); + dispatch( + editColumn({ + id, + column: { + name, + color, + index, + visible: !visible, + }, + }) + ); }; const [localNotes, setLocalNotes] = useState(notes); @@ -80,14 +89,34 @@ export const Column = ({id, name, color, visible, index}: ColumnProps) => { const handleEditColumnName = (newName: string) => { if (isTemporary) { if (!newName) { - dispatch(Actions.deleteColumnOptimistically(id)); + dispatch(deleteColumnOptimistically(id)); } else { - dispatch(Actions.editColumnOptimistically(id, {name: newName, color, visible, index})); // Prevents flicker when submitting a new column - dispatch(Actions.createColumn({name: newName, color, visible, index})); + dispatch( + editColumnOptimistically({ + id, + column: { + name: newName, + color, + visible, + index, + }, + }) + ); // Prevents flicker when submitting a new column + dispatch(createColumn({name: newName, color, visible, index})); setIsTemporary(false); } } else { - dispatch(Actions.editColumn(id, {name: newName, color, visible, index})); + dispatch( + editColumn({ + id, + column: { + name: newName, + color, + visible, + index, + }, + }) + ); } setColumnNameMode("VIEW"); }; @@ -123,7 +152,7 @@ export const Column = ({id, name, color, visible, index}: ColumnProps) => { if (e.key === "Escape") { if (isTemporary) { - dispatch(Actions.deleteColumnOptimistically(id)); + dispatch(deleteColumnOptimistically(id)); } setColumnNameMode("VIEW"); } else if (e.key === "Enter") { @@ -164,7 +193,7 @@ export const Column = ({id, name, color, visible, index}: ColumnProps) => { ref={closeButtonRef} onClick={() => { if (isTemporary) { - dispatch(Actions.deleteColumnOptimistically(id)); + dispatch(deleteColumnOptimistically(id)); } setColumnNameMode("VIEW"); }} diff --git a/src/components/Column/ColumnSettings.tsx b/src/components/Column/ColumnSettings.tsx index 56190c2e07..b652526287 100644 --- a/src/components/Column/ColumnSettings.tsx +++ b/src/components/Column/ColumnSettings.tsx @@ -1,14 +1,13 @@ import {Dispatch, SetStateAction, useEffect, useState} from "react"; -import {Actions} from "store/action"; import {Hidden, Visible, Edit, ArrowLeft, ArrowRight, Trash, Close} from "components/Icon"; import {Color, getColorForIndex, COLOR_ORDER} from "constants/colors"; import {useTranslation} from "react-i18next"; -import {useDispatch} from "react-redux"; import "./ColumnSettings.scss"; import "../ColorPicker/ColorPicker.scss"; -import {useAppSelector} from "store"; +import {useAppDispatch, useAppSelector} from "store"; import {useOnBlur} from "utils/hooks/useOnBlur"; import {MiniMenu, MiniMenuItem} from "components/MiniMenu/MiniMenu"; +import {createColumnOptimistically, deleteColumn, editColumn, setShowHiddenColumns} from "store/features"; import {Toast} from "../../utils/Toast"; import {TEMPORARY_COLUMN_ID, TOAST_TIMER_SHORT} from "../../constants/misc"; import {ColorPicker} from "../ColorPicker/ColorPicker"; @@ -27,18 +26,18 @@ type ColumnSettingsProps = { export const ColumnSettings = (props: ColumnSettingsProps) => { const {t} = useTranslation(); - const showHiddenColumns = useAppSelector((state) => state.participants?.self.showHiddenColumns); - const dispatch = useDispatch(); + const showHiddenColumns = useAppSelector((state) => state.participants?.self!.showHiddenColumns); + const dispatch = useAppDispatch(); const columnSettingsRef = useOnBlur(props.onClose ?? (() => {})); const [openedColorPicker, setOpenedColorPicker] = useState(false); const handleAddColumn = (columnIndex: number) => { if (!showHiddenColumns) { - dispatch(Actions.setShowHiddenColumns(true)); + dispatch(setShowHiddenColumns({showHiddenColumns: true})); Toast.success({title: t("Toast.hiddenColumnsVisible"), autoClose: TOAST_TIMER_SHORT}); } const randomColor = getColorForIndex(Math.floor(Math.random() * COLOR_ORDER.length)); - dispatch(Actions.createColumnOptimistically({id: TEMPORARY_COLUMN_ID, name: "", color: randomColor, visible: false, index: columnIndex})); + dispatch(createColumnOptimistically({id: TEMPORARY_COLUMN_ID, name: "", color: randomColor, visible: false, index: columnIndex})); }; useEffect(() => { @@ -74,7 +73,7 @@ export const ColumnSettings = (props: ColumnSettingsProps) => { icon: , onClick: () => { props.onClose?.(); - dispatch(Actions.deleteColumn(props.id)); + dispatch(deleteColumn(props.id)); }, }, { @@ -103,7 +102,17 @@ export const ColumnSettings = (props: ColumnSettingsProps) => { icon: props.visible ? : , onClick: () => { props.onClose?.(); - dispatch(Actions.editColumn(props.id, {name: props.name, color: props.color, index: props.index, visible: !props.visible})); + dispatch( + editColumn({ + id: props.id, + column: { + name: props.name, + color: props.color, + index: props.index, + visible: !props.visible, + }, + }) + ); }, }, { diff --git a/src/components/Column/__tests__/Column.test.tsx b/src/components/Column/__tests__/Column.test.tsx index e40277f553..c8fc2910bb 100644 --- a/src/components/Column/__tests__/Column.test.tsx +++ b/src/components/Column/__tests__/Column.test.tsx @@ -2,7 +2,7 @@ import {Column} from "components/Column"; import {render} from "testUtils"; import {Provider} from "react-redux"; import getTestStore from "utils/test/getTestStore"; -import {ApplicationState} from "types"; +import {ApplicationState} from "store"; import {CustomDndContext} from "components/DragAndDrop/CustomDndContext"; jest.mock("utils/hooks/useImageChecker.ts", () => ({ diff --git a/src/components/DragAndDrop/CustomDndContext.tsx b/src/components/DragAndDrop/CustomDndContext.tsx index b30d474b07..ae2408f7f9 100644 --- a/src/components/DragAndDrop/CustomDndContext.tsx +++ b/src/components/DragAndDrop/CustomDndContext.tsx @@ -20,7 +20,7 @@ import {getColorClassName} from "constants/colors"; import {MOVE_THRESHOLD} from "constants/misc"; import {ReactNode, useState} from "react"; import {useAppSelector} from "store"; -import {Column} from "types/column"; +import {Column} from "store/features/columns/types"; import {isEqual} from "underscore"; type CustomDndContextProps = { diff --git a/src/components/DragAndDrop/Sortable.tsx b/src/components/DragAndDrop/Sortable.tsx index 1bc75dade8..3da84acb5b 100644 --- a/src/components/DragAndDrop/Sortable.tsx +++ b/src/components/DragAndDrop/Sortable.tsx @@ -4,8 +4,8 @@ import {CSS} from "@dnd-kit/utilities"; import classNames from "classnames"; import {COMBINE_THRESHOLD, MOVE_THRESHOLD} from "constants/misc"; import {ReactNode, useState} from "react"; -import store, {useAppSelector} from "store"; -import {Actions} from "store/action"; +import {useAppDispatch, useAppSelector} from "store"; +import {editNote} from "store/features"; type SortableProps = { id: UniqueIdentifier; @@ -44,6 +44,7 @@ export const shouldStack = (id: UniqueIdentifier, items: UniqueIdentifier[], new }; export const Sortable = ({id, children, disabled, className, columnId, setItems}: SortableProps) => { + const dispatch = useAppDispatch(); const {collisions} = useDndContext(); const {setNodeRef, attributes, listeners, transition, transform, isDragging, items, newIndex, active} = useSortable({ id, @@ -81,7 +82,14 @@ export const Sortable = ({id, children, disabled, className, columnId, setItems} rank: note?.position.rank ?? 0, }; - store.dispatch(Actions.editNote(active.id.toString(), {position})); + dispatch( + editNote({ + noteId: active.id.toString(), + request: { + position, + }, + }) + ); if (setItems) setItems(items.filter((item) => item !== active.id.toString()).map((item) => item.toString())); return; @@ -97,7 +105,14 @@ export const Sortable = ({id, children, disabled, className, columnId, setItems} rank: items.reverse().indexOf(id.toString()), }; - store.dispatch(Actions.editNote(active.id.toString(), {position})); + dispatch( + editNote({ + noteId: active.id.toString(), + request: { + position, + }, + }) + ); } } }, diff --git a/src/components/EmojiSuggestions/__test__/EmojiSuggestions.test.tsx b/src/components/EmojiSuggestions/__test__/EmojiSuggestions.test.tsx index 08ad689f0f..a0e6bda1a1 100644 --- a/src/components/EmojiSuggestions/__test__/EmojiSuggestions.test.tsx +++ b/src/components/EmojiSuggestions/__test__/EmojiSuggestions.test.tsx @@ -1,5 +1,5 @@ import {Provider} from "react-redux"; -import {ApplicationState} from "types"; +import {ApplicationState} from "store"; import getTestStore from "utils/test/getTestStore"; import {ComponentProps} from "react"; import {render} from "@testing-library/react"; diff --git a/src/components/HotkeyAnchor/HotkeyAnchor.tsx b/src/components/HotkeyAnchor/HotkeyAnchor.tsx index 08e318feba..c6c5448b0b 100644 --- a/src/components/HotkeyAnchor/HotkeyAnchor.tsx +++ b/src/components/HotkeyAnchor/HotkeyAnchor.tsx @@ -1,22 +1,33 @@ import _ from "underscore"; import {useTranslation} from "react-i18next"; -import {useDispatch} from "react-redux"; import {useHotkeys} from "react-hotkeys-hook"; import {Toast} from "utils/Toast"; -import {Actions} from "store/action"; -import {useAppSelector} from "store"; +import {useAppDispatch, useAppSelector} from "store"; import {hotkeyMap} from "constants/hotkeys"; import "./HotkeyAnchor.scss"; import {useNavigate, useParams} from "react-router"; import {useEffect, useRef} from "react"; import {TOAST_TIMER_SHORT} from "constants/misc"; +import { + clearFocusInitiator, + editBoard, + setFocusInitiator, + setHotkeyState, + setModerating, + setRaisedHandStatus, + setShowHiddenColumns, + setTimer, + setUserReadyStatus, + shareNote, + stopSharing, +} from "store/features"; /** * Anchor for general hotkeys */ export const HotkeyAnchor = () => { const {t} = useTranslation(); - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const navigate = useNavigate(); const {noteId} = useParams(); const note = useRef(); @@ -41,11 +52,11 @@ export const HotkeyAnchor = () => { const state = useAppSelector( (rootState) => ({ - currentUser: rootState.participants!.self, + currentUser: rootState.participants!.self!, moderation: rootState.view.moderating, showAuthors: rootState.board.data?.showAuthors, showNotesOfOtherUsers: rootState.board.data?.showNotesOfOtherUsers, - showHiddenColumns: rootState.participants!.self.showHiddenColumns, + showHiddenColumns: rootState.participants!.self!.showHiddenColumns, hotkeysAreActive: rootState.view.hotkeysAreActive, hotkeyNotificationsEnabled: rootState.view.hotkeyNotificationsEnabled, }), @@ -71,10 +82,10 @@ export const HotkeyAnchor = () => { const toggleHotkeys = () => { if (state.hotkeysAreActive) { - dispatch(Actions.setHotkeyState(false)); + dispatch(setHotkeyState(false)); dispatchHotkeyNotification(t("Hotkeys.hotkeysDisabled")); } else { - dispatch(Actions.setHotkeyState(true)); + dispatch(setHotkeyState(true)); dispatchHotkeyNotification(t("Hotkeys.hotkeysEnabled")); } }; @@ -83,41 +94,41 @@ export const HotkeyAnchor = () => { const toggleModeration = () => { if (state.moderation) { - dispatch(Actions.stopSharing()); - dispatch(Actions.clearFocusInitiator()); - dispatch(Actions.setModerating(false)); + dispatch(stopSharing()); + dispatch(clearFocusInitiator()); + dispatch(setModerating(false)); dispatchHotkeyNotification(t("Hotkeys.togglePresentationMode.endPresenting")); } else { - dispatch(Actions.setFocusInitiator(state.currentUser)); - if (note.current) dispatch(Actions.shareNote(note.current)); - dispatch(Actions.setModerating(true)); + dispatch(setFocusInitiator(state.currentUser)); + if (note.current) dispatch(shareNote(note.current)); + dispatch(setModerating(true)); dispatchHotkeyNotification(t("Hotkeys.togglePresentationMode.startPresenting")); } }; const toggleReadyState = () => { if (isReady) { - dispatch(Actions.setUserReadyStatus(state.currentUser.user.id, false)); + dispatch(setUserReadyStatus({userId: state.currentUser.user.id, ready: false})); dispatchHotkeyNotification(t("Hotkeys.toggleReadyState.notReady")); } else { - dispatch(Actions.setUserReadyStatus(state.currentUser.user.id, true)); + dispatch(setUserReadyStatus({userId: state.currentUser.user.id, ready: true})); dispatchHotkeyNotification(t("Hotkeys.toggleReadyState.ready")); } }; const toggleRaiseHand = () => { if (raisedHand) { - dispatch(Actions.setRaisedHand(state.currentUser.user.id, false)); + dispatch(setRaisedHandStatus({userId: state.currentUser.user.id, raisedHand: false})); dispatchHotkeyNotification(t("Hotkeys.toggleRaisedHand.lower")); } else { - dispatch(Actions.setRaisedHand(state.currentUser.user.id, true)); + dispatch(setRaisedHandStatus({userId: state.currentUser.user.id, raisedHand: true})); dispatchHotkeyNotification(t("Hotkeys.toggleRaisedHand.raise")); } }; const startTimer = (minutes: number) => { - dispatch(Actions.setTimer(minutes)); - dispatchHotkeyNotification(t("Hotkeys.timerStarted", {duration: minutes})) + dispatch(setTimer(minutes)); + dispatchHotkeyNotification(t("Hotkeys.timerStarted", {duration: minutes})); }; const toggleSettings = () => (window.location.pathname.includes("settings") ? navigate("") : navigate("settings/board")); @@ -133,10 +144,10 @@ export const HotkeyAnchor = () => { (e: KeyboardEvent) => { e.preventDefault(); if (state.showAuthors) { - dispatch(Actions.editBoard({showAuthors: false})); + dispatch(editBoard({showAuthors: false})); dispatchHotkeyNotification(t("Hotkeys.toggleShowAuthors.hide")); } else { - dispatch(Actions.editBoard({showAuthors: true})); + dispatch(editBoard({showAuthors: true})); dispatchHotkeyNotification(t("Hotkeys.toggleShowAuthors.show")); } }, @@ -148,10 +159,10 @@ export const HotkeyAnchor = () => { (e: KeyboardEvent) => { e.preventDefault(); if (state.showNotesOfOtherUsers) { - dispatch(Actions.editBoard({showNotesOfOtherUsers: false})); + dispatch(editBoard({showNotesOfOtherUsers: false})); dispatchHotkeyNotification(t("Hotkeys.toggleShowOtherUsersNotes.hide")); } else { - dispatch(Actions.editBoard({showNotesOfOtherUsers: true})); + dispatch(editBoard({showNotesOfOtherUsers: true})); dispatchHotkeyNotification(t("Hotkeys.toggleShowOtherUsersNotes.show")); } }, @@ -163,10 +174,10 @@ export const HotkeyAnchor = () => { (e: KeyboardEvent) => { e.preventDefault(); if (state.showHiddenColumns) { - dispatch(Actions.setShowHiddenColumns(false)); + dispatch(setShowHiddenColumns({showHiddenColumns: false})); dispatchHotkeyNotification(t("Hotkeys.toggleColumnVisibility.hide")); } else { - dispatch(Actions.setShowHiddenColumns(true)); + dispatch(setShowHiddenColumns({showHiddenColumns: true})); dispatchHotkeyNotification(t("Hotkeys.toggleColumnVisibility.show")); } }, diff --git a/src/components/Infobar/Infobar.tsx b/src/components/Infobar/Infobar.tsx index 34582f87ec..b775c867a0 100644 --- a/src/components/Infobar/Infobar.tsx +++ b/src/components/Infobar/Infobar.tsx @@ -29,7 +29,7 @@ export const InfoBar = () => {