From 2f0f423dba6fa6467a2e6ca32c39d8f61591f0b3 Mon Sep 17 00:00:00 2001 From: amrkv526 <93342376+amrkv526@users.noreply.github.com> Date: Sun, 3 Nov 2024 18:50:36 -0500 Subject: [PATCH 01/40] Add bi-monthly dependency update workflow --- .github/workflows/dependency_update.yaml | 105 +++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .github/workflows/dependency_update.yaml diff --git a/.github/workflows/dependency_update.yaml b/.github/workflows/dependency_update.yaml new file mode 100644 index 000000000..bba1be2e2 --- /dev/null +++ b/.github/workflows/dependency_update.yaml @@ -0,0 +1,105 @@ +name: Bi-Monthly Dependency Update + +on: + schedule: + - cron: '0 0 1 */2 *' + workflow_dispatch: + +jobs: + update_dependencies: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '19.8.1' + + - name: Install npm-check-updates + run: npm install -g npm-check-updates + + - name: Update frontend dependencies + working-directory: frontend + run: | + ncu -u --target minor + npm install + npm ci # Ensures a clean installation state + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10.2' + + - name: Update backend dependencies + working-directory: backend + run: | + pip install -r requirements.txt + pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U + pip freeze > requirements.txt + + - name: Run backend tests + working-directory: backend + run: | + python manage.py test || echo "Backend tests failed" >> error_log.txt + + - name: Build project + working-directory: frontend + run: | + npm run build || echo "Frontend build failed" >> error_log.txt + + - name: Run frontend tests + working-directory: frontend + run: | + npm run test:local || echo "Frontend tests failed" >> error_log.txt + + - name: Type check + working-directory: frontend + run: | + npm run typecheck || echo "Frontend typecheck failed" >> error_log.txt + + - name: Lint code + working-directory: frontend + run: | + npm run lint || echo "Frontend linting failed" >> error_log.txt + + - name: Format code + working-directory: frontend + run: | + npm run format || echo "Frontend formatting failed" >> error_log.txt + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + title: "Bi-Monthly Dependency Update" + body: | + Automated bi-monthly dependency update. + - Updated frontend and backend dependencies to the latest minor versions. + - See below for the results of the build, typecheck, and test runs. + branch: "dependency-update-$(date +'%Y%m%d')" + + - name: Notify Team via Matrix + uses: fadenb/matrix-chat-message@v0.0.6 + with: + homeserver: 'matrix.org' + token: ${{ secrets.MATRIX_TOKEN }} + channel: '!CRgLpGeOBNwxYCtqmK:matrix.org' + message: | + Bi-monthly dependency update PR created. Please review it and check for any issues! + + - name: Log Errors + if: failure() + run: | + if [[ -f error_log.txt ]]; then + cat error_log.txt + else + echo "No errors found during dependency update." + fi + + - name: Create GitHub Issue + if: failure() + uses: peter-evans/create-issue-from-file@v4 + with: + title: Dependency Update Errors + content-filepath: error_log.txt From 402ca2307cc35eb5a52950a6865612994c324e8f Mon Sep 17 00:00:00 2001 From: amrkv526 <93342376+amrkv526@users.noreply.github.com> Date: Sun, 3 Nov 2024 18:59:10 -0500 Subject: [PATCH 02/40] Trigger workflow detection --- .github/workflows/dependency_update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependency_update.yaml b/.github/workflows/dependency_update.yaml index bba1be2e2..328584cfd 100644 --- a/.github/workflows/dependency_update.yaml +++ b/.github/workflows/dependency_update.yaml @@ -3,7 +3,7 @@ name: Bi-Monthly Dependency Update on: schedule: - cron: '0 0 1 */2 *' - workflow_dispatch: + workflow_dispatch: #adding comment to trigger workflow jobs: update_dependencies: From 00310b50c8764d6b75cba0fc18da60af10f5c5b1 Mon Sep 17 00:00:00 2001 From: amrkv526 <93342376+amrkv526@users.noreply.github.com> Date: Sun, 3 Nov 2024 19:14:56 -0500 Subject: [PATCH 03/40] minor syntax changes --- .github/workflows/dependency_update.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependency_update.yaml b/.github/workflows/dependency_update.yaml index 328584cfd..cf0250713 100644 --- a/.github/workflows/dependency_update.yaml +++ b/.github/workflows/dependency_update.yaml @@ -3,7 +3,7 @@ name: Bi-Monthly Dependency Update on: schedule: - cron: '0 0 1 */2 *' - workflow_dispatch: #adding comment to trigger workflow + workflow_dispatch: jobs: update_dependencies: @@ -24,8 +24,7 @@ jobs: working-directory: frontend run: | ncu -u --target minor - npm install - npm ci # Ensures a clean installation state + npm ci - name: Set up Python uses: actions/setup-python@v2 From 6fe6ce45dfc6fb39dd04c389a97e3557533b049d Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Thu, 7 Nov 2024 01:16:19 +0100 Subject: [PATCH 04/40] Add swagger UI favicon --- backend/static/swagger_favicon.png | Bin 0 -> 670 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 backend/static/swagger_favicon.png diff --git a/backend/static/swagger_favicon.png b/backend/static/swagger_favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..343e5e5875273a2402b4cff536f4ec7c152b7ddc GIT binary patch literal 670 zcmV;P0%84$P)XKC?hmG@EF5>i)o_B~4Z;bS6z(mIuHgp24PdX1OBacSCx9DdJOSgzWan%&#Nl__ z{ecOUveK)W`Tc&s_xcUOqe^dHp8-ObK@xq9?HdAQf{+o{C;jG^{IDM@;3|orK_dnn z!V^U#Q~1r3ersNY_dQq|ZlU0W1v_--Uw}xzLJ9RRPOi|-m@%>5FmQi?O%{NNq}~yS z1vgv@h@*-o@!->KZxI0EJ1QrJV+!Y(-Xt-jTOq>?8-C39?s~8NKUFBZmK?dU5DWra zCKqlJqzu-z_70req0!cfEt8|{TKYYL<9aM8nPHqrLI`LeP}lR_l-#7$oSc5V?X3h| zO7Lu1xi1_uP`J2OGAVcZ^|;Xf*96W1)g|6EMIdf6nXLkQ~n0`ylb6`Sr8* ziuKjP99f`+OWpsr-6zIeQf`#tFAZqDnR?Z0`f1Jc!&NYFypxxaM+}E3+^!#&xiTzt z%2=~-tz^4`Wvb7sT@G@ShO#x@q8$W%_}QBx!5ek|)dn`PLohQVGkCulO;hF(CUsvH znwy0v^LH<=hQUOq0a86VW4SPWZ%-~e!aS=u3r*-x*{^$v46IWNckjm!mTINHlE~k= zu`(IJ6Qz@92HyWn__)EM?ZJ(8b*G0C%xv?^GH}@c4~gg|TfLwndH?_b07*qoM6N<$ Ef<0g?asU7T literal 0 HcmV?d00001 From 4793b79a7d64e3c7b583ef8e8fddf3937b2fedba Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Thu, 7 Nov 2024 01:21:15 +0100 Subject: [PATCH 05/40] Update Swagger favicon style --- backend/static/swagger_favicon.png | Bin 670 -> 596 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/backend/static/swagger_favicon.png b/backend/static/swagger_favicon.png index 343e5e5875273a2402b4cff536f4ec7c152b7ddc..4c428b3b99ddeb0d9631ebaeab5529fd706dccbd 100644 GIT binary patch delta 522 zcmV+l0`>i#1=IwPReu5LNklt847NSPBI+iqs_ANa0&;^UCm@hk>W++} zc3XOaNlrkz!^agsI-#CHLjISXdNzCU>$WErMywSrW|3W-GQ~0JCIGpUI0rT-l@Um&4J<_0KvBpD0*$ zYR8TSL?jE%@_zt5krpA~v~0oU zZ5BcD0nbZ7WecWoXM0#1Cnb>TI{-kL!=@6*g4FWeaiR>OGkTNE$b}5Y4vA#d_Gh9{ zIdNo+9A5qk7^tCSNsNVM0BtL#6mdK|b#|`XtA9T4$A2hk$Ov_&rwEXYG|S}|a7i=J zt&8@+-gdfH-cZ?E8eXleXJ_-X7}th#xKS!UDwQRlbfPPElolNxLc?}-KAqj?RDS(T z3X)E|9uoY84@4OLdk<-E?laAmYrF@qM}&(RN30?nw#~~pQuKcTvqSfB^zf}V00000 MNkvXXt^-0~f?#Lw*#H0l delta 596 zcmV-a0;~Ph1fB(uReu6ANkl{rl>3&cfr+gg5V9p378b_EsU<= z2EYwquZ~L>iG?SC8)Q5IJZ(g4PLYF}j zeU0rK0%U@a5!WaE=9m1iA1mN0iJ(Cv1{}f@MI=-B&69p>UVnu5Jy;rUq2PoCJ9Ot? zfJnbW3H2{duF%eyF|pn-aDRbK7J!JP-VuidH(UycqlzZ+;L~ky5dh*lDkp|x3g?*K zBr&5~A;SzCe$4modawOIRVcfb9J#R&3<6sw7j6=y4A!;w4xHPe(bkDAlcVff`aOc< zdMqfJVVp=p2!CiGP}lR_l-#7$oSc5V?X3h|O7Lu1xi1_uP`J2OGAVcZ^|; zXf*96W1)g|6EMIdf6nXLkQ~n0`ylb6`Sr8*iuKjP9DiA$g-hN4w%sSjTvBe7;V%tn zy_tH|Yx-%;^TSmzaJ-Y3kw*-NDBP|em$@=5bjnz>aIIv!f@P}Dt6dIqlZLW2-l81@ zefZg%BEcJV|J4RIu|qI3BQtov8BJ5>5hitC7Mh!dDD!tOuZF=yrvXwuIb*pneQ!@L zJHkAxI86&p=ug?Ndx;FJQww+R#}AfjrN5HM-?_0e8Nd^zlV=9r|4jI}!J_TKjdgXW ihZ4+e^UE@D*#8fS=q6jepdxwz0000 Date: Thu, 7 Nov 2024 01:26:40 +0100 Subject: [PATCH 06/40] Updates outputs from the backend to camelCase for easy frontend ingestion --- CONTRIBUTING.md | 2 +- backend/authentication/serializers.py | 4 ++ backend/authentication/views.py | 2 + backend/backend/settings.py | 54 ++++++++++++++----- backend/entities/factories.py | 1 + backend/entities/serializers.py | 2 +- backend/requirements-dev.in | 8 +-- backend/requirements-dev.txt | 2 + backend/requirements.in | 8 +-- backend/requirements.txt | 2 + frontend/components/EmptyState.vue | 2 +- frontend/components/card/CardConnect.vue | 14 ++--- frontend/components/card/CardDocsEntry.vue | 6 +-- .../card/CardOrgApplicationVote.vue | 4 +- .../components/card/about/CardAboutEvent.vue | 2 +- .../components/card/about/CardAboutGroup.vue | 2 +- .../card/about/CardAboutOrganization.vue | 2 +- .../get-involved/CardGetInvolvedGroup.vue | 4 +- .../CardGetInvolvedOrganization.vue | 10 ++-- .../card/search-result/CardSearchResult.vue | 50 ++++++++--------- .../components/dropdown/DropdownCreate.vue | 16 +++--- frontend/components/dropdown/DropdownInfo.vue | 12 ++--- .../dropdown/DropdownItemsLayout.vue | 4 +- .../dropdown/DropdownUserOptions.vue | 32 +++++------ frontend/components/feed/Feed.vue | 8 +-- frontend/components/feed/FeedItem.vue | 4 +- frontend/components/grid/GridDocEntries.vue | 2 +- .../grid/GridGitHubContributors.vue | 10 ++-- frontend/components/header/HeaderAppPage.vue | 6 +-- frontend/components/image/ImageEvent.vue | 6 +-- .../components/image/ImageOrganization.vue | 4 +- .../components/landing/LandingContent.vue | 30 +++++------ frontend/components/menu/MenuItemLabel.vue | 4 +- .../components/menu/MenuSubPageSelector.vue | 4 +- .../menu/mobile/MenuMobileNavBar.vue | 10 ++-- .../mobile/MenuMobileNavigationDropdown.vue | 6 +-- .../menu/mobile/MenuMobileSelector.vue | 10 ++-- frontend/components/modal/ModalSharePage.vue | 16 +++--- .../modal/edit/about/ModalEditAboutEvent.vue | 6 +-- .../modal/edit/about/ModalEditAboutGroup.vue | 6 +-- .../edit/about/ModalEditAboutOrganization.vue | 8 +-- .../components/modal/image/ModalImage.vue | 6 +-- .../components/modal/image/ModalImageBtn.vue | 6 +-- .../components/modal/qr-code/ModalQRCode.vue | 10 ++-- frontend/components/page/PageBreadcrumbs.vue | 14 ++--- frontend/components/page/PageContent.vue | 8 +-- frontend/components/page/PageDocs.vue | 4 +- .../page/preview/PagePreviewAffiliates.vue | 2 +- .../page/preview/PagePreviewDiscussion.vue | 2 +- .../page/preview/PagePreviewHome.vue | 2 +- .../page/preview/PagePreviewSettings.vue | 2 +- .../page/preview/PagePreviewTasks.vue | 2 +- .../page/preview/PagePreviewTeam.vue | 2 +- .../sidebar/left/SidebarLeftIndex.vue | 6 +-- .../left/SidebarLeftMainSectionSelectors.vue | 10 ++-- .../sidebar/left/SidebarLeftSelector.vue | 8 +-- frontend/composables/useLinkURL.ts | 8 +-- frontend/composables/useMenuEntriesState.ts | 10 ++-- frontend/pages/about/activist.vue | 2 +- frontend/pages/about/imprint.vue | 2 +- frontend/pages/about/index.vue | 6 +-- frontend/pages/about/roadmap.vue | 2 +- frontend/pages/docs/get-active.vue | 4 +- frontend/pages/docs/get-organized.vue | 4 +- frontend/pages/docs/grow-organization.vue | 4 +- frontend/pages/docs/index.vue | 6 +-- frontend/pages/events/[id]/about.vue | 6 +-- frontend/pages/events/[id]/discussion.vue | 2 +- frontend/pages/events/[id]/index.vue | 10 ++-- frontend/pages/events/[id]/resources.vue | 2 +- frontend/pages/events/[id]/settings.vue | 2 +- frontend/pages/events/[id]/tasks.vue | 2 +- frontend/pages/events/[id]/team.vue | 2 +- frontend/pages/help/contact.vue | 2 +- frontend/pages/help/faq.vue | 2 +- frontend/pages/help/index.vue | 4 +- frontend/pages/index.vue | 20 +++---- frontend/pages/legal/index.vue | 4 +- frontend/pages/legal/privacy-policy.vue | 2 +- frontend/pages/legal/trademark-policy.vue | 2 +- frontend/pages/organizations/[id]/about.vue | 6 +-- .../pages/organizations/[id]/affiliates.vue | 2 +- .../organizations/[id]/discussions/index.vue | 2 +- frontend/pages/organizations/[id]/events.vue | 2 +- frontend/pages/organizations/[id]/faq.vue | 2 +- .../organizations/[id]/groups/[id]/about.vue | 4 +- .../organizations/[id]/groups/[id]/events.vue | 2 +- .../organizations/[id]/groups/[id]/faq.vue | 2 +- .../[id]/groups/[id]/resources.vue | 2 +- .../pages/organizations/[id]/groups/index.vue | 2 +- frontend/pages/organizations/[id]/index.vue | 10 ++-- .../pages/organizations/[id]/resources.vue | 2 +- .../pages/organizations/[id]/settings.vue | 2 +- frontend/pages/organizations/[id]/tasks.vue | 2 +- frontend/pages/organizations/[id]/team.vue | 2 +- frontend/pages/organizations/create.vue | 6 +-- frontend/pages/supporters/index.vue | 4 +- frontend/pages/supporters/join.vue | 2 +- frontend/stores/event.ts | 18 +++---- frontend/stores/group.ts | 8 +-- frontend/stores/organization.ts | 42 ++++++++------- frontend/tests/page-objects/BasePage.ts | 10 ++-- frontend/types/auth/user.d.ts | 16 +++--- frontend/types/content/discussion.d.ts | 6 +-- frontend/types/content/resource.d.ts | 12 ++--- frontend/types/docs-entry.ts | 2 +- frontend/types/entities/group.d.ts | 26 ++++----- frontend/types/entities/organization.d.ts | 36 ++++++------- frontend/types/events/event.d.ts | 42 +++++++-------- frontend/types/feed/feed-item.d.ts | 2 +- frontend/types/menu/menu-entry.ts | 4 +- frontend/types/menu/menu-selector.d.ts | 4 +- frontend/types/sub-page-selector.ts | 2 +- frontend/utils/groupSubPages.ts | 8 +-- frontend/utils/navMenuItems.ts | 12 ++--- 115 files changed, 464 insertions(+), 421 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2142b0e13..43a2b65ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -191,7 +191,7 @@ git remote add upstream https://github.com/activist-org/activist.git 4. Start your docker images with the following: ```bash - # --build only necessary with new dependencies or backend model changes + # --build only necessary with new dependencies or backend model changes. docker compose --env-file .env.dev up --build # And to stop the containers when you're done working: diff --git a/backend/authentication/serializers.py b/backend/authentication/serializers.py index 8c0b45f56..8b6930479 100644 --- a/backend/authentication/serializers.py +++ b/backend/authentication/serializers.py @@ -106,6 +106,10 @@ class Meta: # MARK: Methods +class DeleteUserResponseSerializer(serializers.Serializer): + message = serializers.CharField(max_length=200) + + class SignupSerializer(serializers.ModelSerializer[UserModel]): password_confirmed = serializers.CharField(write_only=True) diff --git a/backend/authentication/views.py b/backend/authentication/views.py index 32969b555..a0dbee6cc 100644 --- a/backend/authentication/views.py +++ b/backend/authentication/views.py @@ -26,6 +26,7 @@ UserTopic, ) from .serializers import ( + DeleteUserResponseSerializer, LoginSerializer, PasswordResetSerializer, SignupSerializer, @@ -239,6 +240,7 @@ def post(self, request: Request) -> Response: class DeleteUserView(APIView): queryset = UserModel.objects.all() permission_classes = (IsAuthenticated,) + serializer_class = DeleteUserResponseSerializer def delete(self, request: Request, pk: UUID | str) -> Response: user = UserModel.objects.get(pk=pk) diff --git a/backend/backend/settings.py b/backend/backend/settings.py index 94c45627a..90da29251 100644 --- a/backend/backend/settings.py +++ b/backend/backend/settings.py @@ -19,6 +19,7 @@ django_stubs_ext.monkeypatch(extra_classes=(viewsets.ModelViewSet,)) dotenv.load_dotenv() +# MARK: DB DATABASE_HOST = os.getenv("DATABASE_HOST") DATABASE_NAME = os.getenv("DATABASE_NAME") @@ -45,26 +46,29 @@ "DJANGO_CSRF_TRUSTED_ORIGINS", "http://localhost" ).split(" ") -# Application definition +# MARK: Apps INSTALLED_APPS = [ - "rest_framework", - "rest_framework.authtoken", + "corsheaders", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + "djangorestframework_camel_case", + "drf_spectacular", + "rest_framework", + "rest_framework.authtoken", "backend", "authentication", "entities", "content", "events", - "drf_spectacular", - "corsheaders", ] +# MARK: Middleware + MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", @@ -75,14 +79,19 @@ "django.middleware.clickjacking.XFrameOptionsMiddleware", "corsheaders.middleware.CorsMiddleware", "django.middleware.common.CommonMiddleware", + "djangorestframework_camel_case.middleware.CamelCaseMiddleWare", ] +# MARK: URLs + CORS_ALLOWED_ORIGINS = [ "http://localhost:3000", ] ROOT_URLCONF = "backend.urls" +# MARK: Templates + TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", @@ -100,7 +109,7 @@ ] -# Database +# MARK: Database # https://docs.djangoproject.com/en/4.2/ref/settings/#databases DATABASES = { @@ -115,7 +124,7 @@ } -# Password validation +# MARK: Pass Validation # https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ @@ -135,7 +144,7 @@ AUTH_USER_MODEL = "authentication.UserModel" -# Internationalization +# MARK: I18n # https://docs.djangoproject.com/en/4.2/topics/i18n/ LANGUAGE_CODE = "en-us" @@ -147,18 +156,18 @@ USE_TZ = True -# Static files (CSS, JavaScript, Images) +# MARK: Static Files # https://docs.djangoproject.com/en/4.2/howto/static-files/ STATIC_ROOT = BASE_DIR / "static/" STATIC_URL = "static/" -# Default primary key field type +# MARK: Primary Key # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" -# Email Settings +# MARK: Email # https://docs.djangoproject.com/en/5.0/topics/email/ EMAIL_HOST = os.getenv("EMAIL_HOST") @@ -169,6 +178,8 @@ # DEVELOPMENT ONLY EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" +# MARK: REST Framework + REST_FRAMEWORK = { "DEFAULT_THROTTLE_CLASSES": [ "rest_framework.throttling.AnonRateThrottle", @@ -183,19 +194,36 @@ "rest_framework.authentication.TokenAuthentication", ], "EXCEPTION_HANDLER": "backend.exception_handler.bad_request_logger", + "DEFAULT_RENDERER_CLASSES": ( + "djangorestframework_camel_case.render.CamelCaseJSONRenderer", + "djangorestframework_camel_case.render.CamelCaseBrowsableAPIRenderer", + ), + "DEFAULT_PARSER_CLASSES": ( + "djangorestframework_camel_case.parser.CamelCaseFormParser", + "djangorestframework_camel_case.parser.CamelCaseMultiPartParser", + "djangorestframework_camel_case.parser.CamelCaseJSONParser", + ), } +# MARK: Spectacular + SPECTACULAR_SETTINGS = { "TITLE": "activist.org API", - "DESCRIPTION": "Open-source, nonprofit activism platform", + "DESCRIPTION": "An open-source activism platform", "VERSION": "0.1.0", "SERVE_INCLUDE_SCHEMA": False, + "CAMELIZE_NAMES": False, + "POSTPROCESSING_HOOKS": [ + "drf_spectacular.hooks.postprocess_schema_enums", + "drf_spectacular.contrib.djangorestframework_camel_case.camelize_serializer_fields", + ], + "SWAGGER_UI_FAVICON_HREF": "https://github.com/activist-org/activist/blob/main/backend/static/swagger_favicon.png?raw=true", } # Workaround #471 / monkeypatch() is overriding the REST_FRAMEWORK dict. api_settings.reload() -# Logging Configuration +# MARK: Logging # https://docs.djangoproject.com/en/4.2/topics/logging/ LOGGING = { diff --git a/backend/entities/factories.py b/backend/entities/factories.py index 418645f72..9aa15fdbd 100644 --- a/backend/entities/factories.py +++ b/backend/entities/factories.py @@ -33,6 +33,7 @@ class Meta: name = factory.Faker("word") tagline = factory.Faker("word") social_links = ["https://www.instagram.com/activist_org/"] + get_involved_url = "https://activist.org/" created_by = factory.SubFactory("authentication.factories.UserFactory") terms_checked = factory.Faker("boolean") status = factory.SubFactory("entities.factories.StatusTypeFactory", name="Active") diff --git a/backend/entities/serializers.py b/backend/entities/serializers.py index bff553d89..9d482e56c 100644 --- a/backend/entities/serializers.py +++ b/backend/entities/serializers.py @@ -40,7 +40,7 @@ class Meta: class OrganizationTextSerializer(serializers.ModelSerializer[OrganizationText]): - orgID = serializers.StringRelatedField(source="org_id.id") + org_id = serializers.StringRelatedField(source="org_id.id") class Meta: model = OrganizationText diff --git a/backend/requirements-dev.in b/backend/requirements-dev.in index ded40e4a2..eae79888f 100644 --- a/backend/requirements-dev.in +++ b/backend/requirements-dev.in @@ -1,13 +1,13 @@ # In order to add, delete or modify a dependency, please update -# the reference here and then run: +# the reference here and then the following in ./backend: # -# - `pip-compile --rebuild requirements.in` -# - `pip-compile --rebuild requirements-dev.in` +# - pip-compile --rebuild requirements.in +# - pip-compile --rebuild requirements-dev.in # # Make sure we use production deps for constraining installed dev packages. This # is important as otherwise we could be running tests with different versions # than production. -# + -r requirements.txt factory-boy diff --git a/backend/requirements-dev.txt b/backend/requirements-dev.txt index f4b84e324..b6d74f671 100644 --- a/backend/requirements-dev.txt +++ b/backend/requirements-dev.txt @@ -53,6 +53,8 @@ djangorestframework==3.15.2 # via # -r requirements.txt # drf-spectacular +djangorestframework-camel-case==1.4.2 + # via -r requirements.txt djangorestframework-stubs==3.14.4 # via -r requirements.txt drf-spectacular==0.26.5 diff --git a/backend/requirements.in b/backend/requirements.in index 21db9d92b..b9e0e8e27 100644 --- a/backend/requirements.in +++ b/backend/requirements.in @@ -1,15 +1,15 @@ # In order to add, delete or modify a dependency, please update -# the reference here and then run: -# -# - `pip-compile --rebuild requirements.in` -# - `pip-compile --rebuild requirements-dev.in` +# the reference here and then run the following in ./backend: # +# - pip-compile --rebuild requirements.in +# - pip-compile --rebuild requirements-dev.in Django django-cors-headers django-stubs django-stubs-ext djangorestframework +djangorestframework-camel-case djangorestframework-stubs drf-spectacular gunicorn diff --git a/backend/requirements.txt b/backend/requirements.txt index d156f5ed7..8f85ff399 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -36,6 +36,8 @@ djangorestframework==3.15.2 # via # -r requirements.in # drf-spectacular +djangorestframework-camel-case==1.4.2 + # via -r requirements.in djangorestframework-stubs==3.14.4 # via -r requirements.in drf-spectacular==0.26.5 diff --git a/frontend/components/EmptyState.vue b/frontend/components/EmptyState.vue index f975a8e53..bf54adc44 100644 --- a/frontend/components/EmptyState.vue +++ b/frontend/components/EmptyState.vue @@ -3,7 +3,7 @@ class="flex w-full flex-col items-center bg-light-layer-0 text-light-text dark:bg-dark-layer-0 dark:text-dark-text" >
diff --git a/frontend/components/card/CardConnect.vue b/frontend/components/card/CardConnect.vue index 89649d9dc..35f886d0b 100644 --- a/frontend/components/card/CardConnect.vue +++ b/frontend/components/card/CardConnect.vue @@ -120,11 +120,11 @@ const props = defineProps<{ }>(); const { userIsSignedIn } = useUser(); -const paramsID = useRoute().params.id; -const paramsIDGroup = useRoute().params.groupID; +const paramsId = useRoute().params.id; +const paramsIdGroup = useRoute().params.groupId; -const id = typeof paramsID === "string" ? paramsID : undefined; -const idGroup = typeof paramsIDGroup === "string" ? paramsIDGroup : undefined; +const id = typeof paramsId === "string" ? paramsId : undefined; +const idGroup = typeof paramsIdGroup === "string" ? paramsIdGroup : undefined; const organizationStore = useOrganizationStore(); const groupStore = useGroupStore(); @@ -135,13 +135,13 @@ let group: Group; let event: Event; if (props.pageType == "organization") { - await organizationStore.fetchByID(id); + await organizationStore.fetchById(id); organization = organizationStore.organization; } else if (props.pageType == "group") { - await groupStore.fetchByID(idGroup); + await groupStore.fetchById(idGroup); group = groupStore.group; } else if (props.pageType == "event") { - await eventStore.fetchByID(id); + await eventStore.fetchById(id); event = eventStore.event; } diff --git a/frontend/components/card/CardDocsEntry.vue b/frontend/components/card/CardDocsEntry.vue index 45e4b581c..c54f483ee 100644 --- a/frontend/components/card/CardDocsEntry.vue +++ b/frontend/components/card/CardDocsEntry.vue @@ -10,13 +10,13 @@
@@ -34,7 +34,7 @@ const localPath = useLocalePath(); defineProps<{ url: string; - imgURL: string; + imgUrl: string; imgDimensions: string; imgAltText: string; title: string; diff --git a/frontend/components/card/CardOrgApplicationVote.vue b/frontend/components/card/CardOrgApplicationVote.vue index fcae4242d..3e447e23e 100644 --- a/frontend/components/card/CardOrgApplicationVote.vue +++ b/frontend/components/card/CardOrgApplicationVote.vue @@ -7,7 +7,7 @@ class="mr-5 fill-light-text dark:fill-dark-text" > @@ -16,7 +16,7 @@ class="rounded border border-light-section-div dark:border-dark-section-div" >
@@ -49,7 +49,7 @@

-
+

{{ organization.getInvolved }}

@@ -90,7 +90,7 @@ const idParam = useRoute().params.id; const id = typeof idParam === "string" ? idParam : undefined; const organizationStore = useOrganizationStore(); -await organizationStore.fetchByID(id); +await organizationStore.fetchById(id); const { organization } = organizationStore; diff --git a/frontend/components/card/search-result/CardSearchResult.vue b/frontend/components/card/search-result/CardSearchResult.vue index 6b35c6bad..38c34e29b 100644 --- a/frontend/components/card/search-result/CardSearchResult.vue +++ b/frontend/components/card/search-result/CardSearchResult.vue @@ -6,7 +6,7 @@
@@ -111,7 +111,7 @@

@@ -120,7 +120,7 @@ >

@@ -205,8 +205,8 @@

-->
-

@{{ organization.org_name }}

-

@{{ group.group_name }}

+

@{{ organization.orgName }}

+

@{{ group.groupName }}

diff --git a/frontend/components/image/ImageOrganization.vue b/frontend/components/image/ImageOrganization.vue index ca67b34ce..51884825f 100644 --- a/frontend/components/image/ImageOrganization.vue +++ b/frontend/components/image/ImageOrganization.vue @@ -2,7 +2,7 @@

- +
(); diff --git a/frontend/components/landing/LandingContent.vue b/frontend/components/landing/LandingContent.vue index e7e5243e0..ec8eb728c 100644 --- a/frontend/components/landing/LandingContent.vue +++ b/frontend/components/landing/LandingContent.vue @@ -10,13 +10,13 @@

@@ -47,12 +47,12 @@ @@ -65,12 +65,12 @@ @@ -81,13 +81,13 @@

@@ -141,7 +141,7 @@ class="w-full" :cta="true" :label="`${btnText1}`" - :linkTo="`${btnURL1}`" + :linkTo="`${btnUrl1}`" fontSize="xl" :ariaLabel="btnAriaLabel1 ? btnAriaLabel1 : ''" /> @@ -150,7 +150,7 @@ class="w-full" :cta="false" :label="`${btnText2}`" - :linkTo="`${btnURL2}`" + :linkTo="`${btnUrl2}`" fontSize="xl" :ariaLabel="btnAriaLabel2 ? btnAriaLabel2 : ''" /> @@ -174,15 +174,15 @@ defineProps<{ header: string; tagline: string; text: string; - imageURL?: string; + imgUrl?: string; imageAltText: string; btnText1: string; - btnURL1: string; + btnUrl1: string; btnAriaLabel1?: string; btnId1?: string; btnId2?: string; btnText2?: string; - btnURL2?: string; + btnUrl2?: string; btnAriaLabel2?: string; subText?: string; }>(); diff --git a/frontend/components/menu/MenuItemLabel.vue b/frontend/components/menu/MenuItemLabel.vue index 3d8570f23..fe32fa0aa 100644 --- a/frontend/components/menu/MenuItemLabel.vue +++ b/frontend/components/menu/MenuItemLabel.vue @@ -1,7 +1,7 @@ diff --git a/frontend/components/menu/mobile/MenuMobileNavigationDropdown.vue b/frontend/components/menu/mobile/MenuMobileNavigationDropdown.vue index 6eca14fb9..fc5f31e98 100644 --- a/frontend/components/menu/mobile/MenuMobileNavigationDropdown.vue +++ b/frontend/components/menu/mobile/MenuMobileNavigationDropdown.vue @@ -8,7 +8,7 @@ class="elem-shadow-sm focus-brand relative flex w-full items-center fill-light-layer-1 py-2 pl-5 text-left align-middle text-light-layer-1 dark:fill-dark-layer-1 dark:text-dark-layer-1" >

-
diff --git a/frontend/pages/events/[id]/team.vue b/frontend/pages/events/[id]/team.vue index 57116b554..9149f7474 100644 --- a/frontend/pages/events/[id]/team.vue +++ b/frontend/pages/events/[id]/team.vue @@ -25,7 +25,6 @@ />
-
diff --git a/frontend/pages/organizations/[id]/team.vue b/frontend/pages/organizations/[id]/team.vue index 84723ba2b..ae4312423 100644 --- a/frontend/pages/organizations/[id]/team.vue +++ b/frontend/pages/organizations/[id]/team.vue @@ -28,7 +28,6 @@
- -

- {{ $t("pages.supporters.showcase.section_2_2_thanks") }} -

-

- {{ $t("pages.supporters.showcase.section_3_subheader") }} -

-

- {{ $t("pages.supporters.showcase.section_3_paragraph_1_1") }} - - {{ $t("pages.supporters.showcase.section_3_paragraph_1_2") }} - - - . {{ $t("pages.supporters.showcase.section_3_paragraph_1_3") }} -

-
- -
- - - -
-
- - - From b3a5f146036a6ef6ce47d5c32770fb7dd73f721a Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Fri, 8 Nov 2024 01:38:32 +0100 Subject: [PATCH 24/40] Fix link for support us in website header --- frontend/components/header/HeaderWebsite.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/components/header/HeaderWebsite.vue b/frontend/components/header/HeaderWebsite.vue index 938ac4156..c0c9742e9 100644 --- a/frontend/components/header/HeaderWebsite.vue +++ b/frontend/components/header/HeaderWebsite.vue @@ -113,7 +113,7 @@ class="block" :cta="true" label="_global.support" - linkTo="https://docs.activist.org/activist/~/changes/qZu0F6L0cHK5FDtvelqa/welcome/support-us" + linkTo="https://docs.activist.org/activist/welcome/support-us" fontSize="sm" ariaLabel="components.header_website.support_aria_label" /> @@ -123,7 +123,7 @@ class="block" :cta="true" label="_global.support" - linkTo="https://docs.activist.org/activist/~/changes/qZu0F6L0cHK5FDtvelqa/welcome/support-us" + linkTo="https://docs.activist.org/activist/welcome/support-us" fontSize="xs" ariaLabel="components.header_website.support_aria_label" /> From 347abef2884e39b18b4eb68386b3051b44108379 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Fri, 8 Nov 2024 01:44:13 +0100 Subject: [PATCH 25/40] Make support button in website header internal --- frontend/components/header/HeaderWebsite.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/components/header/HeaderWebsite.vue b/frontend/components/header/HeaderWebsite.vue index c0c9742e9..8a0405c02 100644 --- a/frontend/components/header/HeaderWebsite.vue +++ b/frontend/components/header/HeaderWebsite.vue @@ -107,7 +107,7 @@ fontSize="xs" ariaLabel="_global.sign_up_aria_label" /> - - Date: Fri, 8 Nov 2024 02:04:01 +0100 Subject: [PATCH 26/40] Update request access URL to hosted version --- frontend/tests/page-objects/BasePage.ts | 4 ++-- frontend/utils/baseURLs.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/tests/page-objects/BasePage.ts b/frontend/tests/page-objects/BasePage.ts index d4170dd23..b7ac6d983 100644 --- a/frontend/tests/page-objects/BasePage.ts +++ b/frontend/tests/page-objects/BasePage.ts @@ -1,4 +1,4 @@ -import type { Page, Locator } from "@playwright/test"; +import type { Locator, Page } from "@playwright/test"; import { isMobile } from "../utils/utils"; export default abstract class BasePage { protected readonly pageName: string; @@ -14,7 +14,7 @@ export default abstract class BasePage { public static readonly urls = { REQUEST_ACCESS_URL: - "https://app.formbricks.com/s/clvn9ywe21css8wqpt1hee57a", + "https://forms.activist.org/s/cm30ujrcj0003107fqc75yke8", }; public get getPage(): Page { diff --git a/frontend/utils/baseURLs.ts b/frontend/utils/baseURLs.ts index bb523e7af..45af6d7ff 100644 --- a/frontend/utils/baseURLs.ts +++ b/frontend/utils/baseURLs.ts @@ -4,4 +4,4 @@ export const BASE_FRONTEND_URL = import.meta.env.VITE_FRONTEND_URL; export const BASE_BACKEND_URL = import.meta.env.VITE_API_URL; export const REQUEST_ACCESS_URL = - "https://app.formbricks.com/s/clvn9ywe21css8wqpt1hee57a"; + "https://forms.activist.org/s/cm30ujrcj0003107fqc75yke8"; From 10162bb1fed62f7f51649a948e5f821614a9fb30 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Fri, 8 Nov 2024 19:44:34 +0100 Subject: [PATCH 27/40] Add missing type parameters for models and serializers --- backend/authentication/serializers.py | 2 +- backend/entities/admin.py | 8 ++++---- backend/entities/serializers.py | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/authentication/serializers.py b/backend/authentication/serializers.py index 8b6930479..44387cc6a 100644 --- a/backend/authentication/serializers.py +++ b/backend/authentication/serializers.py @@ -106,7 +106,7 @@ class Meta: # MARK: Methods -class DeleteUserResponseSerializer(serializers.Serializer): +class DeleteUserResponseSerializer(serializers.Serializer[UserModel]): message = serializers.CharField(max_length=200) diff --git a/backend/entities/admin.py b/backend/entities/admin.py index eb615f76d..b89219522 100644 --- a/backend/entities/admin.py +++ b/backend/entities/admin.py @@ -43,19 +43,19 @@ # MARK: Methods -class GroupAdmin(admin.ModelAdmin): +class GroupAdmin(admin.ModelAdmin[Group]): list_display = ["group_name", "name"] -class GroupTextAdmin(admin.ModelAdmin): +class GroupTextAdmin(admin.ModelAdmin[GroupText]): list_display = ["id", "group_id"] -class OrganizationAdmin(admin.ModelAdmin): +class OrganizationAdmin(admin.ModelAdmin[Organization]): list_display = ["org_name", "name"] -class OrganizationTextAdmin(admin.ModelAdmin): +class OrganizationTextAdmin(admin.ModelAdmin[OrganizationText]): list_display = ["id", "org_id"] diff --git a/backend/entities/serializers.py b/backend/entities/serializers.py index 9d482e56c..418ccb27a 100644 --- a/backend/entities/serializers.py +++ b/backend/entities/serializers.py @@ -40,7 +40,8 @@ class Meta: class OrganizationTextSerializer(serializers.ModelSerializer[OrganizationText]): - org_id = serializers.StringRelatedField(source="org_id.id") + # mypy thinks a generic type argument is needed for StringRelatedField. + org_id = serializers.StringRelatedField(source="org_id.id") # type: ignore[var-annotated] class Meta: model = OrganizationText From 48f9e5ed4b0cd25a5e43ef9a46ca8391cc6bdee8 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Wed, 13 Nov 2024 19:33:11 +0100 Subject: [PATCH 28/40] Fix backend camelCase conversion + remvoe conflicting files --- .pre-commit-config.yaml | 14 +- backend/backend/settings.py | 17 +- frontend/assets/css/dark.css | 23 +++ frontend/assets/css/light.css | 23 +++ frontend/components/card/CardDocsEntry.vue | 43 ------ frontend/components/grid/GridDocEntries.vue | 24 --- .../grid/GridGitHubContributors.vue | 112 -------------- .../page/preview/PagePreviewAffiliates.vue | 3 - .../page/preview/PagePreviewDiscussion.vue | 3 - .../page/preview/PagePreviewHome.vue | 3 - .../page/preview/PagePreviewSettings.vue | 3 - .../page/preview/PagePreviewTasks.vue | 3 - .../page/preview/PagePreviewTeam.vue | 3 - frontend/pages/about/activist.vue | 76 --------- frontend/pages/about/imprint.vue | 72 --------- frontend/pages/about/index.vue | 62 -------- frontend/pages/about/network.vue | 9 -- frontend/pages/about/roadmap.vue | 128 --------------- frontend/pages/{help => }/contact.vue | 0 frontend/pages/docs/get-active.vue | 146 ------------------ frontend/pages/docs/get-organized.vue | 119 -------------- frontend/pages/docs/grow-organization.vue | 126 --------------- frontend/pages/docs/index.vue | 62 -------- frontend/pages/help/faq.vue | 90 ----------- frontend/pages/help/index.vue | 53 ------- frontend/pages/help/press.vue | 10 -- frontend/pages/help/status.vue | 12 -- frontend/pages/legal/index.vue | 53 ------- frontend/pages/legal/privacy-policy.vue | 80 ---------- frontend/pages/legal/support.vue | 12 -- frontend/pages/legal/trademark-policy.vue | 109 ------------- 31 files changed, 64 insertions(+), 1429 deletions(-) create mode 100644 frontend/assets/css/dark.css create mode 100644 frontend/assets/css/light.css delete mode 100644 frontend/components/card/CardDocsEntry.vue delete mode 100644 frontend/components/grid/GridDocEntries.vue delete mode 100644 frontend/components/grid/GridGitHubContributors.vue delete mode 100644 frontend/components/page/preview/PagePreviewAffiliates.vue delete mode 100644 frontend/components/page/preview/PagePreviewDiscussion.vue delete mode 100644 frontend/components/page/preview/PagePreviewHome.vue delete mode 100644 frontend/components/page/preview/PagePreviewSettings.vue delete mode 100644 frontend/components/page/preview/PagePreviewTasks.vue delete mode 100644 frontend/components/page/preview/PagePreviewTeam.vue delete mode 100644 frontend/pages/about/activist.vue delete mode 100644 frontend/pages/about/imprint.vue delete mode 100644 frontend/pages/about/index.vue delete mode 100644 frontend/pages/about/network.vue delete mode 100644 frontend/pages/about/roadmap.vue rename frontend/pages/{help => }/contact.vue (100%) delete mode 100644 frontend/pages/docs/get-active.vue delete mode 100644 frontend/pages/docs/get-organized.vue delete mode 100644 frontend/pages/docs/grow-organization.vue delete mode 100644 frontend/pages/docs/index.vue delete mode 100644 frontend/pages/help/faq.vue delete mode 100644 frontend/pages/help/index.vue delete mode 100644 frontend/pages/help/press.vue delete mode 100644 frontend/pages/help/status.vue delete mode 100644 frontend/pages/legal/index.vue delete mode 100644 frontend/pages/legal/privacy-policy.vue delete mode 100644 frontend/pages/legal/support.vue delete mode 100644 frontend/pages/legal/trademark-policy.vue diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba4361b80..564ac29e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,13 +15,13 @@ repos: args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - - repo: local - hooks: - - id: run-i18n-checks - name: Run i18n Checks - entry: python frontend/i18n/check/run_i18n_checks.py - language: python - stages: [pre-commit] + # - repo: local + # hooks: + # - id: run-i18n-checks + # name: Run i18n Checks + # entry: python frontend/i18n/check/run_i18n_checks.py + # language: python + # stages: [pre-commit] # - repo: https://github.com/pre-commit/mirrors-prettier # rev: "v4.0.0-alpha.8" diff --git a/backend/backend/settings.py b/backend/backend/settings.py index 90da29251..7faf23317 100644 --- a/backend/backend/settings.py +++ b/backend/backend/settings.py @@ -13,10 +13,7 @@ import django_stubs_ext import dotenv -from rest_framework import viewsets -from rest_framework.settings import api_settings -django_stubs_ext.monkeypatch(extra_classes=(viewsets.ModelViewSet,)) dotenv.load_dotenv() # MARK: DB @@ -220,9 +217,6 @@ "SWAGGER_UI_FAVICON_HREF": "https://github.com/activist-org/activist/blob/main/backend/static/swagger_favicon.png?raw=true", } -# Workaround #471 / monkeypatch() is overriding the REST_FRAMEWORK dict. -api_settings.reload() - # MARK: Logging # https://docs.djangoproject.com/en/4.2/topics/logging/ @@ -253,3 +247,14 @@ }, }, } + +# MARK: API Settings + +from rest_framework import viewsets # noqa: E402 + +django_stubs_ext.monkeypatch(extra_classes=(viewsets.ModelViewSet,)) + +from rest_framework.settings import api_settings # noqa: E402 + +# Workaround #471 / monkeypatch() is overriding the REST_FRAMEWORK dict. +api_settings.reload() diff --git a/frontend/assets/css/dark.css b/frontend/assets/css/dark.css new file mode 100644 index 000000000..6f37a1464 --- /dev/null +++ b/frontend/assets/css/dark.css @@ -0,0 +1,23 @@ +dark: { + "layer-0": 6, 8, 15, 1, + "layer-1": 19, 19, 22, 1, + "layer-2": 22, 27, 34, 1, + "section-div": 43, 50, 59, 1, + "primary-text": 255, 255, 255, 0.8, + "primary-text-over-layer-2": 208, 209, 211, 1, + "distinct-text": 150, 150, 150, 0.85, + "distinct-text-over-layer-2": 131, 132, 133, 1, + "link-text": 86, 167, 252, 0.9, + "link-text-hover": 134, 192, 253, 0.9, + "menu-selection": 200, 200, 200, 1, + interactive: 133, 126, 123, 1, + "highlight": { + DEFAULT: 70, 70, 70, 0.25, + lighter: 120, 120, 120, 0.50, + }, + "cta-orange": 241, 156, 65, 1, + "action-red": 238, 90, 88, 1, + "learn-blue": 62, 146, 204, 1, + "accepted-green": 97, 139, 37, 1, + "warn-yellow": 255, 209, 102, 1, +} diff --git a/frontend/assets/css/light.css b/frontend/assets/css/light.css new file mode 100644 index 000000000..c072806a8 --- /dev/null +++ b/frontend/assets/css/light.css @@ -0,0 +1,23 @@ +light: { + "layer-0": 255, 255, 255, 1, + "layer-1": 246, 248, 250, 1, + "layer-2": 240, 240, 235, 1, + "section-div": 216, 222, 228, 1, + "primary-text": 0, 0, 0, 0.85, + "primary-text-over-layer-2": 36, 36, 35, 1, + "distinct-text": 90, 90, 90, 0.9, + "distinct-text-over-layer-2": 105, 105, 105, 1, + "link-text": 0, 92, 184, 0.9, + "link-text-hover": 0, 59, 119, 0.9, + "menu-selection": 50, 50, 50, 1, + interactive: 75, 75, 67, 1, + "highlight": { + DEFAULT: 140, 140, 140, 0.20, + darker: 120, 120, 120, 0.30, + }, + "cta-orange": 242, 166, 84, 1, + "action-red": 186, 61, 59, 1, + "learn-blue": 33, 118, 174, 1, + "accepted-green": 62, 137, 20, 1, + "warn-yellow": 255, 191, 0, 1, +} diff --git a/frontend/components/card/CardDocsEntry.vue b/frontend/components/card/CardDocsEntry.vue deleted file mode 100644 index c54f483ee..000000000 --- a/frontend/components/card/CardDocsEntry.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/frontend/components/grid/GridDocEntries.vue b/frontend/components/grid/GridDocEntries.vue deleted file mode 100644 index f8ed28407..000000000 --- a/frontend/components/grid/GridDocEntries.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/frontend/components/grid/GridGitHubContributors.vue b/frontend/components/grid/GridGitHubContributors.vue deleted file mode 100644 index f381e57c9..000000000 --- a/frontend/components/grid/GridGitHubContributors.vue +++ /dev/null @@ -1,112 +0,0 @@ - - - diff --git a/frontend/components/page/preview/PagePreviewAffiliates.vue b/frontend/components/page/preview/PagePreviewAffiliates.vue deleted file mode 100644 index 595de0e11..000000000 --- a/frontend/components/page/preview/PagePreviewAffiliates.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/frontend/components/page/preview/PagePreviewDiscussion.vue b/frontend/components/page/preview/PagePreviewDiscussion.vue deleted file mode 100644 index 595de0e11..000000000 --- a/frontend/components/page/preview/PagePreviewDiscussion.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/frontend/components/page/preview/PagePreviewHome.vue b/frontend/components/page/preview/PagePreviewHome.vue deleted file mode 100644 index 595de0e11..000000000 --- a/frontend/components/page/preview/PagePreviewHome.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/frontend/components/page/preview/PagePreviewSettings.vue b/frontend/components/page/preview/PagePreviewSettings.vue deleted file mode 100644 index 595de0e11..000000000 --- a/frontend/components/page/preview/PagePreviewSettings.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/frontend/components/page/preview/PagePreviewTasks.vue b/frontend/components/page/preview/PagePreviewTasks.vue deleted file mode 100644 index 595de0e11..000000000 --- a/frontend/components/page/preview/PagePreviewTasks.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/frontend/components/page/preview/PagePreviewTeam.vue b/frontend/components/page/preview/PagePreviewTeam.vue deleted file mode 100644 index 595de0e11..000000000 --- a/frontend/components/page/preview/PagePreviewTeam.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/frontend/pages/about/activist.vue b/frontend/pages/about/activist.vue deleted file mode 100644 index 771e4d658..000000000 --- a/frontend/pages/about/activist.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - diff --git a/frontend/pages/about/imprint.vue b/frontend/pages/about/imprint.vue deleted file mode 100644 index fb1a9cb6c..000000000 --- a/frontend/pages/about/imprint.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - diff --git a/frontend/pages/about/index.vue b/frontend/pages/about/index.vue deleted file mode 100644 index 16e107dad..000000000 --- a/frontend/pages/about/index.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - diff --git a/frontend/pages/about/network.vue b/frontend/pages/about/network.vue deleted file mode 100644 index d9d8c9903..000000000 --- a/frontend/pages/about/network.vue +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/frontend/pages/about/roadmap.vue b/frontend/pages/about/roadmap.vue deleted file mode 100644 index d78bec300..000000000 --- a/frontend/pages/about/roadmap.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - diff --git a/frontend/pages/help/contact.vue b/frontend/pages/contact.vue similarity index 100% rename from frontend/pages/help/contact.vue rename to frontend/pages/contact.vue diff --git a/frontend/pages/docs/get-active.vue b/frontend/pages/docs/get-active.vue deleted file mode 100644 index a179be460..000000000 --- a/frontend/pages/docs/get-active.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - diff --git a/frontend/pages/docs/get-organized.vue b/frontend/pages/docs/get-organized.vue deleted file mode 100644 index 5af81ac6c..000000000 --- a/frontend/pages/docs/get-organized.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - diff --git a/frontend/pages/docs/grow-organization.vue b/frontend/pages/docs/grow-organization.vue deleted file mode 100644 index 45a48db6a..000000000 --- a/frontend/pages/docs/grow-organization.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - diff --git a/frontend/pages/docs/index.vue b/frontend/pages/docs/index.vue deleted file mode 100644 index 0538260b9..000000000 --- a/frontend/pages/docs/index.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - diff --git a/frontend/pages/help/faq.vue b/frontend/pages/help/faq.vue deleted file mode 100644 index 5bb5bb553..000000000 --- a/frontend/pages/help/faq.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - diff --git a/frontend/pages/help/index.vue b/frontend/pages/help/index.vue deleted file mode 100644 index fb72f027a..000000000 --- a/frontend/pages/help/index.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/frontend/pages/help/press.vue b/frontend/pages/help/press.vue deleted file mode 100644 index dc17e11d0..000000000 --- a/frontend/pages/help/press.vue +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/frontend/pages/help/status.vue b/frontend/pages/help/status.vue deleted file mode 100644 index 6496fd5b6..000000000 --- a/frontend/pages/help/status.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/frontend/pages/legal/index.vue b/frontend/pages/legal/index.vue deleted file mode 100644 index d0e83a87c..000000000 --- a/frontend/pages/legal/index.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/frontend/pages/legal/privacy-policy.vue b/frontend/pages/legal/privacy-policy.vue deleted file mode 100644 index db7798b1e..000000000 --- a/frontend/pages/legal/privacy-policy.vue +++ /dev/null @@ -1,80 +0,0 @@ - diff --git a/frontend/pages/legal/support.vue b/frontend/pages/legal/support.vue deleted file mode 100644 index d1019f5b5..000000000 --- a/frontend/pages/legal/support.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/frontend/pages/legal/trademark-policy.vue b/frontend/pages/legal/trademark-policy.vue deleted file mode 100644 index 044da7bd1..000000000 --- a/frontend/pages/legal/trademark-policy.vue +++ /dev/null @@ -1,109 +0,0 @@ - From 4556b4adea7bbe62b31edbb770aa9df63621e88f Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Wed, 13 Nov 2024 19:34:20 +0100 Subject: [PATCH 29/40] Remove supporters in work to remove conflicting files --- frontend/pages/supporters/index.vue | 53 -------------- frontend/pages/supporters/join.vue | 96 ------------------------- frontend/pages/supporters/showcase.vue | 99 -------------------------- 3 files changed, 248 deletions(-) delete mode 100644 frontend/pages/supporters/index.vue delete mode 100644 frontend/pages/supporters/join.vue delete mode 100644 frontend/pages/supporters/showcase.vue diff --git a/frontend/pages/supporters/index.vue b/frontend/pages/supporters/index.vue deleted file mode 100644 index 146807fd6..000000000 --- a/frontend/pages/supporters/index.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/frontend/pages/supporters/join.vue b/frontend/pages/supporters/join.vue deleted file mode 100644 index 704924c9f..000000000 --- a/frontend/pages/supporters/join.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - diff --git a/frontend/pages/supporters/showcase.vue b/frontend/pages/supporters/showcase.vue deleted file mode 100644 index 826b6c74c..000000000 --- a/frontend/pages/supporters/showcase.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - From c6cf2d782b326e8ddd46e727c1d7b562f81a1374 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Wed, 13 Nov 2024 19:52:00 +0100 Subject: [PATCH 30/40] Update formatting of new CSS color files --- frontend/assets/css/dark.css | 6 ++---- frontend/assets/css/light.css | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/frontend/assets/css/dark.css b/frontend/assets/css/dark.css index 6f37a1464..ed5413b83 100644 --- a/frontend/assets/css/dark.css +++ b/frontend/assets/css/dark.css @@ -11,10 +11,8 @@ dark: { "link-text-hover": 134, 192, 253, 0.9, "menu-selection": 200, 200, 200, 1, interactive: 133, 126, 123, 1, - "highlight": { - DEFAULT: 70, 70, 70, 0.25, - lighter: 120, 120, 120, 0.50, - }, + "highlight": 70, 70, 70, 0.25, + "highlight-lighter": 120, 120, 120, 0.50, "cta-orange": 241, 156, 65, 1, "action-red": 238, 90, 88, 1, "learn-blue": 62, 146, 204, 1, diff --git a/frontend/assets/css/light.css b/frontend/assets/css/light.css index c072806a8..32b673193 100644 --- a/frontend/assets/css/light.css +++ b/frontend/assets/css/light.css @@ -11,10 +11,8 @@ light: { "link-text-hover": 0, 59, 119, 0.9, "menu-selection": 50, 50, 50, 1, interactive: 75, 75, 67, 1, - "highlight": { - DEFAULT: 140, 140, 140, 0.20, - darker: 120, 120, 120, 0.30, - }, + "highlight": 140, 140, 140, 0.20, + "highlight-lighter": 120, 120, 120, 0.30, "cta-orange": 242, 166, 84, 1, "action-red": 186, 61, 59, 1, "learn-blue": 33, 118, 174, 1, From 2d6eab577a0e829c88fd90b3caa728a76ec7b079 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Wed, 13 Nov 2024 20:01:59 +0100 Subject: [PATCH 31/40] Update formatting of new CSS files to use RGBA --- frontend/assets/css/dark.css | 38 +++++++++++++++++------------------ frontend/assets/css/light.css | 38 +++++++++++++++++------------------ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/frontend/assets/css/dark.css b/frontend/assets/css/dark.css index ed5413b83..e91f19ad7 100644 --- a/frontend/assets/css/dark.css +++ b/frontend/assets/css/dark.css @@ -1,21 +1,21 @@ dark: { - "layer-0": 6, 8, 15, 1, - "layer-1": 19, 19, 22, 1, - "layer-2": 22, 27, 34, 1, - "section-div": 43, 50, 59, 1, - "primary-text": 255, 255, 255, 0.8, - "primary-text-over-layer-2": 208, 209, 211, 1, - "distinct-text": 150, 150, 150, 0.85, - "distinct-text-over-layer-2": 131, 132, 133, 1, - "link-text": 86, 167, 252, 0.9, - "link-text-hover": 134, 192, 253, 0.9, - "menu-selection": 200, 200, 200, 1, - interactive: 133, 126, 123, 1, - "highlight": 70, 70, 70, 0.25, - "highlight-lighter": 120, 120, 120, 0.50, - "cta-orange": 241, 156, 65, 1, - "action-red": 238, 90, 88, 1, - "learn-blue": 62, 146, 204, 1, - "accepted-green": 97, 139, 37, 1, - "warn-yellow": 255, 209, 102, 1, + "layer-0":rgba(6, 8, 15, 1); + "layer-1":rgba(19, 19, 22, 1); + "layer-2":rgba(22, 27, 34, 1); + "section-div":rgba(43, 50, 59, 1); + "primary-text":rgba(255, 255, 255, 0.8); + "primary-text-over-layer-2":rgba(208, 209, 211, 1); + "distinct-text":rgba(150, 150, 150, 0.85); + "distinct-text-over-layer-2":rgba(131, 132, 133, 1); + "link-text":rgba(86, 167, 252, 0.9); + "link-text-hover":rgba(134, 192, 253, 0.9); + "menu-selection":rgba(200, 200, 200, 1); + interactive: rgba(133, 126, 123, 1); + "highlight":rgba(70, 70, 70, 0.25); + "highlight-lighter":rgba(120, 120, 120, 0.50); + "cta-orange":rgba(241, 156, 65, 1); + "action-red":rgba(238, 90, 88, 1); + "learn-blue":rgba(62, 146, 204, 1); + "accepted-green":rgba(97, 139, 37, 1); + "warn-yellow":rgba(255, 209, 102, 1); } diff --git a/frontend/assets/css/light.css b/frontend/assets/css/light.css index 32b673193..61000fc5d 100644 --- a/frontend/assets/css/light.css +++ b/frontend/assets/css/light.css @@ -1,21 +1,21 @@ light: { - "layer-0": 255, 255, 255, 1, - "layer-1": 246, 248, 250, 1, - "layer-2": 240, 240, 235, 1, - "section-div": 216, 222, 228, 1, - "primary-text": 0, 0, 0, 0.85, - "primary-text-over-layer-2": 36, 36, 35, 1, - "distinct-text": 90, 90, 90, 0.9, - "distinct-text-over-layer-2": 105, 105, 105, 1, - "link-text": 0, 92, 184, 0.9, - "link-text-hover": 0, 59, 119, 0.9, - "menu-selection": 50, 50, 50, 1, - interactive: 75, 75, 67, 1, - "highlight": 140, 140, 140, 0.20, - "highlight-lighter": 120, 120, 120, 0.30, - "cta-orange": 242, 166, 84, 1, - "action-red": 186, 61, 59, 1, - "learn-blue": 33, 118, 174, 1, - "accepted-green": 62, 137, 20, 1, - "warn-yellow": 255, 191, 0, 1, + "layer-0":rgba(255, 255, 255, 1); + "layer-1":rgba(246, 248, 250, 1); + "layer-2":rgba(240, 240, 235, 1); + "section-div":rgba(216, 222, 228, 1); + "primary-text":rgba(0, 0, 0, 0.85); + "primary-text-over-layer-2":rgba(36, 36, 35, 1); + "distinct-text":rgba(90, 90, 90, 0.9); + "distinct-text-over-layer-2":rgba(105, 105, 105, 1); + "link-text":rgba(0, 92, 184, 0.9); + "link-text-hover":rgba(0, 59, 119, 0.9); + "menu-selection":rgba(50, 50, 50, 1); + interactive: rgba(75, 75, 67, 1); + "highlight":rgba(140, 140, 140, 0.20); + "highlight-lighter":rgba(120, 120, 120, 0.30); + "cta-orange":rgba(242, 166, 84, 1); + "action-red":rgba(186, 61, 59, 1); + "learn-blue":rgba(33, 118, 174, 1); + "accepted-green":rgba(62, 137, 20, 1); + "warn-yellow":rgba(255, 191, 0, 1); } From dcd9e1d90fd3890576f925c364895844ae5d6633 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Wed, 13 Nov 2024 20:03:39 +0100 Subject: [PATCH 32/40] Add i18n pre-commit back in --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 564ac29e4..ba4361b80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,13 +15,13 @@ repos: args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - # - repo: local - # hooks: - # - id: run-i18n-checks - # name: Run i18n Checks - # entry: python frontend/i18n/check/run_i18n_checks.py - # language: python - # stages: [pre-commit] + - repo: local + hooks: + - id: run-i18n-checks + name: Run i18n Checks + entry: python frontend/i18n/check/run_i18n_checks.py + language: python + stages: [pre-commit] # - repo: https://github.com/pre-commit/mirrors-prettier # rev: "v4.0.0-alpha.8" From 62e907d813d73d6f4b1f8d4315a674917080cd52 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Wed, 13 Nov 2024 20:05:02 +0100 Subject: [PATCH 33/40] Fix code formatting for pages/contact --- frontend/pages/contact.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/pages/contact.vue b/frontend/pages/contact.vue index 7561c8b2e..9ec3ed52a 100644 --- a/frontend/pages/contact.vue +++ b/frontend/pages/contact.vue @@ -53,7 +53,7 @@ style="vertical-align: baseline" /> - {{ $t("pages.contact.section_1_paragraph_1_3") }} + {{ $t("pages.contact.section_1_paragraph_1_3") }} Date: Wed, 13 Nov 2024 20:10:09 +0100 Subject: [PATCH 34/40] Remove unneeded console logs from codebase --- frontend/components/media/MediaMap.vue | 3 --- frontend/stores/organization.ts | 4 ---- 2 files changed, 7 deletions(-) diff --git a/frontend/components/media/MediaMap.vue b/frontend/components/media/MediaMap.vue index 771bb5bdf..b08e3dda0 100644 --- a/frontend/components/media/MediaMap.vue +++ b/frontend/components/media/MediaMap.vue @@ -269,12 +269,9 @@ onMounted(() => { map .loadImage("/icons/from_library/bootstrap_arrow_right.png") .then((image) => { - console.log("Here1"); if (image) { map.addImage("route-direction-arrow", image.data); } - - console.log("Here2", image.data); }); map.on("load", () => { diff --git a/frontend/stores/organization.ts b/frontend/stores/organization.ts index 6c6a0c97e..a86f368e9 100644 --- a/frontend/stores/organization.ts +++ b/frontend/stores/organization.ts @@ -188,8 +188,6 @@ export const useOrganizationStore = defineStore("organization", { (text) => text.data._value.results )[0] as unknown as OrganizationText[]; - console.log(`Hereee ${JSON.stringify(orgTextsData)}`); - // Order texts based on the returned organizations. const orgIds = orgs._value.map((o) => o.id); const sortedOrgTextsData: OrganizationText[] = []; @@ -201,8 +199,6 @@ export const useOrganizationStore = defineStore("organization", { } } - console.log(`Hereee ${JSON.stringify(sortedOrgTextsData)}`); - const organizationsWithTexts = orgs._value.map( (organization: Organization, index: number) => { const texts = sortedOrgTextsData[index]; From 6505c312da07573ec05d17405f2e555b5de1870f Mon Sep 17 00:00:00 2001 From: David D Date: Tue, 12 Nov 2024 06:50:53 +0000 Subject: [PATCH 35/40] Translated using Weblate (French) Currently translated at 98.9% (729 of 737 strings) Translation: activist/activist Translate-URL: https://hosted.weblate.org/projects/activist/activist/fr/ --- frontend/i18n/fr.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/i18n/fr.json b/frontend/i18n/fr.json index abc8d096c..ff8aa459c 100644 --- a/frontend/i18n/fr.json +++ b/frontend/i18n/fr.json @@ -238,6 +238,10 @@ "components.landing_splash.message_2": "Gratuite, open-source, axée sur la confidentialité et régie par notre communauté.", "components.landing_splash.request_access": "Demander l'accès", "components.landing_splash.request_access_aria_label": "Demander l'accès à activist.org", + "components.landing_splash.view_events": "Voir événements", + "components.landing_splash.view_events_aria_label": "Voir la section évènements de la plateforme Activist", + "components.landing_splash.view_organizations": "Voir organisations", + "components.landing_splash.view_organizations_aria_label": "Voir la section organisations de la plateforme Activist", "components.landing_tech_banner.open_header": "Ouvert", "components.landing_tech_banner.open_source_tagline": "Notre code et nos processus", "components.landing_tech_banner.open_source_text": "Nous sommes déterminés à travailler en toute transparence pour établir la confiance avec nos organisations partenaires et nos autres militants. Tous ceux/celles qui veulent nous aider à bâtir sont les bienvenu(e)s !", @@ -278,6 +282,7 @@ "components.modal_share_page.messenger": "Messenger", "components.modal_share_page.offline": "Hors ligne", "components.modal_share_page.online": "En ligne", + "components.modal_share_page.opening_signal": "Signal d'ouverture", "components.modal_share_page.signal": "Signal", "components.modal_share_page.telegram": "Télégram", "components.modal_share_page.url_copied": "URL copiée", @@ -477,6 +482,7 @@ "pages.organizations._global.faq_tagline": "Questions que nous recevons souvent", "pages.organizations._global.resources_tagline": "Liens et outils utiles pour notre travail", "pages.organizations.affiliates.affiliates_lower": "affiliés", + "pages.organizations.affiliates.tagline": "Qui nous soutenons", "pages.organizations.create.complete_application": "Terminer adhésion", "pages.organizations.create.description_placeholder": "Veuillez fournir une description de l’organisation à la communauté afin que nous puissions en apprendre davantage sur ses objectifs et sa composition", "pages.organizations.create.header": "Information adhésion", From 1f90fa0b9b9ab1912cc8addb5b6c72ef97bbb753 Mon Sep 17 00:00:00 2001 From: gallegonovato Date: Wed, 13 Nov 2024 08:39:56 +0000 Subject: [PATCH 36/40] Translated using Weblate (Spanish) Currently translated at 31.1% (172 of 553 strings) Translation: activist/activist Translate-URL: https://hosted.weblate.org/projects/activist/activist/es/ --- frontend/i18n/es.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/i18n/es.json b/frontend/i18n/es.json index af4064521..04632bfad 100644 --- a/frontend/i18n/es.json +++ b/frontend/i18n/es.json @@ -133,8 +133,18 @@ "pages._global.team.team_lower": "equipo", "pages.auth.reset_password.enter_username_mail": "Introduce tu nombre de usuario o correo electrónico", "pages.auth.set_password.set_password": "Establecer contraseña", + "pages.contact.valid": "debe ser válido", + "pages.events.create.button_left": "Atrás", + "pages.events.create.button_right": "Siguiente", + "pages.events.create.description_placeholder": "Por favor, proporcione una descripción del evento para la comunidad para que podamos saber más sobre él", + "pages.events.create.event_type": "Tipo", "pages.events.create.events_name": "Nombre del evento", "pages.events.discussion.discussion_lower": "debate", + "pages.index.about_us": "Sobre nosotros", + "pages.index.activist_section_btn_aria_label": "Obtén más información sobre activist.org y cómo funciona", + "pages.index.activist_section_tagline": "Nuestra comunidad y objetivos", + "pages.index.activist_section_text": "Somos un equipo global de colaboradores con un objetivo común: actualizar cómo las personas pueden volverse políticamente activas y organizadas.", + "pages.index.become_supporter": "Hazte simpatizante", "pages.index.get_active": "Mantente activo", "pages.index.get_organized": "Organízate", "pages.index.grow_organization": "Hacer crecer la organización", From 136426ba208f835c1b9b6965f9b6a98421ac2fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cleverson=20C=C3=A2ndido?= Date: Wed, 13 Nov 2024 22:09:27 +0000 Subject: [PATCH 37/40] Translated using Weblate (Portuguese) Currently translated at 2.1% (12 of 553 strings) Translation: activist/activist Translate-URL: https://hosted.weblate.org/projects/activist/activist/pt/ --- frontend/i18n/pt.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/i18n/pt.json b/frontend/i18n/pt.json index 0967ef424..04e8a951a 100644 --- a/frontend/i18n/pt.json +++ b/frontend/i18n/pt.json @@ -1 +1,14 @@ -{} +{ + "_global.about": "Sobre", + "_global.activist_icon_img_alt_text": "O ícone do ativista: uma letra a minúscula com um semicírculo apontando para baixo e para a esquerda no centro.", + "_global.auth.reset_password": "Redefinir senha", + "_global.auth.sign_in_aria_label": "Navegue até a página de login", + "_global.auth.sign_up_aria_label": "Navegue até a página de inscrição", + "_global.contact": "Contato", + "_global.create_group": "Criar grupo", + "_global.discussion": "Discussão", + "_global.discussions": "Discussões", + "_global.enter_password": "Digite sua senha", + "_global.events": "Eventos", + "_global.join_group": "Junte-se ao grupo" +} From 0ade8b9ae7def20a945f437695f8d56c8f4fb861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cleverson=20C=C3=A2ndido?= Date: Wed, 13 Nov 2024 22:09:44 +0000 Subject: [PATCH 38/40] Translated using Weblate (Portuguese) Currently translated at 2.3% (13 of 553 strings) Translation: activist/activist Translate-URL: https://hosted.weblate.org/projects/activist/activist/pt/ --- frontend/i18n/pt.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/i18n/pt.json b/frontend/i18n/pt.json index 04e8a951a..e04366154 100644 --- a/frontend/i18n/pt.json +++ b/frontend/i18n/pt.json @@ -10,5 +10,6 @@ "_global.discussions": "Discussões", "_global.enter_password": "Digite sua senha", "_global.events": "Eventos", - "_global.join_group": "Junte-se ao grupo" + "_global.join_group": "Junte-se ao grupo", + "_global.join_group_aria_label": "Inicie o processo de adesão ao grupo" } From 607e5765b6683bda0d90297f4294f9687241b682 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Thu, 14 Nov 2024 00:00:31 +0100 Subject: [PATCH 39/40] Update to run current tests within the PR workflows and remove Matrix for now --- .../workflows/check_dependency_updates.yaml | 110 ++++++++++++++++++ .github/workflows/dependency_update.yaml | 104 ----------------- 2 files changed, 110 insertions(+), 104 deletions(-) create mode 100644 .github/workflows/check_dependency_updates.yaml delete mode 100644 .github/workflows/dependency_update.yaml diff --git a/.github/workflows/check_dependency_updates.yaml b/.github/workflows/check_dependency_updates.yaml new file mode 100644 index 000000000..535791219 --- /dev/null +++ b/.github/workflows/check_dependency_updates.yaml @@ -0,0 +1,110 @@ +name: check_dependency_updates + +on: + schedule: + - cron: '0 0 15 */2 *' + workflow_dispatch: + +jobs: + update_dependencies: + runs-on: ubuntu-latest + steps: + # MARK: Environments + + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Node Environment + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install Yarn + uses: borales/actions-yarn@v5 + with: + cmd: install + dir: "frontend" + + # MARK: Dependency Updates + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.11' + + - name: Update Backend Dependencies + working-directory: backend + run: | + python -m pip install --upgrade uv + uv venv + uv pip install -r requirements-dev.txt + pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U + pip freeze > requirements-dev.txt + + - name: Install npm-check-updates + run: npm install -g npm-check-updates + + - name: Update Frontend Dependencies + working-directory: frontend + run: | + ncu -u + + # MARK: Backend Tests + + - name: Activate Virtual Environment + run: | + . .venv/bin/activate + echo PATH=$PATH >> $GITHUB_ENV + + - name: Run Ruff Format - Formatting and Linting Check + run: ruff check ./backend || echo "Ruff check failed" >> error_log.txt + + - name: Run mypy - Static Type Checking + if: always() + run: mypy ./backend --config-file ./backend/pyproject.toml || echo "mypy check failed" >> error_log.txt + + - name: Run pytest - Unit Tests + if: always() + run: pytest ./backend -vv || echo "Backend tests failed." >> error_log.txt + + # MARK: Frontend Tests + + - name: Install Prettier + run: yarn add prettier + + - name: Run Prettier - Formatting Check + working-directory: ./frontend + run: | + yarn prettier . --check --config ../.prettierrc --ignore-path ../.prettierignore || echo "Prettier check failed." >> error_log.txt + + - name: Run Nuxt Type Check + if: always() + uses: borales/actions-yarn@v4 + with: + cmd: nuxi typecheck || echo "Type check failed." >> error_log.txt + dir: "frontend" + + - name: Run ESLint - Linting + if: always() + uses: borales/actions-yarn@v4 + with: + cmd: eslint . || echo "ESLint check failed." >> error_log.txt + dir: "frontend" + + # MARK: Errors and Issue + + - name: Log Errors + if: failure() + run: | + if [[ -f error_log.txt ]]; then + cat error_log.txt + else + echo "No errors found during dependency update." + fi + + - name: Create GitHub Issue + if: failure() + uses: peter-evans/create-issue-from-file@v4 + with: + title: $(date +%Y-%m-%d) Dependency Update Errors + content-filepath: error_log.txt diff --git a/.github/workflows/dependency_update.yaml b/.github/workflows/dependency_update.yaml deleted file mode 100644 index cf0250713..000000000 --- a/.github/workflows/dependency_update.yaml +++ /dev/null @@ -1,104 +0,0 @@ -name: Bi-Monthly Dependency Update - -on: - schedule: - - cron: '0 0 1 */2 *' - workflow_dispatch: - -jobs: - update_dependencies: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '19.8.1' - - - name: Install npm-check-updates - run: npm install -g npm-check-updates - - - name: Update frontend dependencies - working-directory: frontend - run: | - ncu -u --target minor - npm ci - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.10.2' - - - name: Update backend dependencies - working-directory: backend - run: | - pip install -r requirements.txt - pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U - pip freeze > requirements.txt - - - name: Run backend tests - working-directory: backend - run: | - python manage.py test || echo "Backend tests failed" >> error_log.txt - - - name: Build project - working-directory: frontend - run: | - npm run build || echo "Frontend build failed" >> error_log.txt - - - name: Run frontend tests - working-directory: frontend - run: | - npm run test:local || echo "Frontend tests failed" >> error_log.txt - - - name: Type check - working-directory: frontend - run: | - npm run typecheck || echo "Frontend typecheck failed" >> error_log.txt - - - name: Lint code - working-directory: frontend - run: | - npm run lint || echo "Frontend linting failed" >> error_log.txt - - - name: Format code - working-directory: frontend - run: | - npm run format || echo "Frontend formatting failed" >> error_log.txt - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 - with: - title: "Bi-Monthly Dependency Update" - body: | - Automated bi-monthly dependency update. - - Updated frontend and backend dependencies to the latest minor versions. - - See below for the results of the build, typecheck, and test runs. - branch: "dependency-update-$(date +'%Y%m%d')" - - - name: Notify Team via Matrix - uses: fadenb/matrix-chat-message@v0.0.6 - with: - homeserver: 'matrix.org' - token: ${{ secrets.MATRIX_TOKEN }} - channel: '!CRgLpGeOBNwxYCtqmK:matrix.org' - message: | - Bi-monthly dependency update PR created. Please review it and check for any issues! - - - name: Log Errors - if: failure() - run: | - if [[ -f error_log.txt ]]; then - cat error_log.txt - else - echo "No errors found during dependency update." - fi - - - name: Create GitHub Issue - if: failure() - uses: peter-evans/create-issue-from-file@v4 - with: - title: Dependency Update Errors - content-filepath: error_log.txt From 44c772290540f1b79f6e95b92eb3009012a69a91 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Thu, 14 Nov 2024 00:13:04 +0100 Subject: [PATCH 40/40] Add labels to dependencies workflow issue --- .github/workflows/check_dependency_updates.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check_dependency_updates.yaml b/.github/workflows/check_dependency_updates.yaml index 535791219..c426d59ae 100644 --- a/.github/workflows/check_dependency_updates.yaml +++ b/.github/workflows/check_dependency_updates.yaml @@ -108,3 +108,6 @@ jobs: with: title: $(date +%Y-%m-%d) Dependency Update Errors content-filepath: error_log.txt + labels: | + dependencies + help wanted