diff --git a/affordances/officer/core/links-open-a-new-tab.md b/affordances/officer/core/links-open-a-new-tab.md new file mode 100644 index 0000000..e8b493a --- /dev/null +++ b/affordances/officer/core/links-open-a-new-tab.md @@ -0,0 +1,22 @@ +--- +name: Links open a new tab +description: Use when your reply contains a link, or a path inside Officer you are tempted to link. +version: 1 +--- + +**Every link in chat opens in a new tab.** `target="_blank"` is applied to all of them, and there is no +form of link that does not get it. + +For an external URL that is what anyone wants. For a path inside Officer it is worth knowing before you +write one: `[the browser panel](/browser)` does not navigate the app, it loads a second copy of the whole +SPA in a new tab. The person ends up with two Officers open and their place lost in the first. + +So: + +- **A route the user should go to** — name it, do not link it. `/browser`, in backticks. They are already + in the app; telling them where is enough, and they keep the tab they are in. +- **Something genuinely separate** — a repository, a doc, a page on another host — link it. A new tab is + the right outcome and this needs no thought. + +The same applies to an image: `![](https://…)` renders inline, but a bare link to an image is still a +link, and still opens a tab.