From 8655ffa8c2955df930d849bf0339e3526f13dc36 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 16 Dec 2024 20:12:19 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F(typo)=20fix=20minor=20typos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found typos while working on the project using my IDE, fixed them. Sorry for the big commit. Not a big deal, can totally drop this commit. --- CHANGELOG.md | 4 ++-- docs/release.md | 2 +- src/backend/core/api/viewsets.py | 10 +++++----- src/backend/core/authentication/urls.py | 4 ++-- src/backend/core/models.py | 2 +- src/backend/core/services/collaboration_services.py | 2 +- .../core/tests/documents/test_api_document_accesses.py | 2 +- .../core/tests/documents/test_api_document_versions.py | 2 +- .../tests/documents/test_api_documents_ai_transform.py | 2 +- .../tests/documents/test_api_documents_ai_translate.py | 2 +- .../documents/test_api_documents_attachment_upload.py | 4 ++-- .../tests/documents/test_api_documents_media_auth.py | 2 +- .../core/tests/templates/test_api_template_accesses.py | 2 +- src/backend/core/tests/test_models_documents.py | 8 ++++---- src/backend/core/tests/test_models_users.py | 4 ++-- src/backend/core/tests/test_services_ai_services.py | 2 +- .../apps/e2e/__tests__/app-impress/doc-editor.spec.ts | 2 +- .../e2e/__tests__/app-impress/doc-visibility.spec.ts | 8 ++++---- .../apps/impress/src/api/__tests__/fetchApi.test.tsx | 2 +- src/frontend/apps/impress/src/core/auth/Auth.tsx | 2 +- .../apps/impress/src/core/auth/useAuthStore.tsx | 4 ++-- .../src/features/docs/doc-editor/hook/useSaveDoc.tsx | 2 +- .../features/docs/doc-header/components/DocTitle.tsx | 2 +- .../apps/impress/src/features/docs/doc-header/utils.ts | 2 +- .../docs/doc-management/api/useCreateFavoriteDoc.tsx | 6 +++--- .../docs/doc-management/api/useDeleteFavoriteDoc.tsx | 6 +++--- .../features/docs/doc-management/api/useUpdateDoc.tsx | 6 +++--- .../docs/doc-management/api/useUpdateDocLink.tsx | 6 +++--- .../docs/doc-share/components/DocVisibility.tsx | 2 +- .../docs/doc-table-content/components/Heading.tsx | 2 +- .../components/ModalConfirmationVersion.tsx | 2 +- .../docs/docs-grid/components/DocsGridActions.tsx | 4 ++-- .../impress/src/features/service-worker/ApiPlugin.ts | 2 +- .../apps/impress/src/features/service-worker/DocsDB.ts | 2 +- 34 files changed, 58 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28e07ec4..e28d8eb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -197,7 +197,7 @@ and this project adheres to - 🛂(frontend) match email if no existing user matches the sub - 🐛(backend) gitlab oicd userinfo endpoint #232 -- 🛂(frontend) redirect to the OIDC when private doc and unauthentified #292 +- 🛂(frontend) redirect to the OIDC when private doc and unauthenticated #292 - ♻️(backend) getting list of document versions available for a user #258 - 🔧(backend) fix configuration to avoid different ssl warning #297 - 🐛(frontend) fix editor break line not working #302 @@ -326,7 +326,7 @@ and this project adheres to - ⚡️(e2e) unique login between tests (#80) - ⚡️(CI) improve e2e job (#86) - ♻️(frontend) improve the error and message info ui (#93) -- ✏️(frontend) change all occurences of pad to doc (#99) +- ✏️(frontend) change all occurrences of pad to doc (#99) ## Fixed diff --git a/docs/release.md b/docs/release.md index 2364c10a..10b442cb 100644 --- a/docs/release.md +++ b/docs/release.md @@ -6,7 +6,7 @@ Whenever we are cooking a new release (e.g. `4.18.1`) we should follow a standar 2. Bump the release number for backend project, frontend projects, and Helm files: - for backend, update the version number by hand in `pyproject.toml`, - - for each projects (`src/frontend`, `src/frontend/apps/*`, `src/frontend/packages/*`, `src/mail`), run `yarn version --new-version --no-git-tag-version 4.18.1` in their directory. This will update their `package.json` for you, + - for each project (`src/frontend`, `src/frontend/apps/*`, `src/frontend/packages/*`, `src/mail`), run `yarn version --new-version --no-git-tag-version 4.18.1` in their directory. This will update their `package.json` for you, - for Helm, update Docker image tag in files located at `src/helm/env.d` for both `preprod` and `production` environments: ```yaml diff --git a/src/backend/core/api/viewsets.py b/src/backend/core/api/viewsets.py index 7dbee05d..a3c9103f 100644 --- a/src/backend/core/api/viewsets.py +++ b/src/backend/core/api/viewsets.py @@ -630,7 +630,7 @@ class DocumentViewSet( nginx.ingress.kubernetes.io/auth-url annotation to understand how the Nginx ingress is configured to do this. - Based on the original url and the logged in user, we must decide if we authorize Nginx + Based on the original url and the logged-in user, we must decide if we authorize Nginx to let this request go through (by returning a 200 code) or if we block it (by returning a 403 error). Note that we return 403 errors without any further details for security reasons. @@ -835,7 +835,7 @@ class DocumentAccessViewSet( serializer_class = serializers.DocumentAccessSerializer def perform_create(self, serializer): - """Add a new access to the document and send an email to the new added user.""" + """Add new access to the document and email the new added user.""" access = serializer.save() language = self.request.headers.get("Content-Language", "en-us") @@ -847,7 +847,7 @@ class DocumentAccessViewSet( ) def perform_update(self, serializer): - """Update an access to the document and notify the collaboration server.""" + """Update access to the document and notify the collaboration server.""" access = serializer.save() access_user_id = None @@ -860,7 +860,7 @@ class DocumentAccessViewSet( ) def perform_destroy(self, instance): - """Delete an access to the document and notify the collaboration server.""" + """Delete access to the document and notify the collaboration server.""" instance.delete() # Notify collaboration server about the access removed @@ -1099,7 +1099,7 @@ class InvitationViewset( return queryset def perform_create(self, serializer): - """Save invitation to a document then send an email to the invited user.""" + """Save invitation to a document then email the invited user.""" invitation = serializer.save() language = self.request.headers.get("Content-Language", "en-us") diff --git a/src/backend/core/authentication/urls.py b/src/backend/core/authentication/urls.py index 2a66c83d..a8b44cf9 100644 --- a/src/backend/core/authentication/urls.py +++ b/src/backend/core/authentication/urls.py @@ -2,7 +2,7 @@ from django.urls import path -from mozilla_django_oidc.urls import urlpatterns as mozzila_oidc_urls +from mozilla_django_oidc.urls import urlpatterns as mozilla_oidc_urls from .views import OIDCLogoutCallbackView, OIDCLogoutView @@ -14,5 +14,5 @@ urlpatterns = [ OIDCLogoutCallbackView.as_view(), name="oidc_logout_callback", ), - *mozzila_oidc_urls, + *mozilla_oidc_urls, ] diff --git a/src/backend/core/models.py b/src/backend/core/models.py index 74d20808..20d91ace 100644 --- a/src/backend/core/models.py +++ b/src/backend/core/models.py @@ -155,7 +155,7 @@ class User(AbstractBaseUser, BaseModel, auth_models.PermissionsMixin): email = models.EmailField(_("identity email address"), blank=True, null=True) # Unlike the "email" field which stores the email coming from the OIDC token, this field - # stores the email used by staff users to login to the admin site + # stores the email used by staff users to log in to the admin site admin_email = models.EmailField( _("admin email address"), unique=True, blank=True, null=True ) diff --git a/src/backend/core/services/collaboration_services.py b/src/backend/core/services/collaboration_services.py index 283a8742..dac16fa6 100644 --- a/src/backend/core/services/collaboration_services.py +++ b/src/backend/core/services/collaboration_services.py @@ -17,7 +17,7 @@ class CollaborationService: def reset_connections(self, room, user_id=None): """ Reset connections of a room in the collaboration server. - Reseting a connection means that the user will be disconnected and will + Resetting a connection means that the user will be disconnected and will have to reconnect to the collaboration server, with updated rights. """ endpoint = "reset-connections" diff --git a/src/backend/core/tests/documents/test_api_document_accesses.py b/src/backend/core/tests/documents/test_api_document_accesses.py index 5b1ea283..5b1c9179 100644 --- a/src/backend/core/tests/documents/test_api_document_accesses.py +++ b/src/backend/core/tests/documents/test_api_document_accesses.py @@ -698,7 +698,7 @@ def test_api_document_accesses_delete_administrators_except_owners( mock_reset_connections, # pylint: disable=redefined-outer-name ): """ - Users who are administrators in a document should be allowed to delete an access + Users who are administrators in a document should be allowed to delete access from the document provided it is not ownership. """ user = factories.UserFactory() diff --git a/src/backend/core/tests/documents/test_api_document_versions.py b/src/backend/core/tests/documents/test_api_document_versions.py index e91012b2..c5adcbdc 100644 --- a/src/backend/core/tests/documents/test_api_document_versions.py +++ b/src/backend/core/tests/documents/test_api_document_versions.py @@ -285,7 +285,7 @@ def test_api_document_versions_retrieve_authenticated_related(via, mock_user_tea assert response.status_code == 404 # Create a new version should not make it available to the user because - # only the current version is available to the user but it is excluded + # only the current version is available to the user, but it is excluded # from the list document.content = "new content 1" document.save() diff --git a/src/backend/core/tests/documents/test_api_documents_ai_transform.py b/src/backend/core/tests/documents/test_api_documents_ai_transform.py index 91e16e4a..7d55cf47 100644 --- a/src/backend/core/tests/documents/test_api_documents_ai_transform.py +++ b/src/backend/core/tests/documents/test_api_documents_ai_transform.py @@ -134,7 +134,7 @@ def test_api_documents_ai_transform_authenticated_forbidden(reach, role): @patch("openai.resources.chat.completions.Completions.create") def test_api_documents_ai_transform_authenticated_success(mock_create, reach, role): """ - Autenticated who are not related to a document should be able to request AI transform + Authenticated who are not related to a document should be able to request AI transform if the link reach and role permit it. """ user = factories.UserFactory() diff --git a/src/backend/core/tests/documents/test_api_documents_ai_translate.py b/src/backend/core/tests/documents/test_api_documents_ai_translate.py index 21547e7a..1b81762d 100644 --- a/src/backend/core/tests/documents/test_api_documents_ai_translate.py +++ b/src/backend/core/tests/documents/test_api_documents_ai_translate.py @@ -154,7 +154,7 @@ def test_api_documents_ai_translate_authenticated_forbidden(reach, role): @patch("openai.resources.chat.completions.Completions.create") def test_api_documents_ai_translate_authenticated_success(mock_create, reach, role): """ - Autenticated who are not related to a document should be able to request AI translate + Authenticated who are not related to a document should be able to request AI translate if the link reach and role permit it. """ user = factories.UserFactory() diff --git a/src/backend/core/tests/documents/test_api_documents_attachment_upload.py b/src/backend/core/tests/documents/test_api_documents_attachment_upload.py index 1288f8ca..fb9c7c39 100644 --- a/src/backend/core/tests/documents/test_api_documents_attachment_upload.py +++ b/src/backend/core/tests/documents/test_api_documents_attachment_upload.py @@ -111,7 +111,7 @@ def test_api_documents_attachment_upload_authenticated_forbidden(reach, role): ) def test_api_documents_attachment_upload_authenticated_success(reach, role): """ - Autenticated who are not related to a document should be able to upload a file + Authenticated who are not related to a document should be able to upload a file if the link reach and role permit it. """ user = factories.UserFactory() @@ -225,7 +225,7 @@ def test_api_documents_attachment_upload_invalid(client): def test_api_documents_attachment_upload_size_limit_exceeded(settings): - """The uploaded file should not exceeed the maximum size in settings.""" + """The uploaded file should not exceed the maximum size in settings.""" settings.DOCUMENT_IMAGE_MAX_SIZE = 1048576 # 1 MB for test user = factories.UserFactory() diff --git a/src/backend/core/tests/documents/test_api_documents_media_auth.py b/src/backend/core/tests/documents/test_api_documents_media_auth.py index 28fd370c..e87df9a8 100644 --- a/src/backend/core/tests/documents/test_api_documents_media_auth.py +++ b/src/backend/core/tests/documents/test_api_documents_media_auth.py @@ -160,7 +160,7 @@ def test_api_documents_media_auth_authenticated_restricted(): @pytest.mark.parametrize("via", VIA) def test_api_documents_media_auth_related(via, mock_user_teams): """ - Users who have a specific access to a document, whatever the role, should be able to + Users who have specific access to a document, whatever the role, should be able to retrieve related attachments. """ user = factories.UserFactory() diff --git a/src/backend/core/tests/templates/test_api_template_accesses.py b/src/backend/core/tests/templates/test_api_template_accesses.py index cd08abfb..6325522a 100644 --- a/src/backend/core/tests/templates/test_api_template_accesses.py +++ b/src/backend/core/tests/templates/test_api_template_accesses.py @@ -647,7 +647,7 @@ def test_api_template_accesses_delete_administrators_except_owners( via, mock_user_teams ): """ - Users who are administrators in a template should be allowed to delete an access + Users who are administrators in a template should be allowed to delete access from the template provided it is not ownership. """ user = factories.UserFactory() diff --git a/src/backend/core/tests/test_models_documents.py b/src/backend/core/tests/test_models_documents.py index 8ddaa018..ab140e8d 100644 --- a/src/backend/core/tests/test_models_documents.py +++ b/src/backend/core/tests/test_models_documents.py @@ -84,7 +84,7 @@ def test_models_documents_file_key(): def test_models_documents_get_abilities_forbidden(is_authenticated, reach, role): """ Check abilities returned for a document giving insufficient roles to link holders - i.e anonymous users or authenticated users who have no specific role on the document. + i.e. anonymous users or authenticated users who have no specific role on the document. """ document = factories.DocumentFactory(link_reach=reach, link_role=role) user = factories.UserFactory() if is_authenticated else AnonymousUser() @@ -121,7 +121,7 @@ def test_models_documents_get_abilities_forbidden(is_authenticated, reach, role) def test_models_documents_get_abilities_reader(is_authenticated, reach): """ Check abilities returned for a document giving reader role to link holders - i.e anonymous users or authenticated users who have no specific role on the document. + i.e. anonymous users or authenticated users who have no specific role on the document. """ document = factories.DocumentFactory(link_reach=reach, link_role="reader") user = factories.UserFactory() if is_authenticated else AnonymousUser() @@ -158,7 +158,7 @@ def test_models_documents_get_abilities_reader(is_authenticated, reach): def test_models_documents_get_abilities_editor(is_authenticated, reach): """ Check abilities returned for a document giving editor role to link holders - i.e anonymous users or authenticated users who have no specific role on the document. + i.e. anonymous users or authenticated users who have no specific role on the document. """ document = factories.DocumentFactory(link_reach=reach, link_role="editor") user = factories.UserFactory() if is_authenticated else AnonymousUser() @@ -449,7 +449,7 @@ def test_models_documents__email_invitation__success(): def test_models_documents__email_invitation__success_fr(): """ - The email invitation is sent successfully in french. + The email invitation is sent successfully in French. """ document = factories.DocumentFactory() diff --git a/src/backend/core/tests/test_models_users.py b/src/backend/core/tests/test_models_users.py index edea5bb9..cd30f22a 100644 --- a/src/backend/core/tests/test_models_users.py +++ b/src/backend/core/tests/test_models_users.py @@ -27,7 +27,7 @@ def test_models_users_id_unique(): def test_models_users_send_mail_main_existing(): - """The "email_user' method should send mail to the user's email address.""" + """The 'email_user' method should send mail to the user's email address.""" user = factories.UserFactory() with mock.patch("django.core.mail.send_mail") as mock_send: @@ -37,7 +37,7 @@ def test_models_users_send_mail_main_existing(): def test_models_users_send_mail_main_missing(): - """The "email_user' method should fail if the user has no email address.""" + """The 'email_user' method should fail if the user has no email address.""" user = factories.UserFactory(email=None) with pytest.raises(ValueError) as excinfo: diff --git a/src/backend/core/tests/test_services_ai_services.py b/src/backend/core/tests/test_services_ai_services.py index c1620b2a..32ebabeb 100644 --- a/src/backend/core/tests/test_services_ai_services.py +++ b/src/backend/core/tests/test_services_ai_services.py @@ -1,5 +1,5 @@ """ -Test ai API endpoints in the impress core app. +Test AI API endpoints in the impress core app. """ import json diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts index 8dba8dab..cdeaf1ce 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts @@ -123,7 +123,7 @@ test.describe('Doc Editor', () => { const selectVisibility = page.getByLabel('Visibility', { exact: true }); - // When the visibility is changed, the ws should closed the connection (backend signal) + // When the visibility is changed, the ws should close the connection (backend signal) const wsClosePromise = webSocket.waitForEvent('close'); await selectVisibility.click(); diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-visibility.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-visibility.spec.ts index 364d0e2f..6f48ad20 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/doc-visibility.spec.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-visibility.spec.ts @@ -67,7 +67,7 @@ test.describe('Doc Visibility', () => { test.describe('Doc Visibility: Restricted', () => { test.use({ storageState: { cookies: [], origins: [] } }); - test('A doc is not accessible when not authentified.', async ({ + test('A doc is not accessible when not authenticated.', async ({ page, browserName, }) => { @@ -98,7 +98,7 @@ test.describe('Doc Visibility: Restricted', () => { await expect(page.getByRole('textbox', { name: 'password' })).toBeVisible(); }); - test('A doc is not accessible when authentified but not member.', async ({ + test('A doc is not accessible when authenticated but not member.', async ({ page, browserName, }) => { @@ -316,7 +316,7 @@ test.describe('Doc Visibility: Public', () => { test.describe('Doc Visibility: Authenticated', () => { test.use({ storageState: { cookies: [], origins: [] } }); - test('A doc is not accessible when unauthentified.', async ({ + test('A doc is not accessible when unauthenticated.', async ({ page, browserName, }) => { @@ -325,7 +325,7 @@ test.describe('Doc Visibility: Authenticated', () => { const [docTitle] = await createDoc( page, - 'Authenticated unauthentified', + 'Authenticated unauthenticated', browserName, 1, ); diff --git a/src/frontend/apps/impress/src/api/__tests__/fetchApi.test.tsx b/src/frontend/apps/impress/src/api/__tests__/fetchApi.test.tsx index 05dc0b13..d89eb3a5 100644 --- a/src/frontend/apps/impress/src/api/__tests__/fetchApi.test.tsx +++ b/src/frontend/apps/impress/src/api/__tests__/fetchApi.test.tsx @@ -29,7 +29,7 @@ describe('fetchAPI', () => { }); }); - it('check the versionning', () => { + it('check the versioning', () => { fetchMock.mock('http://test.jest/api/v2.0/some/url', 200); void fetchAPI('some/url', {}, '2.0'); diff --git a/src/frontend/apps/impress/src/core/auth/Auth.tsx b/src/frontend/apps/impress/src/core/auth/Auth.tsx index bcfa6a53..f9e9dfbf 100644 --- a/src/frontend/apps/impress/src/core/auth/Auth.tsx +++ b/src/frontend/apps/impress/src/core/auth/Auth.tsx @@ -33,7 +33,7 @@ export const Auth = ({ children }: PropsWithChildren) => { setPathAllowed(!regexpUrlsAuth.some((regexp) => !!asPath.match(regexp))); }, [asPath]); - // We force to login except on allowed paths + // We force to log in except on allowed paths useEffect(() => { if (!initiated || authenticated || pathAllowed) { return; diff --git a/src/frontend/apps/impress/src/core/auth/useAuthStore.tsx b/src/frontend/apps/impress/src/core/auth/useAuthStore.tsx index 63e285b2..b13c90a5 100644 --- a/src/frontend/apps/impress/src/core/auth/useAuthStore.tsx +++ b/src/frontend/apps/impress/src/core/auth/useAuthStore.tsx @@ -46,8 +46,8 @@ export const useAuthStore = create((set, get) => ({ terminateCrispSession(); window.location.replace(`${baseApiUrl()}logout/`); }, - // If we try to access a specific page and we are not authenticated - // we store the path in the local storage to redirect to it after login + // If we try to access a specific page, and we are not authenticated + // we store the path in the local storage to redirect to it after log in setAuthUrl() { if (window.location.pathname !== '/') { localStorage.setItem(PATH_AUTH_LOCAL_STORAGE, window.location.pathname); diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useSaveDoc.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useSaveDoc.tsx index ca1ed005..f8efae93 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useSaveDoc.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useSaveDoc.tsx @@ -10,7 +10,7 @@ import { toBase64 } from '../utils'; const useSaveDoc = (docId: string, doc: Y.Doc, canSave: boolean) => { const { mutate: updateDoc } = useUpdateDoc({ - listInvalideQueries: [KEY_LIST_DOC_VERSIONS], + listInvalidQueries: [KEY_LIST_DOC_VERSIONS], }); const [initialDoc, setInitialDoc] = useState( toBase64(Y.encodeStateAsUpdate(doc)), diff --git a/src/frontend/apps/impress/src/features/docs/doc-header/components/DocTitle.tsx b/src/frontend/apps/impress/src/features/docs/doc-header/components/DocTitle.tsx index 37e2fdf9..4b857363 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-header/components/DocTitle.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-header/components/DocTitle.tsx @@ -62,7 +62,7 @@ const DocTitleInput = ({ doc }: DocTitleProps) => { const { broadcast } = useBroadcastStore(); const { mutate: updateDoc } = useUpdateDoc({ - listInvalideQueries: [KEY_DOC, KEY_LIST_DOC], + listInvalidQueries: [KEY_DOC, KEY_LIST_DOC], onSuccess(data) { if (data.title !== untitledDocument) { toast(t('Document title updated successfully'), VariantType.SUCCESS); diff --git a/src/frontend/apps/impress/src/features/docs/doc-header/utils.ts b/src/frontend/apps/impress/src/features/docs/doc-header/utils.ts index de15b30e..cfd4def6 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-header/utils.ts +++ b/src/frontend/apps/impress/src/features/docs/doc-header/utils.ts @@ -94,7 +94,7 @@ const convertToImg = (html: string) => { const doc = parser.parseFromString(html, 'text/html'); const divs = doc.querySelectorAll('div[data-content-type="image"]'); - // Loop through each div and replace it with a img + // Loop through each div and replace it with an img divs.forEach((div) => { const img = document.createElement('img'); diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/api/useCreateFavoriteDoc.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/api/useCreateFavoriteDoc.tsx index 05f82cea..74ef25c5 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/api/useCreateFavoriteDoc.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/api/useCreateFavoriteDoc.tsx @@ -20,18 +20,18 @@ export const createFavoriteDoc = async ({ id }: CreateFavoriteDocParams) => { interface CreateFavoriteDocProps { onSuccess?: () => void; - listInvalideQueries?: string[]; + listInvalidQueries?: string[]; } export function useCreateFavoriteDoc({ onSuccess, - listInvalideQueries, + listInvalidQueries, }: CreateFavoriteDocProps) { const queryClient = useQueryClient(); return useMutation({ mutationFn: createFavoriteDoc, onSuccess: () => { - listInvalideQueries?.forEach((queryKey) => { + listInvalidQueries?.forEach((queryKey) => { void queryClient.invalidateQueries({ queryKey: [queryKey], }); diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/api/useDeleteFavoriteDoc.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/api/useDeleteFavoriteDoc.tsx index 63d55e8d..7393928c 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/api/useDeleteFavoriteDoc.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/api/useDeleteFavoriteDoc.tsx @@ -20,18 +20,18 @@ export const deleteFavoriteDoc = async ({ id }: DeleteFavoriteDocParams) => { interface DeleteFavoriteDocProps { onSuccess?: () => void; - listInvalideQueries?: string[]; + listInvalidQueries?: string[]; } export function useDeleteFavoriteDoc({ onSuccess, - listInvalideQueries, + listInvalidQueries, }: DeleteFavoriteDocProps) { const queryClient = useQueryClient(); return useMutation({ mutationFn: deleteFavoriteDoc, onSuccess: () => { - listInvalideQueries?.forEach((queryKey) => { + listInvalidQueries?.forEach((queryKey) => { void queryClient.invalidateQueries({ queryKey: [queryKey], }); diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/api/useUpdateDoc.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/api/useUpdateDoc.tsx index a012cf26..c85d8813 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/api/useUpdateDoc.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/api/useUpdateDoc.tsx @@ -26,18 +26,18 @@ export const updateDoc = async ({ interface UpdateDocProps { onSuccess?: (data: Doc) => void; - listInvalideQueries?: string[]; + listInvalidQueries?: string[]; } export function useUpdateDoc({ onSuccess, - listInvalideQueries, + listInvalidQueries, }: UpdateDocProps = {}) { const queryClient = useQueryClient(); return useMutation({ mutationFn: updateDoc, onSuccess: (data) => { - listInvalideQueries?.forEach((queryKey) => { + listInvalidQueries?.forEach((queryKey) => { void queryClient.invalidateQueries({ queryKey: [queryKey], }); diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/api/useUpdateDocLink.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/api/useUpdateDocLink.tsx index b5ef6ba7..71851615 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/api/useUpdateDocLink.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/api/useUpdateDocLink.tsx @@ -30,12 +30,12 @@ export const updateDocLink = async ({ interface UpdateDocLinkProps { onSuccess?: (data: Doc) => void; - listInvalideQueries?: string[]; + listInvalidQueries?: string[]; } export function useUpdateDocLink({ onSuccess, - listInvalideQueries, + listInvalidQueries, }: UpdateDocLinkProps = {}) { const queryClient = useQueryClient(); const { broadcast } = useBroadcastStore(); @@ -43,7 +43,7 @@ export function useUpdateDocLink({ return useMutation({ mutationFn: updateDocLink, onSuccess: (data, variable) => { - listInvalideQueries?.forEach((queryKey) => { + listInvalidQueries?.forEach((queryKey) => { void queryClient.invalidateQueries({ queryKey: [queryKey], }); diff --git a/src/frontend/apps/impress/src/features/docs/doc-share/components/DocVisibility.tsx b/src/frontend/apps/impress/src/features/docs/doc-share/components/DocVisibility.tsx index 8a032148..6d569cca 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-share/components/DocVisibility.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-share/components/DocVisibility.tsx @@ -49,7 +49,7 @@ export const DocVisibility = ({ doc }: DocVisibilityProps) => { }, ); }, - listInvalideQueries: [KEY_LIST_DOC, KEY_DOC], + listInvalidQueries: [KEY_LIST_DOC, KEY_DOC], }); const updateReach = (link_reach: LinkReach) => { diff --git a/src/frontend/apps/impress/src/features/docs/doc-table-content/components/Heading.tsx b/src/frontend/apps/impress/src/features/docs/doc-table-content/components/Heading.tsx index 9a564f74..e959aed1 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-table-content/components/Heading.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-table-content/components/Heading.tsx @@ -44,7 +44,7 @@ export const Heading = ({ onMouseOver={() => setIsHover(true)} onMouseLeave={() => setIsHover(false)} onClick={() => { - // With mobile the focus open the keyboard and the scroll is not working + // With mobile the focus open the keyboard and the scroll are not working if (!isMobile) { editor.focus(); } diff --git a/src/frontend/apps/impress/src/features/docs/doc-versioning/components/ModalConfirmationVersion.tsx b/src/frontend/apps/impress/src/features/docs/doc-versioning/components/ModalConfirmationVersion.tsx index 964ebe81..cb91691a 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-versioning/components/ModalConfirmationVersion.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-versioning/components/ModalConfirmationVersion.tsx @@ -42,7 +42,7 @@ export const ModalConfirmationVersion = ({ const { push } = useRouter(); const { provider } = useProviderStore(); const { mutate: updateDoc } = useUpdateDoc({ - listInvalideQueries: [KEY_LIST_DOC_VERSIONS], + listInvalidQueries: [KEY_LIST_DOC_VERSIONS], onSuccess: () => { const onDisplaySuccess = () => { toast(t('Version restored successfully'), VariantType.SUCCESS); diff --git a/src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridActions.tsx b/src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridActions.tsx index c6326eb1..51cb3004 100644 --- a/src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridActions.tsx +++ b/src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridActions.tsx @@ -23,10 +23,10 @@ export const DocsGridActions = ({ const deleteModal = useModal(); const removeFavoriteDoc = useDeleteFavoriteDoc({ - listInvalideQueries: [KEY_LIST_DOC], + listInvalidQueries: [KEY_LIST_DOC], }); const makeFavoriteDoc = useCreateFavoriteDoc({ - listInvalideQueries: [KEY_LIST_DOC], + listInvalidQueries: [KEY_LIST_DOC], }); const options: DropdownMenuOption[] = [ diff --git a/src/frontend/apps/impress/src/features/service-worker/ApiPlugin.ts b/src/frontend/apps/impress/src/features/service-worker/ApiPlugin.ts index 2195c00b..ccd8f85d 100644 --- a/src/frontend/apps/impress/src/features/service-worker/ApiPlugin.ts +++ b/src/frontend/apps/impress/src/features/service-worker/ApiPlugin.ts @@ -112,7 +112,7 @@ export class ApiPlugin implements WorkboxPlugin { }; /** - * When we get an network error. + * When we get a network error. */ handlerDidError: WorkboxPlugin['handlerDidError'] = async ({ request }) => { if (!this.isFetchDidFailed) { diff --git a/src/frontend/apps/impress/src/features/service-worker/DocsDB.ts b/src/frontend/apps/impress/src/features/service-worker/DocsDB.ts index 4d0e85f1..510ab6bf 100644 --- a/src/frontend/apps/impress/src/features/service-worker/DocsDB.ts +++ b/src/frontend/apps/impress/src/features/service-worker/DocsDB.ts @@ -34,7 +34,7 @@ interface IDocsDB extends DBSchema { type TableName = 'doc-list' | 'doc-item' | 'doc-mutation'; /** - * IndexDB version must be a integer + * IndexDB version must be an integer * @returns */ const getCurrentVersion = () => {