Skip to content

Commit

Permalink
セグメント関連のコンポーネント名を更新し、VoteButtonを新しいセクションに移動しました。また、不要なsourceTextAndTr…
Browse files Browse the repository at this point in the history
…anslationSectionを削除しました。 (#539)
  • Loading branch information
ttizze authored Jan 28, 2025
2 parents 59a7620 + 91c021a commit f650234
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web/app/routes/$locale+/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { supportedLocaleOptions } from "~/constants/languages";
import i18nServer from "~/i18n.server";
import { fetchPaginatedPublicPagesWithInfo } from "~/routes/$locale+/functions/queries.server";
import type { PageCardLocalizedType } from "~/routes/$locale+/functions/queries.server";
import { SegmentAndTranslationSection } from "~/routes/$locale+/user.$handle+/page+/$slug+/components/sourceTextAndTranslationSection/SegmentAndTranslationSection";
import { SegmentAndTranslationSection } from "~/routes/$locale+/user.$handle+/page+/$slug+/components/segmentAndTranslationSection/SegmentAndTranslationSection";
import { fetchPageWithTranslations } from "~/routes/$locale+/user.$handle+/page+/$slug+/functions/queries.server";
import { AddTranslationFormIntent } from "~/routes/resources+/add-translation-form/route";
import { VoteIntent } from "~/routes/resources+/vote-buttons";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AddTranslationFormIntent } from "~/routes/resources+/add-translation-fo
import { VoteIntent } from "~/routes/resources+/vote-buttons";
import type { PageWithTranslations, SegmentWithTranslations } from "../types";
import { MemoizedParsedContent } from "./ParsedContent";
import { SegmentAndTranslationSection } from "./sourceTextAndTranslationSection/SegmentAndTranslationSection";
import { SegmentAndTranslationSection } from "./segmentAndTranslationSection/SegmentAndTranslationSection";
import { TranslateActionSection } from "./translateButton/TranslateActionSection";

interface ContentWithTranslationsProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { memo } from "react";
import type { AddTranslationFormIntent } from "~/routes/resources+/add-translation-form/route";
import type { VoteIntent } from "~/routes/resources+/vote-buttons";
import type { SegmentWithTranslations } from "../types";
import { SegmentAndTranslationSection } from "./sourceTextAndTranslationSection/SegmentAndTranslationSection";
import { SegmentAndTranslationSection } from "./segmentAndTranslationSection/SegmentAndTranslationSection";

interface ParsedContentProps {
html: string;
Expand Down
2 changes: 1 addition & 1 deletion web/app/routes/resources+/vote-buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ActionFunctionArgs } from "@remix-run/node";
import { useFetcher } from "@remix-run/react";
import { memo, useMemo } from "react";
import { z } from "zod";
import { VoteButton } from "~/routes/$locale+/user.$handle+/page+/$slug+/components/sourceTextAndTranslationSection/VoteButton";
import { VoteButton } from "~/routes/$locale+/user.$handle+/page+/$slug+/components/segmentAndTranslationSection/VoteButton";
import type { SegmentTranslationWithVote } from "~/routes/$locale+/user.$handle+/page+/$slug+/types";
import { authenticator } from "~/utils/auth.server";
import { cn } from "~/utils/cn";
Expand Down
2 changes: 1 addition & 1 deletion web/scripts/processMarkdownContent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This is another test.
expect(sortedTexts[1].textAndOccurrenceHash).not.toBeNull();
});

test("should retain sourceTextId after minor edit", async () => {
test("should retain segmentId after minor edit", async () => {
const pageSlug = "test-page-edit";
const title = "Title";
const originalMarkdown = `# Title
Expand Down

0 comments on commit f650234

Please sign in to comment.