From 016da2e8c0e7eb00f49feb9fbb349d9c03b4a6cf Mon Sep 17 00:00:00 2001 From: patak Date: Sun, 1 Jan 2023 20:15:51 +0100 Subject: [PATCH] feat: rework avatar on avatar (#676) --- components/status/StatusCard.vue | 24 +++++++++++------------- composables/featureFlags.ts | 2 -- locales/ar-EG.json | 1 - locales/cs-CZ.json | 1 - locales/de-DE.json | 1 - locales/en-GB.json | 1 - locales/en-US.json | 1 - locales/es-ES.json | 1 - locales/fr-FR.json | 1 - locales/zh-CN.json | 1 - locales/zh-TW.json | 1 - pages/settings/preferences/index.vue | 6 ------ 12 files changed, 11 insertions(+), 30 deletions(-) diff --git a/components/status/StatusCard.vue b/components/status/StatusCard.vue index 709769bc..e4d24a48 100644 --- a/components/status/StatusCard.vue +++ b/components/status/StatusCard.vue @@ -70,9 +70,7 @@ const filter = $computed(() => filterResult?.filter) const filterPhrase = $computed(() => filter?.phrase || (filter as any)?.title) const isFiltered = $computed(() => filterPhrase && (props.context ? filter?.context.includes(props.context) : false)) -const avatarOnAvatar = $(computedEager(() => useFeatureFlags().experimentalAvatarOnAvatar)) const collapseRebloggedBy = $computed(() => rebloggedBy?.id === status.account.id) -const showRebloggedByAvatarOnAvatar = $computed(() => rebloggedBy && avatarOnAvatar && rebloggedBy.id !== status.account.id) // Collapse ReplyingTo badge if it is a self-reply (thread) const collapseReplyingTo = $computed(() => (!rebloggedBy || collapseRebloggedBy) && status.inReplyToAccountId === status.account.id) @@ -90,7 +88,7 @@ const isDM = $computed(() => status.visibility === 'direct') v-if="filter?.filterAction !== 'hide'" :id="`status-${status.id}`" ref="el" - relative flex flex-col gap-1 px-4 pt-1 + relative flex flex-col gap-1 pl-3 pr-4 pt-1 class="pb-1.5" transition-100 :class="{ 'hover:bg-active': hover, 'border-t border-base': newer && !directReply }" @@ -102,25 +100,25 @@ const isDM = $computed(() => status.visibility === 'direct') >
-
-
- +
+
+
+ +
+
- +
-
-
- -
-
+
+
- +
diff --git a/composables/featureFlags.ts b/composables/featureFlags.ts index 50530772..d050f790 100644 --- a/composables/featureFlags.ts +++ b/composables/featureFlags.ts @@ -2,7 +2,6 @@ import { STORAGE_KEY_FEATURE_FLAGS } from '~/constants' export interface FeatureFlags { experimentalVirtualScroll: boolean - experimentalAvatarOnAvatar: boolean experimentalGitHubCards: boolean experimentalUserPicker: boolean } @@ -11,7 +10,6 @@ export type FeatureFlagsMap = Record export function getDefaultFeatureFlags(): FeatureFlags { return { experimentalVirtualScroll: false, - experimentalAvatarOnAvatar: true, experimentalGitHubCards: true, experimentalUserPicker: true, } diff --git a/locales/ar-EG.json b/locales/ar-EG.json index 50fc66ec..fc2c2df2 100644 --- a/locales/ar-EG.json +++ b/locales/ar-EG.json @@ -217,7 +217,6 @@ "label": "بشأن Elk" }, "feature_flags": { - "avatar_on_avatar": "الصورة الرمزية على الصورة الرمزية", "github_cards": "GitHub بطاقات", "title": "الميزات التجريبية", "user_picker": "الشريط الجانبي لمبدل المستخدم", diff --git a/locales/cs-CZ.json b/locales/cs-CZ.json index c08d142c..8b22bee0 100644 --- a/locales/cs-CZ.json +++ b/locales/cs-CZ.json @@ -146,7 +146,6 @@ }, "settings": { "feature_flags": { - "avatar_on_avatar": "Avatar on Avatar", "github_cards": "GitHub Cards", "user_picker": "User Picker", "virtual_scroll": "Virtual Scrolling" diff --git a/locales/de-DE.json b/locales/de-DE.json index d81c1982..aa5a9c5b 100644 --- a/locales/de-DE.json +++ b/locales/de-DE.json @@ -149,7 +149,6 @@ }, "settings": { "feature_flags": { - "avatar_on_avatar": "Avatar auf Avatar", "github_cards": "GitHub Cards", "user_picker": "User Picker", "virtual_scroll": "Virtuelles Scrollen" diff --git a/locales/en-GB.json b/locales/en-GB.json index 6d12eb31..6fb81121 100644 --- a/locales/en-GB.json +++ b/locales/en-GB.json @@ -217,7 +217,6 @@ "label": "About" }, "feature_flags": { - "avatar_on_avatar": "Avatar on Avatar", "github_cards": "GitHub Cards", "title": "Experimental Features", "user_picker": "User Picker", diff --git a/locales/en-US.json b/locales/en-US.json index d6f90a7e..10fdb626 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -217,7 +217,6 @@ "label": "About" }, "feature_flags": { - "avatar_on_avatar": "Avatar on Avatar", "github_cards": "GitHub Cards", "title": "Experimental Features", "user_picker": "User Picker", diff --git a/locales/es-ES.json b/locales/es-ES.json index 8dbf9e34..32dc8e92 100644 --- a/locales/es-ES.json +++ b/locales/es-ES.json @@ -209,7 +209,6 @@ "label": "Acerca de" }, "feature_flags": { - "avatar_on_avatar": "Avatar en Avatar", "github_cards": "Tarjetas GitHub", "title": "Características experimentales", "user_picker": "Selector de usuarios", diff --git a/locales/fr-FR.json b/locales/fr-FR.json index f251635b..ccf81249 100644 --- a/locales/fr-FR.json +++ b/locales/fr-FR.json @@ -206,7 +206,6 @@ }, "settings": { "feature_flags": { - "avatar_on_avatar": "Avatar sur avatar", "github_cards": "GitHub Cards", "user_picker": "User Picker", "virtual_scroll": "Défilement virtuel" diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 3ae8e74f..71166b0e 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -217,7 +217,6 @@ "label": "关于" }, "feature_flags": { - "avatar_on_avatar": "头像堆叠", "github_cards": "GitHub 卡片", "title": "实验功能", "user_picker": "用户选择器", diff --git a/locales/zh-TW.json b/locales/zh-TW.json index 8124562f..a1193ffa 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -217,7 +217,6 @@ "label": "關於" }, "feature_flags": { - "avatar_on_avatar": "頭像堆疊", "github_cards": "GitHub 卡片", "title": "實驗功能", "user_picker": "用戶選擇器", diff --git a/pages/settings/preferences/index.vue b/pages/settings/preferences/index.vue index 988706e4..4a095090 100644 --- a/pages/settings/preferences/index.vue +++ b/pages/settings/preferences/index.vue @@ -15,12 +15,6 @@ > {{ $t('settings.feature_flags.virtual_scroll') }} - - {{ $t('settings.feature_flags.avatar_on_avatar') }} -