From 83da88ca284635c1f13d02eefd5e5888414c3c5a Mon Sep 17 00:00:00 2001 From: summersamara Date: Mon, 27 Nov 2023 16:52:23 +0100 Subject: [PATCH 1/5] fix fullAddressAutocomplete component not loading results - introduce refetch method to fetch the result when query variables change --- .../Event/FullAddressAutoComplete.vue | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/components/Event/FullAddressAutoComplete.vue b/src/components/Event/FullAddressAutoComplete.vue index bfa911951..0302b737f 100644 --- a/src/components/Event/FullAddressAutoComplete.vue +++ b/src/components/Event/FullAddressAutoComplete.vue @@ -318,9 +318,10 @@ const debounceDelay = computed(() => geocodingAutocomplete.value === true ? 200 : 2000 ); -const { load: searchAddress } = useLazyQuery<{ - searchAddress: IAddress[]; -}>(ADDRESS); +const { load: searchAddressLoad, refetch: searchAddressRefetch } = + useLazyQuery<{ + searchAddress: IAddress[]; + }>(ADDRESS); const asyncData = async (query: string): Promise => { console.debug("Finding addresses"); @@ -338,13 +339,22 @@ const asyncData = async (query: string): Promise => { isFetching.value = true; try { - const result = await searchAddress(undefined, { + const queryVars = { query, locale: locale, type: props.resultType, - }); + }; - if (!result) return; + const result = + (await searchAddressLoad(undefined, queryVars)) || + (await searchAddressRefetch(queryVars)?.then((object) => { + return object.data; + })); + + if (!result) { + isFetching.value = false; + return; + } console.debug("onAddressSearchResult", result.searchAddress); addressData.value = result.searchAddress; isFetching.value = false; From f81804d57fa5659498b8e5cf4cd91a3e88d15643 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 27 Nov 2023 16:43:12 +0000 Subject: [PATCH 2/5] resolve result promise in a shorter way --- src/components/Event/FullAddressAutoComplete.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/Event/FullAddressAutoComplete.vue b/src/components/Event/FullAddressAutoComplete.vue index 0302b737f..a9f687f08 100644 --- a/src/components/Event/FullAddressAutoComplete.vue +++ b/src/components/Event/FullAddressAutoComplete.vue @@ -347,9 +347,7 @@ const asyncData = async (query: string): Promise => { const result = (await searchAddressLoad(undefined, queryVars)) || - (await searchAddressRefetch(queryVars)?.then((object) => { - return object.data; - })); + (await searchAddressRefetch(queryVars))?.data if (!result) { isFetching.value = false; From 49b070d9393b89f0f88438a5151239db3765c34a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 30 Nov 2023 09:45:25 +0100 Subject: [PATCH 3/5] fix(api): allow localhost as a valid uri host for applications Signed-off-by: Thomas Citharel --- lib/web/controllers/application_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/controllers/application_controller.ex b/lib/web/controllers/application_controller.ex index 7ef7d5600..a08960f12 100644 --- a/lib/web/controllers/application_controller.ex +++ b/lib/web/controllers/application_controller.ex @@ -426,7 +426,7 @@ defmodule Mobilizon.Web.ApplicationController do defp valid_uri?(url) do uri = URI.parse(url) - uri.scheme != nil and uri.host =~ "." + uri.scheme != nil and (uri.host =~ "." or uri.host == "localhost") end @spec append_parameters(String.t(), Enum.t()) :: String.t() From 2e4b70cf9379f8296847694f4087f7c22d7a22a6 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 30 Nov 2023 09:55:23 +0100 Subject: [PATCH 4/5] Release 4.0.0-beta.1 Signed-off-by: Thomas Citharel --- CHANGELOG.md | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++ mix.exs | 4 +-- package.json | 2 +- 3 files changed, 97 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e4f018c..54365b376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,100 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 4.0.0-beta.1 (2023-11-30) + +* fix: add a final fallback if we have default_language: nil in instance config ([cd53062](https://framagit.org/framasoft/mobilizon/commits/cd53062)) +* fix: build pictures at correct location and fix Plug.Static ([3c288c5](https://framagit.org/framasoft/mobilizon/commits/3c288c5)) +* fix: don't show passed/finished events in related events section ([69e4a5c](https://framagit.org/framasoft/mobilizon/commits/69e4a5c)) +* fix: fix Dockerfile copying assets path ([16cd377](https://framagit.org/framasoft/mobilizon/commits/16cd377)) +* fix: normalize suggested username ([4960387](https://framagit.org/framasoft/mobilizon/commits/4960387)) +* fix: set correct watcher config for E2E tests ([f47889b](https://framagit.org/framasoft/mobilizon/commits/f47889b)) +* fix: various fixes ([b635937](https://framagit.org/framasoft/mobilizon/commits/b635937)) +* fix(announcements): load group announcements ([7ef85fe](https://framagit.org/framasoft/mobilizon/commits/7ef85fe)) +* fix(api): allow localhost as a valid uri host for applications ([49b070d](https://framagit.org/framasoft/mobilizon/commits/49b070d)) +* fix(api): fix allowing posting event private announcement ([1831495](https://framagit.org/framasoft/mobilizon/commits/1831495)) +* fix(docker): add sitemap folder ([bd38449](https://framagit.org/framasoft/mobilizon/commits/bd38449)) +* fix(docker): allow to configure SMTP TLS ([2ecdf05](https://framagit.org/framasoft/mobilizon/commits/2ecdf05)) +* fix(docker): convert smtp tls sni to char list ([b3be7c6](https://framagit.org/framasoft/mobilizon/commits/b3be7c6)) +* fix(export): fix iCalendar export description HTML conversion ([d7daafc](https://framagit.org/framasoft/mobilizon/commits/d7daafc)), closes [#888](https://framagit.org/framasoft/mobilizon/issues/888) +* fix(front): hide all categories card if we don't have even one ([5e86ef1](https://framagit.org/framasoft/mobilizon/commits/5e86ef1)) +* fix(histoire): fix URL to Framapiaf avatars ([0613f7f](https://framagit.org/framasoft/mobilizon/commits/0613f7f)) +* fix(i18n): fix typos in translation sources ([2ecd55d](https://framagit.org/framasoft/mobilizon/commits/2ecd55d)) +* fix(i18n): update spanish translations ([cfebc35](https://framagit.org/framasoft/mobilizon/commits/cfebc35)) +* add simplified Chinese mapping ([02af9a4](https://framagit.org/framasoft/mobilizon/commits/02af9a4)) +* Added translation using Weblate (Korean) ([a11fab6](https://framagit.org/framasoft/mobilizon/commits/a11fab6)) +* Added translation using Weblate (Korean) ([c529a83](https://framagit.org/framasoft/mobilizon/commits/c529a83)) +* Added translation using Weblate (Tatar) ([cefdaf8](https://framagit.org/framasoft/mobilizon/commits/cefdaf8)) +* Fix docker development: ([9705978](https://framagit.org/framasoft/mobilizon/commits/9705978)) +* fix fullAddressAutocomplete component not loading results ([83da88c](https://framagit.org/framasoft/mobilizon/commits/83da88c)) +* Fix typo in ctl help text ([495d163](https://framagit.org/framasoft/mobilizon/commits/495d163)) +* Fix typos ([66e89b9](https://framagit.org/framasoft/mobilizon/commits/66e89b9)) +* introduce VITE_HOST env var and pass it to the node watcher vite --host ([bfb7e3c](https://framagit.org/framasoft/mobilizon/commits/bfb7e3c)) +* remove unnecessary function ([8a1b122](https://framagit.org/framasoft/mobilizon/commits/8a1b122)) +* resolve result promise in a shorter way ([f81804d](https://framagit.org/framasoft/mobilizon/commits/f81804d)) +* Translated using Weblate (Croatian) ([e510e09](https://framagit.org/framasoft/mobilizon/commits/e510e09)) +* Translated using Weblate (Czech) ([d702ca2](https://framagit.org/framasoft/mobilizon/commits/d702ca2)) +* Translated using Weblate (Czech) ([9224f89](https://framagit.org/framasoft/mobilizon/commits/9224f89)) +* Translated using Weblate (Czech) ([c14dffb](https://framagit.org/framasoft/mobilizon/commits/c14dffb)) +* Translated using Weblate (Czech) ([a7d70d5](https://framagit.org/framasoft/mobilizon/commits/a7d70d5)) +* Translated using Weblate (French) ([c7ba003](https://framagit.org/framasoft/mobilizon/commits/c7ba003)) +* Translated using Weblate (German) ([7732f87](https://framagit.org/framasoft/mobilizon/commits/7732f87)) +* Translated using Weblate (Indonesian) ([d065193](https://framagit.org/framasoft/mobilizon/commits/d065193)) +* Translated using Weblate (Italian) ([b5e9f62](https://framagit.org/framasoft/mobilizon/commits/b5e9f62)) +* Translated using Weblate (Italian) ([e8e1a62](https://framagit.org/framasoft/mobilizon/commits/e8e1a62)) +* Translated using Weblate (Italian) ([84fc175](https://framagit.org/framasoft/mobilizon/commits/84fc175)) +* Translated using Weblate (Italian) ([5b64388](https://framagit.org/framasoft/mobilizon/commits/5b64388)) +* Translated using Weblate (Italian) ([5e3dedb](https://framagit.org/framasoft/mobilizon/commits/5e3dedb)) +* Translated using Weblate (Italian) ([afe4dd2](https://framagit.org/framasoft/mobilizon/commits/afe4dd2)) +* Translated using Weblate (Italian) ([fa0ae83](https://framagit.org/framasoft/mobilizon/commits/fa0ae83)) +* Translated using Weblate (Italian) ([181a5a7](https://framagit.org/framasoft/mobilizon/commits/181a5a7)) +* Translated using Weblate (Italian) ([827caa3](https://framagit.org/framasoft/mobilizon/commits/827caa3)) +* Translated using Weblate (Italian) ([d08d350](https://framagit.org/framasoft/mobilizon/commits/d08d350)) +* Translated using Weblate (Italian) ([e9d38c2](https://framagit.org/framasoft/mobilizon/commits/e9d38c2)) +* Translated using Weblate (Italian) ([a4578f3](https://framagit.org/framasoft/mobilizon/commits/a4578f3)) +* Translated using Weblate (Polish) ([d62c31e](https://framagit.org/framasoft/mobilizon/commits/d62c31e)) +* Translated using Weblate (Polish) ([a8ea217](https://framagit.org/framasoft/mobilizon/commits/a8ea217)) +* Translated using Weblate (Polish) ([42537af](https://framagit.org/framasoft/mobilizon/commits/42537af)) +* Translated using Weblate (Polish) ([fb0a74e](https://framagit.org/framasoft/mobilizon/commits/fb0a74e)) +* Translated using Weblate (Polish) ([2458076](https://framagit.org/framasoft/mobilizon/commits/2458076)) +* Translated using Weblate (Polish) ([46ffc8c](https://framagit.org/framasoft/mobilizon/commits/46ffc8c)) +* Translated using Weblate (Polish) ([f0d7807](https://framagit.org/framasoft/mobilizon/commits/f0d7807)) +* Translated using Weblate (Portuguese (Brazil)) ([9f78c73](https://framagit.org/framasoft/mobilizon/commits/9f78c73)) +* Translated using Weblate (Portuguese (Brazil)) ([802ab78](https://framagit.org/framasoft/mobilizon/commits/802ab78)) +* Translated using Weblate (Spanish) ([ee5ee8d](https://framagit.org/framasoft/mobilizon/commits/ee5ee8d)) +* Translated using Weblate (Spanish) ([66c49e4](https://framagit.org/framasoft/mobilizon/commits/66c49e4)) +* Translated using Weblate (Tatar) ([ba5f8f8](https://framagit.org/framasoft/mobilizon/commits/ba5f8f8)) +* Update translation files ([9aa9cd2](https://framagit.org/framasoft/mobilizon/commits/9aa9cd2)) +* WIP ([b5672ce](https://framagit.org/framasoft/mobilizon/commits/b5672ce)) +* build: downgrade Sentry since it doesn't want to compile ([b2bacbf](https://framagit.org/framasoft/mobilizon/commits/b2bacbf)) +* build: only run ecto create & migrate & tz_world update on prepare_test task, not main test one ([8d11073](https://framagit.org/framasoft/mobilizon/commits/8d11073)) +* build: replace @pluralsh/socket with @framasoft/socket ([435bd9d](https://framagit.org/framasoft/mobilizon/commits/435bd9d)) +* build: replace @vueuse/head with @unhead/vue ([5602164](https://framagit.org/framasoft/mobilizon/commits/5602164)) +* build: switch from yarn to npm to manage js dependencies and move js contents to root ([2e72f6f](https://framagit.org/framasoft/mobilizon/commits/2e72f6f)) +* build(deps): replace absinthe socket library with fork ([ec397aa](https://framagit.org/framasoft/mobilizon/commits/ec397aa)) +* build(docker): optimize image size ([f34099d](https://framagit.org/framasoft/mobilizon/commits/f34099d)), closes [#1012](https://framagit.org/framasoft/mobilizon/issues/1012) +* ci: bump node version in CI ([3205512](https://framagit.org/framasoft/mobilizon/commits/3205512)) +* ci: fix handling pages deploy with existing public folder ([1228ec1](https://framagit.org/framasoft/mobilizon/commits/1228ec1)) +* ci: install python3 instead of python ([5d65981](https://framagit.org/framasoft/mobilizon/commits/5d65981)) +* ci: Release on multiple distributions & fix Docker multiple-step build ([262d1fc](https://framagit.org/framasoft/mobilizon/commits/262d1fc)) +* test: fix ActivityPub headers test ([f248660](https://framagit.org/framasoft/mobilizon/commits/f248660)) +* test: fix front-end tests ([105d3b5](https://framagit.org/framasoft/mobilizon/commits/105d3b5)) +* test: fix histoire configuration ([bfbc299](https://framagit.org/framasoft/mobilizon/commits/bfbc299)) +* test: fix tests ([c731f0f](https://framagit.org/framasoft/mobilizon/commits/c731f0f)) +* test: fix unit backend tests ([e051df1](https://framagit.org/framasoft/mobilizon/commits/e051df1)) +* chore: fix prettier configuration and run it ([c255cea](https://framagit.org/framasoft/mobilizon/commits/c255cea)) +* chore: update Sobelow security ignores ([1d0398d](https://framagit.org/framasoft/mobilizon/commits/1d0398d)) +* chore: upgrade deps ([99c80c6](https://framagit.org/framasoft/mobilizon/commits/99c80c6)) +* chore(deps): update geo_postgis to 3.5.0 for Elixir 1.15 compat ([3936eb4](https://framagit.org/framasoft/mobilizon/commits/3936eb4)) +* chore(deps): upgrade dependencies ([3d9beaa](https://framagit.org/framasoft/mobilizon/commits/3d9beaa)) +* chore(i18n): add missing translation key ([6ecfa48](https://framagit.org/framasoft/mobilizon/commits/6ecfa48)) +* chore(i18n): update gettext dependency and regenerate translation files ([d7ad934](https://framagit.org/framasoft/mobilizon/commits/d7ad934)) +* chore(i18n): update translation templates ([70e9ce0](https://framagit.org/framasoft/mobilizon/commits/70e9ce0)) +* refactor: use dedicated email for event announcements ([b97f1c9](https://framagit.org/framasoft/mobilizon/commits/b97f1c9)) +* docs(dev.md): keep some info about structure ([d130b15](https://framagit.org/framasoft/mobilizon/commits/d130b15)) +* feat(export): add event status in iCalendar exports ([7a1bfca](https://framagit.org/framasoft/mobilizon/commits/7a1bfca)) +* feat(federation): expose public activities as announcements in relay outbx & rfrsh profile aftr fllw ([85e4715](https://framagit.org/framasoft/mobilizon/commits/85e4715)) + ## 3.2.0 (2023-09-07) diff --git a/mix.exs b/mix.exs index ba97d561e..6b2b581f5 100644 --- a/mix.exs +++ b/mix.exs @@ -1,13 +1,13 @@ defmodule Mobilizon.Mixfile do use Mix.Project - @version "3.2.0" + @version "4.0.0-beta.1" def project do [ app: :mobilizon, version: @version, - elixir: "~> 1.13", + elixir: "~> 1.15", elixirc_paths: elixirc_paths(Mix.env()), compilers: Mix.compilers(), xref: [exclude: [:eldap]], diff --git a/package.json b/package.json index 43a1da169..47fc85162 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mobilizon", - "version": "3.2.0", + "version": "4.0.0-beta.1", "private": true, "scripts": { "dev": "vite", From 4f15535fa9d9932144c908bf08f1f1e8ca19a742 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 30 Nov 2023 10:00:05 +0100 Subject: [PATCH 5/5] ci(docker): fix docker build for pre-releases Signed-off-by: Thomas Citharel --- .gitlab-ci.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81bc7c465..602337ceb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -251,7 +251,7 @@ build-docker-tag: rules: &release-tag-rules - if: '$CI_PROJECT_NAMESPACE != "framasoft"' when: never - - if: $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /alpha|beta|rc/ + - if: $CI_COMMIT_TAG != null when: on_success timeout: 3 hours script: @@ -270,23 +270,6 @@ build-docker-tag: - ARCH: ["arm64"] ERL_FLAGS: ["ERL_FLAGS=+JMsingle true"] -# Don't push to latest when building beta/rc tags -build-and-push-docker-tag: - <<: *docker - rules: &pre-release-tag-rules - - if: '$CI_PROJECT_NAMESPACE != "framasoft"' - when: never - - if: $CI_COMMIT_TAG =~ /alpha|beta|rc/ - when: on_success - timeout: 3 hours - script: - - > - docker buildx build - --platform linux/amd64 - --provenance=false - -t framasoft/mobilizon:$CI_COMMIT_TAG-amd64 - -f docker/production/Dockerfile . - # Create manifest and push docker-manifest-push: <<: *docker