- {Array.from(coherenceLinks?.data ?? [], (link) => (
-
- ))}
-
- {Array.from(newLinks, (id) => (
-
- ))}
+ const inner = (
+
+
+ {Array.from(coherenceLinks?.data ?? [], (link) => (
+
+ ))}
-
- {(!coherenceLinks || coherenceLinks.data.length === 0) &&
- newLinks?.length === 0 && (
-
-
- {t("noQuestionsLinkedP2")}
-
-
- {t("noQuestionsLinkedP3")}
-
-
- {t("noQuestionsLinkedP1")}
-
-
- )}
+ {Array.from(newLinks, (id) => (
+
+ ))}
- {!user?.is_bot && (
-
- {t("linkQuestion")}
-
+
+ {(!coherenceLinks || coherenceLinks.data.length === 0) &&
+ newLinks?.length === 0 && (
+
+
+ {t("noQuestionsLinkedP2")}
+
+
+ {t("noQuestionsLinkedP3")}
+
+
+ {t("noQuestionsLinkedP1")}
+
+
)}
-
+
+ {!user?.is_bot && (
+
+ {t("linkQuestion")}
+
+ )}
-
+
+
+ );
+
+ if (hideToggle) {
+ return inner;
+ }
+
+ return (
+
+ {inner}
);
};
diff --git a/front_end/src/app/(main)/questions/components/forecaster_counter.tsx b/front_end/src/app/(main)/questions/components/forecaster_counter.tsx
index f115e76880..441a8c92e7 100644
--- a/front_end/src/app/(main)/questions/components/forecaster_counter.tsx
+++ b/front_end/src/app/(main)/questions/components/forecaster_counter.tsx
@@ -10,12 +10,14 @@ import { abbreviatedNumber } from "@/utils/formatters/number";
type Props = {
forecasters?: number;
compact?: boolean;
+ boldCount?: boolean;
className?: string;
};
const ForecastersCounter: FC
= ({
forecasters,
compact = false,
+ boldCount = false,
className,
}) => {
const t = useTranslations();
@@ -35,7 +37,7 @@ const ForecastersCounter: FC = ({
return (
@@ -45,11 +47,13 @@ const ForecastersCounter: FC
= ({
/>
{/* Compact version - just shows number */}
{compact && (
-
+
{forecastersFormatted}
)}
- {/* Full version - shows descriptive text */}
+ {/* Full version - shows descriptive text with label */}
{!compact && (
{(tags) => (
@@ -58,6 +62,12 @@ const ForecastersCounter: FC = ({
count: forecasters,
count_formatted: forecastersFormatted,
...tags,
+ strong: (chunks) =>
+ boldCount ? (
+ {chunks}
+ ) : (
+ chunks
+ ),
})}
)}
diff --git a/front_end/src/components/charts/group_chart.tsx b/front_end/src/components/charts/group_chart.tsx
index 72c1f40d88..3afafe7ae6 100644
--- a/front_end/src/components/charts/group_chart.tsx
+++ b/front_end/src/components/charts/group_chart.tsx
@@ -376,7 +376,7 @@ const GroupChart: FC = ({
setLocalCursorTimestamp(null);
}
},
- onMouseLeaveCapture: () => {
+ onMouseLeave: () => {
if (!onCursorChange) return;
inPlotRef.current = false;
setIsCursorActive(false);
@@ -454,7 +454,6 @@ const GroupChart: FC = ({
tickLabelComponent={
diff --git a/front_end/src/components/charts/multiple_choice_chart.tsx b/front_end/src/components/charts/multiple_choice_chart.tsx
index 368a668c35..4f75169002 100644
--- a/front_end/src/components/charts/multiple_choice_chart.tsx
+++ b/front_end/src/components/charts/multiple_choice_chart.tsx
@@ -51,9 +51,9 @@ import { scaleInternalLocation, unscaleNominalLocation } from "@/utils/math";
import ChartContainer from "./primitives/chart_container";
import ChartCursorLabel from "./primitives/chart_cursor_label";
+import SvgWrapper from "./primitives/svg_wrapper";
import XTickLabel from "./primitives/x_tick_label";
import ForecastAvailabilityChartOverflow from "../post_card/chart_overflow";
-import SvgWrapper from "./primitives/svg_wrapper";
import YTickLabel from "./primitives/y_tick_label";
type ColoredLinePoint = {
@@ -426,7 +426,6 @@ const MultipleChoiceChart: FC = ({
diff --git a/front_end/src/components/charts/numeric_chart.tsx b/front_end/src/components/charts/numeric_chart.tsx
index d8ccecc738..8b5bdc097c 100644
--- a/front_end/src/components/charts/numeric_chart.tsx
+++ b/front_end/src/components/charts/numeric_chart.tsx
@@ -663,7 +663,6 @@ const NumericChart: FC = ({
& {
chartWidth: number;
- withCursor?: boolean;
fontSize?: number;
dx?: number;
};
const XTickLabel: FC = ({
chartWidth,
- withCursor,
fontSize = 10,
dx = 0,
...props
@@ -20,18 +18,18 @@ const XTickLabel: FC = ({
const x = (props.x ?? 0) + dx;
- const overlapsRightEdge = withCursor
- ? x > chartWidth - estimatedTextWidth
- : x > chartWidth - 12;
-
- if (overlapsRightEdge) {
- return null;
+ let textAnchor: "start" | "middle" | "end" = "middle";
+ if (x - estimatedTextWidth < 0) {
+ textAnchor = "start";
+ } else if (x > chartWidth - estimatedTextWidth) {
+ textAnchor = "end";
}
return (
= ({
});
}
}, [questionLayout?.replyToCommentId, comment.id, questionLayout]);
+
+ useEffect(() => {
+ if (questionLayout?.scrollToCommentId === comment.id) {
+ questionLayout.clearScrollToComment();
+ requestAnimationFrame(() => {
+ commentRef.current?.scrollIntoView({
+ behavior: "smooth",
+ block: "center",
+ });
+ });
+ }
+ }, [questionLayout?.scrollToCommentId, comment.id, questionLayout]);
const [errorMessage, setErrorMessage] = useState();
const [commentMarkdown, setCommentMarkdown] = useState(comment.text);
const [tempCommentMarkdown, setTempCommentMarkdown] = useState("");
@@ -759,9 +772,10 @@ const Comment: FC = ({
})}
>
= ({
)}
·
@@ -950,6 +965,7 @@ const Comment: FC = ({
withUgcLinks
withTwitterPreview
withCodeBlocks
+ contentEditableClassName="text-base font-normal leading-6 [&_p]:!text-gray-700 dark:[&_p]:!text-gray-700-dark [&_ul]:!text-gray-700 dark:[&_ul]:!text-gray-700-dark [&_ol]:!text-gray-700 dark:[&_ol]:!text-gray-700-dark"
/>
)}
{commentKeyFactors.length > 0 &&
@@ -1061,7 +1077,17 @@ const Comment: FC = ({
0 && "pr-1.5 md:pr-2")}>
-
+
+
+
diff --git a/front_end/src/components/comment_feed/comment_card.tsx b/front_end/src/components/comment_feed/comment_card.tsx
index f335d38bb6..dc7edf43ff 100644
--- a/front_end/src/components/comment_feed/comment_card.tsx
+++ b/front_end/src/components/comment_feed/comment_card.tsx
@@ -108,16 +108,15 @@ const ExpandableCommentContent = ({
>
{/* Author info */}