diff --git a/common/messages/de.json b/common/messages/de.json index c0fadd92..a226fca8 100644 --- a/common/messages/de.json +++ b/common/messages/de.json @@ -979,7 +979,7 @@ "filter.group.values": "Werte & Überzeugungen", "filter.group.personality": "Persönlichkeit", "filter.group.advanced": "Erweitert", - "filter.group.rendering": "Darstellung", + "filter.group.display": "Darstellung", "referrals.title": "Lade jemanden ein, Compass beizutreten!", "register.agreement.and": " und ", "register.agreement.prefix": "Mit der Registrierung akzeptiere ich die ", diff --git a/common/messages/fr.json b/common/messages/fr.json index 012054f7..396f36ec 100644 --- a/common/messages/fr.json +++ b/common/messages/fr.json @@ -978,7 +978,7 @@ "filter.group.values": "Valeurs & Croyances", "filter.group.personality": "Personnalité", "filter.group.advanced": "Avancé", - "filter.group.rendering": "Rendu", + "filter.group.display": "Affichage", "referrals.title": "Invitez quelqu'un à rejoindre Compass !", "register.agreement.and": " et ", "register.agreement.prefix": "En vous inscrivant, j'accepte les ", diff --git a/common/src/profiles-rendering.ts b/common/src/profiles-rendering.ts index 3972dc91..e883f16e 100644 --- a/common/src/profiles-rendering.ts +++ b/common/src/profiles-rendering.ts @@ -1,7 +1,7 @@ -export type RenderingOptions = { +export type displayOptions = { showPhotos: boolean | null | undefined } -export const initialRenderingOptions: RenderingOptions = { - showPhotos: false, +export const initialDisplayOptions: displayOptions = { + showPhotos: undefined, } diff --git a/web/components/filters/filters.tsx b/web/components/filters/filters.tsx index 7bd989aa..a321e808 100644 --- a/web/components/filters/filters.tsx +++ b/web/components/filters/filters.tsx @@ -6,7 +6,7 @@ import {formatFilters, SKIPPED_FORMAT_FILTERS_KEYS} from 'common/filters-format' import {Gender} from 'common/gender' import {OptionTableKey} from 'common/profiles/constants' import {Profile} from 'common/profiles/profile' -import {RenderingOptions} from 'common/profiles-rendering' +import {displayOptions} from 'common/profiles-rendering' import {nullifyDictValues, removeNullOrUndefinedProps, sampleDictByPrefix} from 'common/util/object' import {ReactNode, useState} from 'react' import { @@ -199,8 +199,8 @@ function Filters(props: { raisedInLocationFilterProps: LocationFilterProps includeRelationshipFilters: boolean | undefined choices: Record> - renderingOptions: Partial - updateRenderingOptions: (newState: Partial) => void + displayOptions: Partial + updateDisplayOptions: (newState: Partial) => void }) { const t = useT() const { @@ -213,8 +213,8 @@ function Filters(props: { locationFilterProps, raisedInLocationFilterProps, includeRelationshipFilters, - renderingOptions, - updateRenderingOptions, + displayOptions, + updateDisplayOptions, choices, } = props @@ -743,17 +743,19 @@ function Filters(props: { +
+ {/* Rendering */} {/* Show Photos */} @@ -846,8 +848,8 @@ export function FiltersElement(props: { isYourFilters: boolean locationFilterProps: LocationFilterProps raisedInLocationFilterProps: LocationFilterProps - renderingOptions: Partial - updateRenderingOptions: (newState: Partial) => void + displayOptions: Partial + updateDisplayOptions: (newState: Partial) => void }) { const { filters, @@ -858,8 +860,8 @@ export function FiltersElement(props: { isYourFilters, locationFilterProps, raisedInLocationFilterProps, - renderingOptions, - updateRenderingOptions, + displayOptions, + updateDisplayOptions, } = props const youSeekingRelationship = youProfile?.pref_relation_styles?.includes('relationship') const {choices: interestChoices} = useChoices('interests') @@ -882,8 +884,8 @@ export function FiltersElement(props: { raisedInLocationFilterProps={raisedInLocationFilterProps} includeRelationshipFilters={youSeekingRelationship} choices={choices} - renderingOptions={renderingOptions} - updateRenderingOptions={updateRenderingOptions} + displayOptions={displayOptions} + updateDisplayOptions={updateDisplayOptions} /> ) } diff --git a/web/components/filters/show-photos-toggle.tsx b/web/components/filters/show-photos-toggle.tsx index 60d936bb..ddd663aa 100644 --- a/web/components/filters/show-photos-toggle.tsx +++ b/web/components/filters/show-photos-toggle.tsx @@ -1,18 +1,18 @@ import clsx from 'clsx' -import {RenderingOptions} from 'common/profiles-rendering' +import {displayOptions} from 'common/profiles-rendering' import {Row} from 'web/components/layout/row' import {useT} from 'web/lib/locale' export function ShowPhotosToggle(props: { - renderingOptions: Partial - updateRenderingOptions: (newState: Partial) => void + displayOptions: Partial + updateDisplayOptions: (newState: Partial) => void }) { - const {renderingOptions, updateRenderingOptions} = props + const {displayOptions, updateDisplayOptions} = props const t = useT() const label = t('filter.show_photos', 'Show profile pictures') - const on = renderingOptions.showPhotos ?? true + const on = displayOptions.showPhotos ?? true return ( @@ -22,7 +22,7 @@ export function ShowPhotosToggle(props: { className="border-ink-300 bg-canvas-0 dark:border-ink-500 text-primary-600 focus:ring-primary-500 h-4 w-4 rounded hover:bg-canvas-200 cursor-pointer" checked={on} onChange={(e: React.ChangeEvent) => - updateRenderingOptions({showPhotos: e.target.checked}) + updateDisplayOptions({showPhotos: e.target.checked}) } />