Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

chore: fix https for various urls (#4474)

Myles Scolnickfb043be84c4e
diff --git a/biome.json b/biome.json
index 57d3a28510..f31109b050 100644
--- a/biome.json
+++ b/biome.json
@@ -22,6 +22,7 @@
"a11y": {
"noAutofocus": "off",
"noSvgWithoutTitle": "info",
+ "noBlankTarget": "off",
"useButtonType": "info",
"useIframeTitle": "info",
"useKeyWithClickEvents": "off",
diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs
index 948e55353b..d3c212217e 100644
--- a/frontend/.eslintrc.cjs
+++ b/frontend/.eslintrc.cjs
@@ -62,6 +62,7 @@ module.exports = {
"ssr-friendly/no-dom-globals-in-constructor": "off",
"react/prop-types": "off",
"react/no-unescaped-entities": "off",
+ "react/jsx-no-target-blank": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
"@typescript-eslint/ban-types": [
diff --git a/frontend/src/components/app-config/app-config-form.tsx b/frontend/src/components/app-config/app-config-form.tsx
index 027acc40f2..cef2596988 100644
--- a/frontend/src/components/app-config/app-config-form.tsx
+++ b/frontend/src/components/app-config/app-config-form.tsx
@@ -212,7 +212,7 @@ export const AppConfigForm: React.FC = () => {
The Python type returned by a SQL cell. For best performance
with large datasets, we recommend using{" "}
<Kbd className="inline">native</Kbd>. See the{" "}
- <ExternalLink href="http://docs.marimo.io/guides/working_with_data/sql">
+ <ExternalLink href="https://docs.marimo.io/guides/working_with_data/sql">
SQL guide
</ExternalLink>{" "}
for more information.
diff --git a/frontend/src/components/app-config/user-config-form.tsx b/frontend/src/components/app-config/user-config-form.tsx
index 7897d9b30c..6388a4d75a 100644
--- a/frontend/src/components/app-config/user-config-form.tsx
+++ b/frontend/src/components/app-config/user-config-form.tsx
@@ -43,6 +43,7 @@ import {
FlaskConicalIcon,
FolderCog2,
} from "lucide-react";
+import { ExternalLink } from "../ui/links";
import { cn } from "@/utils/cn";
import { KNOWN_AI_MODELS } from "./constants";
import { Textarea } from "../ui/textarea";
@@ -138,14 +139,9 @@ export const UserConfigForm: React.FC = () => {
<>
<p className="text-sm text-muted-secondary">
To get a Codeium API key, follow{" "}
- <a
- className="text-link hover:underline"
- href="https://docs.marimo.io/guides/editor_features/ai_completion.html#codeium-copilot"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.marimo.io/guides/editor_features/ai_completion.html#codeium-copilot">
these instructions
- </a>
+ </ExternalLink>
.
</p>
<FormField
@@ -439,14 +435,9 @@ export const UserConfigForm: React.FC = () => {
Beta
</Badge>
Python Language Server (
- <a
- href="https://github.com/python-lsp/python-lsp-server"
- target="_blank"
- className="text-link hover:underline"
- rel="noreferrer"
- >
+ <ExternalLink href="https://github.com/python-lsp/python-lsp-server">
pylsp
- </a>
+ </ExternalLink>
)
</FormLabel>
<FormControl>
@@ -469,14 +460,9 @@ export const UserConfigForm: React.FC = () => {
/>
<FormDescription>
See the{" "}
- <a
- className="text-link hover:underline"
- href="https://docs.marimo.io/guides/editor_features/language_server/"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.marimo.io/guides/editor_features/language_server/">
docs
- </a>{" "}
+ </ExternalLink>{" "}
for more information about language server support.
</FormDescription>
@@ -776,26 +762,16 @@ export const UserConfigForm: React.FC = () => {
When marimo comes across a module that is not installed, you
will be prompted to install it using your preferred package
manager. Learn more in the{" "}
- <a
- className="text-link hover:underline"
- href="https://docs.marimo.io/guides/editor_features/package_management.html"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.marimo.io/guides/editor_features/package_management.html">
docs
- </a>
+ </ExternalLink>
.
<br />
<br />
Running marimo in a{" "}
- <a
- className="text-link hover:underline"
- href="https://docs.marimo.io/guides/editor_features/package_management.html#running-marimo-in-a-sandbox-environment-uv-only"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.marimo.io/guides/editor_features/package_management.html#running-marimo-in-a-sandbox-environment-uv-only">
sandboxed environment
- </a>{" "}
+ </ExternalLink>{" "}
is only supported by <Kbd className="inline">uv</Kbd>
</FormDescription>
</div>
@@ -948,14 +924,9 @@ export const UserConfigForm: React.FC = () => {
<FormDescription>
Learn more in the{" "}
- <a
- className="text-link hover:underline"
- href="https://docs.marimo.io/guides/reactivity/#configuring-how-marimo-runs-cells"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.marimo.io/guides/reactivity/#configuring-how-marimo-runs-cells">
docs
- </a>
+ </ExternalLink>
.
</FormDescription>
</SettingGroup>
@@ -1048,14 +1019,9 @@ export const UserConfigForm: React.FC = () => {
</FormItem>
<FormDescription>
Your OpenAI API key from{" "}
- <a
- className="text-link hover:underline"
- href="https://platform.openai.com/account/api-keys"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://platform.openai.com/account/api-keys">
platform.openai.com
- </a>
+ </ExternalLink>
.
</FormDescription>
</div>
@@ -1092,14 +1058,9 @@ export const UserConfigForm: React.FC = () => {
</FormItem>
<FormDescription>
Your Anthropic API key from{" "}
- <a
- className="text-link hover:underline"
- href="https://console.anthropic.com/settings/keys"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://console.anthropic.com/settings/keys">
console.anthropic.com
- </a>
+ </ExternalLink>
.
</FormDescription>
</div>
@@ -1136,14 +1097,9 @@ export const UserConfigForm: React.FC = () => {
</FormItem>
<FormDescription>
Your Google AI API key from{" "}
- <a
- className="text-link hover:underline"
- href="https://aistudio.google.com/app/apikey"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://aistudio.google.com/app/apikey">
aistudio.google.com
- </a>
+ </ExternalLink>
.
</FormDescription>
</div>
@@ -1155,14 +1111,9 @@ export const UserConfigForm: React.FC = () => {
<p className="text-sm text-muted-secondary">
Add an API key to <Kbd className="inline">marimo.toml</Kbd> to
activate marimo's AI assistant; see{" "}
- <a
- className="text-link hover:underline"
- href="https://docs.marimo.io/guides/editor_features/ai_completion.html"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.marimo.io/guides/editor_features/ai_completion.html">
docs
- </a>{" "}
+ </ExternalLink>{" "}
for more info.
</p>
<FormField
@@ -1318,14 +1269,9 @@ export const UserConfigForm: React.FC = () => {
Enable experimental LSP support. You will need to have
<Kbd className="inline">marimo[lsp]</Kbd> installed in your
environment to use this. See{" "}
- <a
- className="text-link hover:underline"
- href="https://docs.marimo.io/guides/editor_features/language_server/"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.marimo.io/guides/editor_features/language_server/">
docs
- </a>{" "}
+ </ExternalLink>{" "}
for more info.
</FormDescription>
</div>
diff --git a/frontend/src/components/editor/boundary/ErrorBoundary.tsx b/frontend/src/components/editor/boundary/ErrorBoundary.tsx
index 01d8fef69c..75f0a226e0 100644
--- a/frontend/src/components/editor/boundary/ErrorBoundary.tsx
+++ b/frontend/src/components/editor/boundary/ErrorBoundary.tsx
@@ -24,12 +24,7 @@ const FallbackComponent: React.FC<FallbackProps> = (props) => {
</pre>
<div>
If this is an issue with marimo, please report it on{" "}
- <a
- href={Constants.issuesPage}
- target="_blank"
- rel="noreferrer"
- className="underline"
- >
+ <a href={Constants.issuesPage} target="_blank" className="underline">
GitHub
</a>
.
diff --git a/frontend/src/components/editor/chrome/components/contribute-snippet-button.tsx b/frontend/src/components/editor/chrome/components/contribute-snippet-button.tsx
index 819e639643..58974bbf18 100644
--- a/frontend/src/components/editor/chrome/components/contribute-snippet-button.tsx
+++ b/frontend/src/components/editor/chrome/components/contribute-snippet-button.tsx
@@ -80,7 +80,6 @@ const ContributeSnippetModal: React.FC<{
<a
href={Constants.githubPage}
target="_blank"
- rel="noreferrer"
className="underline"
>
on GitHub
diff --git a/frontend/src/components/editor/chrome/components/feedback-button.tsx b/frontend/src/components/editor/chrome/components/feedback-button.tsx
index 4b16e86f81..94458c095f 100644
--- a/frontend/src/components/editor/chrome/components/feedback-button.tsx
+++ b/frontend/src/components/editor/chrome/components/feedback-button.tsx
@@ -66,7 +66,6 @@ const FeedbackModal: React.FC<{
<a
href={Constants.feedbackForm}
target="_blank"
- rel="noreferrer"
className="underline"
>
two-minute survey.
@@ -77,7 +76,6 @@ const FeedbackModal: React.FC<{
<a
href={Constants.issuesPage}
target="_blank"
- rel="noreferrer"
className="underline"
>
GitHub issue.
@@ -88,7 +86,6 @@ const FeedbackModal: React.FC<{
<a
href={Constants.discordLink}
target="_blank"
- rel="noreferrer"
className="underline"
>
Discord.
diff --git a/frontend/src/components/editor/database/add-database-form.tsx b/frontend/src/components/editor/database/add-database-form.tsx
index e5a2182d3a..59314f361e 100644
--- a/frontend/src/components/editor/database/add-database-form.tsx
+++ b/frontend/src/components/editor/database/add-database-form.tsx
@@ -45,6 +45,7 @@ import {
SelectValue,
} from "@/components/ui/select";
import { ENV_RENDERER, SecretsProvider } from "./form-renderers";
+import { ExternalLink } from "@/components/ui/links";
interface Props {
onSubmit: () => void;
@@ -310,14 +311,9 @@ export const AddDatabaseDialogContent: React.FC<{
<DialogDescription>
Connect to your database to query data directly from your notebook.
Learn more about how to connect to your database in our{" "}
- <a
- href="http://docs.marimo.io/guides/working_with_data/sql/#connecting-to-a-custom-database"
- target="_blank"
- rel="noreferrer"
- className="text-link hover:underline"
- >
+ <ExternalLink href="https://docs.marimo.io/guides/working_with_data/sql/#connecting-to-a-custom-database">
docs.
- </a>
+ </ExternalLink>
</DialogDescription>
</DialogHeader>
<AddDatabaseForm onSubmit={() => onClose()} />
diff --git a/frontend/src/components/editor/output/MarimoTracebackOutput.tsx b/frontend/src/components/editor/output/MarimoTracebackOutput.tsx
index bf9a5845dc..70a854740a 100644
--- a/frontend/src/components/editor/output/MarimoTracebackOutput.tsx
+++ b/frontend/src/components/editor/output/MarimoTracebackOutput.tsx
@@ -117,11 +117,7 @@ export const MarimoTracebackOutput = ({
</a>
</DropdownMenuItem>
<DropdownMenuItem asChild={true}>
- <a
- target="_blank"
- href="https://marimo.io/discord?ref=notebook"
- rel="noreferrer"
- >
+ <a target="_blank" href="https://marimo.io/discord?ref=notebook">
<MessageCircleIcon className="h-4 w-4 mr-2" />
Ask in Discord
<ExternalLinkIcon className="h-3 w-3 ml-auto" />
@@ -131,7 +127,6 @@ export const MarimoTracebackOutput = ({
<a
target="_blank"
href={`https://community.marimo.io/search?q=${encodeURIComponent(lastTracebackLine)}`}
- rel="noreferrer"
>
<HelpCircleIcon className="h-4 w-4 mr-2" />
Search Community Forum
diff --git a/frontend/src/components/editor/package-alert.tsx b/frontend/src/components/editor/package-alert.tsx
index 23d7142803..be7691379d 100644
--- a/frontend/src/components/editor/package-alert.tsx
+++ b/frontend/src/components/editor/package-alert.tsx
@@ -47,6 +47,7 @@ import { useAsyncData } from "@/hooks/useAsyncData";
import { Tooltip } from "../ui/tooltip";
import { useState } from "react";
import { cleanPythonModuleName, reverseSemverSort } from "@/utils/versions";
+import { ExternalLink } from "../ui/links";
export const PackageAlert: React.FC = () => {
const { packageAlert } = useAlerts();
@@ -131,14 +132,9 @@ export const PackageAlert: React.FC = () => {
) : (
<p>
If you set up a{" "}
- <a
- href="https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments"
- className="text-accent-foreground hover:underline"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments">
virtual environment
- </a>
+ </ExternalLink>
, marimo can install these packages for you.
</p>
)}
diff --git a/frontend/src/components/home/components.tsx b/frontend/src/components/home/components.tsx
index cd325a5604..09618881e2 100644
--- a/frontend/src/components/home/components.tsx
+++ b/frontend/src/components/home/components.tsx
@@ -154,7 +154,6 @@ export const ResourceLinks: React.FC = () => {
key={resource.title}
href={resource.url}
target="_blank"
- rel="noreferrer"
className="flex items-start gap-3 py-3 px-3 rounded-lg border hover:bg-accent/20 transition-colors shadow-xs"
>
<resource.icon className="w-5 h-5 mt-1.5 text-primary" />
diff --git a/frontend/src/components/pages/run-page.tsx b/frontend/src/components/pages/run-page.tsx
index c2f3b83721..2bf51f8b10 100644
--- a/frontend/src/components/pages/run-page.tsx
+++ b/frontend/src/components/pages/run-page.tsx
@@ -29,7 +29,6 @@ const Watermark = () => {
href={Constants.githubPage}
target="_blank"
className="text-sm text-[var(--grass-11)] font-bold tracking-wide transition-colors bg-[var(--grass-4)] hover:bg-[var(--grass-5)] border-t border-l border-[var(--grass-8)] px-3 py-1 rounded-tl-md flex items-center gap-2"
- rel="noreferrer"
>
<span className="pb-[2px]">made with marimo</span>
<img src="./favicon.ico" alt="marimo" className="h-4 w-auto" />
diff --git a/frontend/src/components/static-html/share-modal.tsx b/frontend/src/components/static-html/share-modal.tsx
index 749dc9336f..58e7485ed7 100644
--- a/frontend/src/components/static-html/share-modal.tsx
+++ b/frontend/src/components/static-html/share-modal.tsx
@@ -69,7 +69,6 @@ export const ShareStaticNotebookModal: React.FC<{
<a
href={Constants.issuesPage}
target="_blank"
- rel="noreferrer"
className="underline"
>
GitHub
@@ -98,7 +97,7 @@ export const ShareStaticNotebookModal: React.FC<{
<DialogDescription>
You can publish a static, non-interactive version of this notebook
to the public web. We will create a link for you that lives on{" "}
- <a href={BASE_URL} target="_blank" rel="noreferrer">
+ <a href={BASE_URL} target="_blank">
{BASE_URL}
</a>
.
diff --git a/frontend/src/components/static-html/static-banner.tsx b/frontend/src/components/static-html/static-banner.tsx
index a344b37326..05c8898567 100644
--- a/frontend/src/components/static-html/static-banner.tsx
+++ b/frontend/src/components/static-html/static-banner.tsx
@@ -36,12 +36,7 @@ export const StaticBanner: React.FC = () => {
<div className="px-4 py-2 bg-[var(--sky-2)] border-b border-[var(--sky-7)] text-md text-[var(--sky-11)] font-semibold flex justify-between items-center gap-4 no-print">
<span>
This is a static Python notebook built using{" "}
- <a
- href={Constants.githubPage}
- target="_blank"
- className="underline"
- rel="noreferrer"
- >
+ <a href={Constants.githubPage} target="_blank" className="underline">
marimo
</a>
.
@@ -85,7 +80,6 @@ const StaticBannerDialog = ({ code }: { code: string }) => {
href={Constants.githubPage}
target="_blank"
className="text-link hover:underline"
- rel="noreferrer"
>
marimo
</a>
diff --git a/frontend/src/components/ui/links.tsx b/frontend/src/components/ui/links.tsx
index 102c290188..10e83dae29 100644
--- a/frontend/src/components/ui/links.tsx
+++ b/frontend/src/components/ui/links.tsx
@@ -2,14 +2,20 @@
export const ExternalLink = ({
href,
children,
-}: { href: string; children: React.ReactNode }) => {
+}: {
+ href:
+ | `https://platform.openai.com/${string}`
+ | `https://console.anthropic.com/${string}`
+ | `https://aistudio.google.com/${string}`
+ | `https://github.com/${string}`
+ | `https://docs.marimo.io/${string}`
+ | `https://docs.python.org/${string}`
+ | `https://marimo.io/${string}`
+ | `https://links.marimo.app/${string}`;
+ children: React.ReactNode;
+}) => {
return (
- <a
- href={href}
- target="_blank"
- rel="noreferrer"
- className="text-link hover:underline"
- >
+ <a href={href} target="_blank" className="text-link hover:underline">
{children}
</a>
);
diff --git a/frontend/src/core/codemirror/copilot/copilot-config.tsx b/frontend/src/core/codemirror/copilot/copilot-config.tsx
index 6965d9b125..174482128d 100644
--- a/frontend/src/core/codemirror/copilot/copilot-config.tsx
+++ b/frontend/src/core/codemirror/copilot/copilot-config.tsx
@@ -5,6 +5,7 @@ import { memo, useState } from "react";
import { getCopilotClient } from "./client";
import { Button, buttonVariants } from "@/components/ui/button";
import { CheckIcon, CopyIcon, Loader2Icon, XIcon } from "lucide-react";
+import { ExternalLink } from "@/components/ui/links";
import { Label } from "@/components/ui/label";
import { toast } from "@/components/ui/use-toast";
import { copyToClipboard } from "@/utils/copy";
@@ -261,14 +262,9 @@ export const CopilotConfig = memo(() => {
</Label>
<div className="text-sm">
For troubleshooting, see the{" "}
- <a
- className="hyperlink"
- href="https://docs.marimo.io/getting_started/index.html#github-copilot"
- target="_blank"
- rel="noreferrer"
- >
+ <ExternalLink href="https://docs.marimo.io/getting_started/index.html#github-copilot">
docs
- </a>
+ </ExternalLink>
.
</div>
</div>
diff --git a/frontend/src/core/codemirror/language/panel.tsx b/frontend/src/core/codemirror/language/panel.tsx
index e8b2d9a1f5..4d102d147a 100644
--- a/frontend/src/core/codemirror/language/panel.tsx
+++ b/frontend/src/core/codemirror/language/panel.tsx
@@ -190,7 +190,6 @@ const SQLEngineSelect: React.FC<SelectProps> = ({
className="flex items-center gap-1"
href={HELP_URL}
target="_blank"
- rel="noreferrer"
>
<CircleHelpIcon className="h-3 w-3" />
<span>How to add a database connection</span>