Skip to content

v2 Localization#218

Merged
tenkus47 merged 5 commits into
devfrom
localization
Jun 8, 2026
Merged

v2 Localization#218
tenkus47 merged 5 commits into
devfrom
localization

Conversation

@tenkus47

@tenkus47 tenkus47 commented Jun 8, 2026

Copy link
Copy Markdown
Member

No description provided.

harshal-2304 and others added 5 commits June 3, 2026 12:42
Author groups — CMS UI, invites, notifications, and permissions
- Introduced new types for title search response and text search items in searchApi.ts.
- Updated searchTitles function to validate title length before making API calls.
- Refactored MobileView component to conditionally render based on plan publication status and improved iframe integration.
- Enhanced SourceSelectorSheet to enforce minimum title search length and provide user feedback for insufficient input.
- Refactored fetchTextDetails function in searchApi.ts to encapsulate query parameters within a params object for improved clarity and maintainability.
… related components

- Enhanced the formatting of the searchTitles function in searchApi.ts for better readability.
- Adjusted the Chinese language label in dashboardTableUi.tsx for consistent indentation.
- Updated MobilePreviewSplitDivider.tsx to streamline button attributes.
- Refactored SourceSelectorSheet.tsx to improve the clarity of the sources memoization logic.
@tenkus47 tenkus47 merged commit a730b94 into dev Jun 8, 2026
6 checks passed
@tenkus47 tenkus47 deleted the localization branch June 8, 2026 06:18
@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown

Confidence Score: 3/5

Safe to merge for non-published plans; published-plan users will always open with the mobile preview collapsed and must manually reveal it on every page load.

The showMobilePreview useEffect fires during the loading phase when isPlanPublished is still false, locking the preview as hidden. When data resolves and the plan is published, the effect no longer corrects the state. This silently breaks the expected default-open behaviour for every published plan visit.

PlanDetailsPage.tsx — the showMobilePreview initialisation and its controlling useEffect need attention.

Reviews (1): Last reviewed commit: "refactor(api): improve formatting and re..." | Re-trigger Greptile

Comment on lines +94 to +98
useEffect(() => {
if (!isPlanPublished) {
setShowMobilePreview(false);
}
}, [isPlanPublished]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Mobile preview always starts hidden for published plans

On the first render planDetails is still loading, so isPlanPublished evaluates to false. The effect immediately fires and sets showMobilePreview to false. When the query resolves and isPlanPublished flips to true, the if (!isPlanPublished) branch is skipped — leaving showMobilePreview permanently false. Every visit to a published plan will therefore open with the preview hidden, contradicting the useState(true) intent and forcing users to manually reveal it every time.

Comment on lines +182 to +185
<p>Keep typing to search</p>
<span className="dark:text-[#b1b1b1] text-gray-600">
Enter at least {MIN_TITLE_SEARCH_LENGTH} characters to search titles
</span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 These two strings are hardcoded in English. The file already imports useTranslate and uses t() elsewhere (e.g. t("common.placeholder.search")), so they should go through the translation pipeline — especially in a localization PR.

Suggested change
<p>Keep typing to search</p>
<span className="dark:text-[#b1b1b1] text-gray-600">
Enter at least {MIN_TITLE_SEARCH_LENGTH} characters to search titles
</span>
<p>{t("sourceSelector.keepTyping")}</p>
<span className="dark:text-[#b1b1b1] text-gray-600">
{t("sourceSelector.minCharsHint", { count: MIN_TITLE_SEARCH_LENGTH })}
</span>

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants