Skip to content

Commit 4aa477e

Browse files
committed
feat: update status for resolved
1 parent 46c7fb2 commit 4aa477e

8 files changed

Lines changed: 39 additions & 29 deletions

File tree

front_end/messages/cs.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,10 +1933,6 @@
19331933
"launchATournament": "Spusťte turnaj",
19341934
"allCategoriesTopQuestions": "Nejlepší otázky v každé kategorii",
19351935
"feedTileSummary": "Souhrn na dlaždici kanálu",
1936-
"viewComment": "View comment",
1937-
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
1938-
"createdTimeAgo": "Created {timeAgo}",
1939-
"direction": "Směr",
19401936
"feedTileSummaryPlaceholder": "Volitelně: Zadejte vlastní text souhrnu, který se zobrazí na dlaždicích kanálu (pokud není poskytnut, souhrn bude automaticky vygenerován z obsahu notebooku)",
19411937
"includeBotsInAggregatesLabel": "Zahrnout boty do agregátů",
19421938
"includeBotsInAggregatesExplanation": "Pokud je povoleno, předpovědi botů budou zahrnuty do agregovaných výpočtů pro tuto otázku a ovlivní skórování. Jinak nebudou mít žádný vliv.",
@@ -2072,9 +2068,14 @@
20722068
"failedToLoadAggregation": "Nepodařilo se načíst agregaci",
20732069
"questionFallbackLabel": "Otázka {id}",
20742070
"openInAggregationExplorer": "Otevřít v Průzkumníku agregací",
2071+
"viewComment": "View comment",
2072+
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
2073+
"createdTimeAgo": "Created {timeAgo}",
2074+
"direction": "Směr",
20752075
"voteOnImpact": "HLASOVAT O DOPADU",
20762076
"why": "WHY?",
20772077
"wrongDirection": "Wrong direction",
20782078
"redundant": "Redundant",
2079-
"thanksForVoting": "Thanks for voting!", "thousandsOfOpenQuestions": "20 000+ otevřených otázek"
2079+
"thanksForVoting": "Thanks for voting!",
2080+
"thousandsOfOpenQuestions": "20 000+ otevřených otázek"
20802081
}

front_end/messages/es.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,10 +1933,6 @@
19331933
"periodSeconds": "{count, plural, one {# segundo} other {# segundos}}",
19341934
"choicesLockedHelp": "Las opciones solo se pueden cambiar a través del panel de administración una vez que haya comenzado la previsión.",
19351935
"feedTileSummary": "Resumen del Mosaico de Noticias",
1936-
"viewComment": "View comment",
1937-
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
1938-
"createdTimeAgo": "Created {timeAgo}",
1939-
"direction": "Dirección",
19401936
"feedTileSummaryPlaceholder": "Opcional: Ingrese un texto de resumen personalizado para mostrar en los mosaicos de noticias (si no se proporciona, se generará automáticamente un resumen a partir del contenido del cuaderno)",
19411937
"includeBotsInAggregatesLabel": "Incluir Bots en los Agregados",
19421938
"includeBotsInAggregatesExplanation": "Cuando está habilitado, las previsiones de bots se incluirán en los cálculos agregados para esta pregunta y afectarán la puntuación. De lo contrario, no afectarán en absoluto.",
@@ -2072,9 +2068,14 @@
20722068
"failedToLoadAggregation": "No se pudo cargar la agregación",
20732069
"questionFallbackLabel": "Pregunta {id}",
20742070
"openInAggregationExplorer": "Abrir en el Explorador de Agregación",
2071+
"viewComment": "View comment",
2072+
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
2073+
"createdTimeAgo": "Created {timeAgo}",
2074+
"direction": "Dirección",
20752075
"voteOnImpact": "VOTAR SOBRE EL IMPACTO",
20762076
"why": "WHY?",
20772077
"wrongDirection": "Wrong direction",
20782078
"redundant": "Redundant",
2079-
"thanksForVoting": "Thanks for voting!", "thousandsOfOpenQuestions": "20,000+ preguntas abiertas"
2079+
"thanksForVoting": "Thanks for voting!",
2080+
"thousandsOfOpenQuestions": "20,000+ preguntas abiertas"
20802081
}

front_end/messages/pt.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,10 +1931,6 @@
19311931
"periodSeconds": "{count, plural, one {# segundo} other {# segundos}}",
19321932
"choicesLockedHelp": "As opções só podem ser alteradas através do painel de administração uma vez iniciado o processo de previsão.",
19331933
"feedTileSummary": "Resumo do Bloco de Feed",
1934-
"viewComment": "View comment",
1935-
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
1936-
"createdTimeAgo": "Created {timeAgo}",
1937-
"direction": "Direção",
19381934
"feedTileSummaryPlaceholder": "Opcional: Insira um texto de resumo personalizado para exibir nos blocos de feed (se não for fornecido, um resumo será gerado automaticamente a partir do conteúdo do caderno)",
19391935
"includeBotsInAggregatesLabel": "Incluir Bots nos Agregados",
19401936
"includeBotsInAggregatesExplanation": "Quando ativado, previsões de bots serão incluídas nos cálculos agregados para esta pergunta e afetarão a pontuação. Caso contrário, elas não afetarão.",
@@ -2070,9 +2066,14 @@
20702066
"failedToLoadAggregation": "Falha ao carregar agregação",
20712067
"questionFallbackLabel": "Pergunta {id}",
20722068
"openInAggregationExplorer": "Abrir no Explorador de Agregações",
2069+
"viewComment": "View comment",
2070+
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
2071+
"createdTimeAgo": "Created {timeAgo}",
2072+
"direction": "Direção",
20732073
"voteOnImpact": "VOTAR NO IMPACTO",
20742074
"why": "WHY?",
20752075
"wrongDirection": "Wrong direction",
20762076
"redundant": "Redundant",
2077-
"thanksForVoting": "Thanks for voting!", "thousandsOfOpenQuestions": "20.000+ perguntas abertas"
2077+
"thanksForVoting": "Thanks for voting!",
2078+
"thousandsOfOpenQuestions": "20.000+ perguntas abertas"
20782079
}

front_end/messages/zh-TW.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,10 +1930,6 @@
19301930
"periodSeconds": "{count, plural, one {# 秒} other {# 秒}}",
19311931
"choicesLockedHelp": "一旦預測開始後,選項只能透過管理平台進行更改。",
19321932
"feedTileSummary": "Feed 磁貼摘要",
1933-
"viewComment": "View comment",
1934-
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
1935-
"createdTimeAgo": "Created {timeAgo}",
1936-
"direction": "方向",
19371933
"feedTileSummaryPlaceholder": "選擇性:輸入自訂摘要文字以顯示在Feed磁貼上(如果未提供,將從筆記本內容自動生成摘要)",
19381934
"includeBotsInAggregatesLabel": "在總體中包括機器人",
19391935
"includeBotsInAggregatesExplanation": "啟用後,機器人預測將包含在此問題的總體計算中,並影響評分。否則,則不會影響。",
@@ -2069,9 +2065,14 @@
20692065
"failedToLoadAggregation": "載入聚合失敗",
20702066
"questionFallbackLabel": "問題 {id}",
20712067
"openInAggregationExplorer": "在聚合探索器中開啟",
2068+
"viewComment": "View comment",
2069+
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
2070+
"createdTimeAgo": "Created {timeAgo}",
2071+
"direction": "方向",
20722072
"voteOnImpact": "影響投票",
20732073
"why": "WHY?",
20742074
"wrongDirection": "Wrong direction",
20752075
"redundant": "Redundant",
2076-
"thanksForVoting": "Thanks for voting!", "thousandsOfOpenQuestions": "20,000+ 開放問題"
2076+
"thanksForVoting": "Thanks for voting!",
2077+
"thousandsOfOpenQuestions": "20,000+ 開放問題"
20772078
}

front_end/messages/zh.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,10 +1935,6 @@
19351935
"periodSeconds": "{count, plural, one {# 秒} other {# 秒}}",
19361936
"choicesLockedHelp": "选项一旦预测开始,只能通过管理面板进行更改。",
19371937
"feedTileSummary": "动态提要摘要",
1938-
"viewComment": "View comment",
1939-
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
1940-
"createdTimeAgo": "Created {timeAgo}",
1941-
"direction": "方向",
19421938
"feedTileSummaryPlaceholder": "可选:输入自定义摘要文本以显示在动态提要上(如果未提供,将根据笔记本内容自动生成摘要)",
19431939
"includeBotsInAggregatesLabel": "在汇总中包含机器人",
19441940
"includeBotsInAggregatesExplanation": "启用时,机器人预测将包含在此问题的汇总计算中,并将影响评分。否则,它们不会产生影响。",
@@ -2074,9 +2070,14 @@
20742070
"failedToLoadAggregation": "无法加载聚合",
20752071
"questionFallbackLabel": "问题 {id}",
20762072
"openInAggregationExplorer": "在聚合探索器中打开",
2073+
"viewComment": "View comment",
2074+
"createdTimeAgoBy": "Created {timeAgo} by @{author}",
2075+
"createdTimeAgo": "Created {timeAgo}",
2076+
"direction": "方向",
20772077
"voteOnImpact": "影响投票",
20782078
"why": "WHY?",
20792079
"wrongDirection": "Wrong direction",
20802080
"redundant": "Redundant",
2081-
"thanksForVoting": "Thanks for voting!", "thousandsOfOpenQuestions": "20,000+ 开放问题"
2081+
"thanksForVoting": "Thanks for voting!",
2082+
"thousandsOfOpenQuestions": "20,000+ 开放问题"
20822083
}

front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_consumer_section.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { FC } from "react";
55

66
import { useCommentsFeed } from "@/app/(main)/components/comments_feed_provider";
77
import { openKeyFactorsSectionAndScrollTo } from "@/app/(main)/questions/[id]/components/key_factors/utils";
8-
import { PostWithForecasts } from "@/types/post";
8+
import { PostStatus, PostWithForecasts } from "@/types/post";
99
import { sendAnalyticsEvent } from "@/utils/analytics";
1010

1111
import KeyFactorsConsumerCarousel from "./key_factors_consumer_carousel";
@@ -33,6 +33,8 @@ const KeyFactorsQuestionConsumerSection: FC<Props> = ({ post }) => {
3333

3434
if (shouldHideKeyFactors) return null;
3535

36+
if (post.status === PostStatus.RESOLVED) return null;
37+
3638
const openKeyFactorsElement = (selector: string) => {
3739
requestKeyFactorsExpand?.();
3840
openKeyFactorsSectionAndScrollTo({ selector, mobileOnly: false });

front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_section.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ const KeyFactorsQuestionSection: FC<KeyFactorsQuestionSectionProps> = ({
9494
const sectionTitle =
9595
totalCount > 0 ? `${t("keyFactors")} (${totalCount})` : t("keyFactors");
9696

97-
const shouldDefaultOpen = !isFlow || totalCount > 0;
97+
const isResolved = postStatus === PostStatus.RESOLVED;
98+
const shouldDefaultOpen = !isResolved && (!isFlow || totalCount > 0);
9899

99100
return (
100101
<SectionToggle

front_end/src/app/(main)/questions/[id]/components/key_factors/questions_feed_view/key_factors_tile_view.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { CoherenceLinksContext } from "@/app/(main)/components/coherence_links_p
1212
import ClientPostsApi from "@/services/api/posts/posts.client";
1313
import type { FetchedAggregateCoherenceLink } from "@/types/coherence";
1414
import type { KeyFactor } from "@/types/comment";
15-
import type { PostWithForecasts } from "@/types/post";
15+
import { PostStatus, type PostWithForecasts } from "@/types/post";
1616
import {
1717
AggregationMethod,
1818
Question,
@@ -33,7 +33,7 @@ import { useShouldHideKeyFactors } from "../use_should_hide_key_factors";
3333
import { isDisplayableQuestionLink } from "../utils";
3434

3535
type Props = {
36-
post: Pick<PostWithForecasts, "id" | "key_factors">;
36+
post: Pick<PostWithForecasts, "id" | "key_factors" | "status">;
3737
maxItems?: number;
3838
className?: string;
3939
};
@@ -214,6 +214,8 @@ const KeyFactorsTileView: React.FC<Props> = ({
214214

215215
if (shouldHideKeyFactors) return null;
216216

217+
if (post.status === PostStatus.RESOLVED) return null;
218+
217219
if (items.length === 0 && !questionLinkDisplay) return null;
218220

219221
return (

0 commit comments

Comments
 (0)