diff --git a/android/app/build.gradle b/android/app/build.gradle index a730362..4400486 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.compassconnections.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 26 - versionName "1.3.1" + versionCode 28 + versionName "1.4.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/backend/api/package.json b/backend/api/package.json index 6e85fd9..2a8c569 100644 --- a/backend/api/package.json +++ b/backend/api/package.json @@ -1,7 +1,7 @@ { "name": "@compass/api", "description": "Backend API endpoints", - "version": "1.3.0", + "version": "1.3.1", "private": true, "scripts": { "watch:serve": "tsx watch src/serve.ts", diff --git a/backend/api/src/get-profiles.ts b/backend/api/src/get-profiles.ts index 721bbdf..0395d01 100644 --- a/backend/api/src/get-profiles.ts +++ b/backend/api/src/get-profiles.ts @@ -2,7 +2,6 @@ import {type APIHandler} from 'api/helpers/endpoint' import {convertRow} from 'shared/profiles/supabase' import {createSupabaseDirectClient, pgp} from 'shared/supabase/init' import {from, join, leftJoin, limit, orderBy, renderSql, select, where,} from 'shared/supabase/sql-builder' -import {MIN_BIO_LENGTH} from "common/constants"; import {compact} from "lodash"; import {OptionTableKey} from "common/profiles/constants"; @@ -119,6 +118,7 @@ export const loadProfiles = async (props: profileQueryType) => { GROUP BY profile_${label}.profile_id ) profile_${label} ON profile_${label}.profile_id = profiles.id` } + const interestsJoin = getManyToManyJoin('interests') const causesJoin = getManyToManyJoin('causes') const workJoin = getManyToManyJoin('work') @@ -292,7 +292,12 @@ export const loadProfiles = async (props: profileQueryType) => { skipId && where(`profiles.user_id != $(skipId)`, {skipId}), - !shortBio && where(`bio_length >= ${MIN_BIO_LENGTH}`, {MIN_BIO_LENGTH}), + !shortBio && where( + `bio_length >= ${100} + OR array_length(profile_work.work, 1) > 0 + OR array_length(profile_interests.interests, 1) > 0 + OR occupation_title IS NOT NULL + `), lastModificationWithin && where(`last_modification_time >= NOW() - INTERVAL $(lastModificationWithin)`, {lastModificationWithin}), ] diff --git a/common/src/filters.ts b/common/src/filters.ts index 2387203..c75c037 100644 --- a/common/src/filters.ts +++ b/common/src/filters.ts @@ -86,7 +86,7 @@ export const initialFilters: Partial = { religion: undefined, mbti: undefined, pref_gender: undefined, - shortBio: true, + shortBio: undefined, drinks_min: undefined, drinks_max: undefined, orderBy: 'created_time', diff --git a/web/components/filters/relationship-filter.tsx b/web/components/filters/relationship-filter.tsx index 64398cb..afd43d7 100644 --- a/web/components/filters/relationship-filter.tsx +++ b/web/components/filters/relationship-filter.tsx @@ -23,7 +23,7 @@ export function RelationshipFilterText(props: { ) } - const convertedRelationships = relationship.map((r) => + const convertedRelationships = relationship?.map((r) => t(`profile.relationship.${r}`, convertRelationshipType(r)) ) diff --git a/web/components/profile-grid.tsx b/web/components/profile-grid.tsx index 40f4272..f320047 100644 --- a/web/components/profile-grid.tsx +++ b/web/components/profile-grid.tsx @@ -116,9 +116,9 @@ function ProfilePreview(props: { const seekingGenderText = getSeekingGenderText(profile, t) - if (!profile.work?.length && !profile.occupation_title && !profile.interests?.length && (profile.bio_length || 0) < 100) { - return null - } + // if (!profile.work?.length && !profile.occupation_title && !profile.interests?.length && (profile.bio_length || 0) < 100) { + // return null + // } return ( {/*TODO: fix nested links warning (one from Link above, one from link in bio below)*/} - {/**/} {seekingGenderText &&

{seekingGenderText}.

} - {!!profile.work?.length &&

+ {(!!profile.work?.length || profile.occupation_title) &&

{t("profile.optional.category.work", "Work")}:{" "} {profile.occupation_title && profile.occupation_title + ", "} {profile.work?.slice(0, 3).map(id => choicesIdsToLabels['work'][id]).join(', ')} @@ -185,7 +184,6 @@ function ProfilePreview(props: { {t("profile.optional.interests", "Interests")}:{" "} {profile.interests?.map(id => choicesIdsToLabels['interests'][id]).join(', ')}

} - {/**/}