feat(course-outline): open component editors in new tabs via right-click#80
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the course outline unit card to support right-click "Open in new tab" functionality for component editors. The main change replaces the IconButtonWithTooltip edit button with a native <a> tag wrapped in OverlayTrigger/Tooltip, and makes the component name a link as well, while preserving modal-based editing for regular left-clicks.
Changes:
UnitCard.tsx: AddedgetComponentEditorUrl()helper; replaced editIconButtonWithTooltipwith native<a>anchor; made component name a link for right-click support; repositionedisClickable,onClick,onKeyDownpropsUnitCard.test.tsx: Added test suite for component editor link behavior (href verification and click behavior)UnitCard.scss: Updated CSS selector to match<a>tag instead of<span>, and added styles for the new anchor-based name link and edit button
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/course-outline/unit-card/UnitCard.tsx |
Adds getComponentEditorUrl, replaces IconButtonWithTooltip with <a> tag for right-click support, makes component name a link |
src/course-outline/unit-card/UnitCard.test.tsx |
Adds tests for the new component editor link behavior |
src/course-outline/unit-card/UnitCard.scss |
Updates CSS selectors to target <a> elements and adds hover/focus styles for new anchors |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2a9d6cf to
a719e32
Compare
a719e32 to
435602a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
435602a to
570a4fa
Compare
Description
Added ability to open components in a new tab.
Jira ticket
TNL2-532
Screen recording
Screen.Recording.2026-03-09.at.3.46.08.PM.mov
Testing instructions