-
-
Notifications
You must be signed in to change notification settings - Fork 332
fix: open import translations help links in new tab #3349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis change updates help icon styling and external link handling in the ImportSettingsPanel component. Documentation links now open in new tabs with security attributes, an inner Box wrapper is removed for cleaner markup, and a new custom help icon is added to the createNewKeys checkbox. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
webapp/src/views/projects/import/component/ImportSettingsPanel.tsx (1)
113-119: External help links: new‑tab behavior and security attributes look goodUsing
target="_blank"together withrel="noreferrer noopener"on the two DOCS links is correct and consistent, and the sharedStyledLinkkeeps icon sizing uniform. As an optional follow‑up, consider adding an accessible name (aria-labelortitle) on these icon‑only anchors so screen readers can announce what each help link does.Also applies to: 133-139
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
webapp/src/views/projects/import/component/ImportSettingsPanel.tsx(3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
webapp/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
webapp/**/*.{ts,tsx}: Use TypeScript path aliases (tg.component/, tg.service/, tg.hooks/, tg.views/, tg.globalContext/*) instead of relative imports
After backend API changes, regenerate TypeScript types by runningnpm run schema(andnpm run billing-schemaif applicable) in the webapp directory
Use typed React Query hooks fromuseQueryApi.tsfor API communication, not raw React Query
Use Tolgee-specific hooksuseReportEventanduseReportOncefrom 'tg.hooks/useReportEvent' for business event tracking and analytics
Files:
webapp/src/views/projects/import/component/ImportSettingsPanel.tsx
webapp/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Always use
data-cyattributes for E2E test selectors, never rely on text content
Files:
webapp/src/views/projects/import/component/ImportSettingsPanel.tsx
**/*.{ts,tsx,js,jsx,kt,kts}
⚙️ CodeRabbit configuration file
As part of review, please check if the file follows 'The Stepdown Rule': The most important, high-level concepts should be at the top (like a newspaper headline and opening paragraph). Details should increase as you read downward. Functions should be ordered so that a caller appears before the functions it calls. When working with JavaScript components, we allow the main component to live at the bottom of the file as an exception to the rule.
Files:
webapp/src/views/projects/import/component/ImportSettingsPanel.tsx
| customHelpIcon={ | ||
| <StyledLink> | ||
| <HelpCircle className="icon" /> | ||
| </StyledLink> | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-interactive help icon wrapped in StyledLink may be misleading
Here StyledLink is used without an href, so this third help icon looks like the other clickable help icons but isn’t actually a link. That’s likely to confuse users and is a bit odd semantically for an anchor.
Consider either:
- Wiring it up to a real docs URL with the same
target/relpattern once available, or - Making it clearly decorative (e.g., wrap the icon in a non-anchor container like
Boxorspan, and mark itaria-hidden).
This will keep the UI behavior consistent with the other help icons and avoid a “dead” control.
Open the help icons beside the checkboxes in import translations page in a new tab. Also make them all of equal size.
Summary by CodeRabbit
Bug Fixes
UI Improvements
✏️ Tip: You can customize this high-level summary in your review settings.