From b1218ce6f9dfe43500274df167dab542a3f3d58d Mon Sep 17 00:00:00 2001 From: Gavin Elder Date: Tue, 19 Aug 2025 18:45:11 +0100 Subject: [PATCH 01/10] feat: Cloud API Routing --- docusaurus.config.js | 61 +++++++------------ netlify.toml | 14 ----- .../docs/info/seqera-api.info.mdx | 3 +- src/modules/Homepage/index.tsx | 2 +- .../HeaderDesktop/NavItems/index.jsx | 2 +- 5 files changed, 25 insertions(+), 57 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index f074267be..d1bab1137 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -302,23 +302,15 @@ export default async function createConfigAsync() { className: 'w-[100px]' }, items: [ - // Note: This workaround was added to resolve pages from 404ing when navigating away from platform-api paths, due to separate build implementation. - // TODO: Revert urls once we have docs in a single build { - // to: "/platform-cloud/", - // position: "left", - // label: "Platform Cloud", - type: 'html', - position: 'left', - value: 'Platform Cloud' + to: "/platform-cloud", + position: "left", + label: "Platform Cloud", }, { - // to: "/platform-enterprise/", - // position: "left", - // label: "Platform Enterprise", - type: 'html', - position: 'left', - value: 'Platform Enterprise' + to: "/platform-enterprise", + position: "left", + label: "Platform Enterprise", }, { type: "docsVersionDropdown", @@ -332,28 +324,20 @@ export default async function createConfigAsync() { target: "_blank", }, { - // to: "/multiqc/", - // label: "MultiQC", - // position: "left", - type: 'html', - position: 'left', - value: 'MultiQC' + to: "/multiqc", + label: "MultiQC", + position: "left", }, { - // to: "/wave/", - // label: "Wave", - // position: "left", - type: 'html', - position: 'left', - value: 'Wave' + to: "/wave", + label: "Wave", + position: "left", + }, { - // to: "/fusion/", - // label: "Fusion", - // position: "left", - type: 'html', - position: 'left', - value: 'Fusion' + to: "/fusion", + label: "Fusion", + position: "left", }, { to: "https://training.nextflow.io/latest/", @@ -362,12 +346,9 @@ export default async function createConfigAsync() { target: "_blank", }, { - // to: "/platform-api/info/seqera-api", - // label: "Platform API", - // position: "left", - type: 'html', - position: 'left', - value: 'Platform API' + to: "/platform-api", + label: "Platform API", + position: "left", }, ], }, @@ -387,11 +368,11 @@ export default async function createConfigAsync() { items: [ { label: "Platform Enterprise", - to: "/platform-enterprise/", + to: "/platform-enterprise", }, { label: "Platform Cloud", - to: "/platform-cloud/", + to: "/platform-cloud", }, ], }, diff --git a/netlify.toml b/netlify.toml index ca1c8b683..8484e153b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -14,19 +14,5 @@ # Reference: https://github.com/facebook/docusaurus/discussions/11199 DOCUSAURUS_SSG_WORKER_THREAD_COUNT = "1" -# Redirects for the missing API docs -[[redirects]] - from = "/platform-api/*" - to = "https://seqera-docs-api.netlify.app/platform-api/:splat" - status = 200 - [context.deploy-preview.build.environment] INCLUDE_NEXT="true" - -# Redirect missing assets (so that we don't lose CSS on the API docs) -# NB: Force is not true, so will use local if available -[[redirects]] - from = "/assets/*" - to = "https://seqera-docs-api.netlify.app/assets/:splat" - status = 200 - diff --git a/platform-api-docs/docs/info/seqera-api.info.mdx b/platform-api-docs/docs/info/seqera-api.info.mdx index e436f5e5c..e0521413f 100644 --- a/platform-api-docs/docs/info/seqera-api.info.mdx +++ b/platform-api-docs/docs/info/seqera-api.info.mdx @@ -6,6 +6,7 @@ sidebar_label: Platform API sidebar_position: 0 hide_title: true custom_edit_url: null +slug: / --- import ApiLogo from "@theme/ApiLogo"; @@ -46,7 +47,7 @@ The API requires an authentication token to be specified in each API request usi The token is only displayed once when it is created. Store your token in a safe place. ::: -### Versioning +### Versioning The API uses the [semantic versioning convention](https://semver.org/) (major.minor.patch). In the event that a breaking change is introduced in future versions, we will publish guidance on the v1 support schedule and steps to mitigate disruption to your production environment. The following do _not_ constitute breaking changes: diff --git a/src/modules/Homepage/index.tsx b/src/modules/Homepage/index.tsx index 017cbc26c..9c24e890c 100644 --- a/src/modules/Homepage/index.tsx +++ b/src/modules/Homepage/index.tsx @@ -208,7 +208,7 @@ export default function Home(): JSX.Element {

-
+

MultiQC

  • @@ -252,7 +252,7 @@ export default function Home(): JSX.Element {

    @@ -307,7 +307,7 @@ export default function Home(): JSX.Element {

    @@ -316,7 +316,7 @@ export default function Home(): JSX.Element {

    @@ -345,7 +345,7 @@ export default function Home(): JSX.Element {

    @@ -354,7 +354,7 @@ export default function Home(): JSX.Element {

    @@ -371,7 +371,7 @@ export default function Home(): JSX.Element {

    @@ -384,7 +384,7 @@ export default function Home(): JSX.Element {

    @@ -396,7 +396,7 @@ export default function Home(): JSX.Element {

    diff --git a/src/modules/Homepage/styles.module.css b/src/modules/Homepage/styles.module.css index a08eba0ff..e03109796 100644 --- a/src/modules/Homepage/styles.module.css +++ b/src/modules/Homepage/styles.module.css @@ -35,7 +35,23 @@ html[data-theme="light"] { } .sidebarProductLogos a { - @apply flex justify-between items-center my-4 border-solid border border-gray-500 rounded px-4 py-3 bg-white hover:bg-[#e8ebfc] w-full leading-none; + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 1rem; + margin-bottom: 1rem; + border-style: solid; + border-width: 1px; + border-color: var(--color-gray-500); + border-radius: 0.25rem; + padding: 0.75rem 1rem; + background-color: white; + width: 100%; + line-height: 1; + + &:hover { + background-color: #e8ebfc; + } } .sidebarContainer { flex: none; diff --git a/src/theme/DocSidebar/Desktop/ProductSwitcher/ProductLogo/index.jsx b/src/theme/DocSidebar/Desktop/ProductSwitcher/ProductLogo/index.jsx index a108ab10a..742ac9154 100644 --- a/src/theme/DocSidebar/Desktop/ProductSwitcher/ProductLogo/index.jsx +++ b/src/theme/DocSidebar/Desktop/ProductSwitcher/ProductLogo/index.jsx @@ -71,7 +71,7 @@ const ProductSwitcher = ({ product }) => { const LogoDark = logos[product]?.dark; return ( - + {Logo && } {LogoDark && } diff --git a/src/theme/DocSidebar/Desktop/ProductSwitcher/ProductLogo/styles.module.css b/src/theme/DocSidebar/Desktop/ProductSwitcher/ProductLogo/styles.module.css index d11aafcc0..b08816455 100644 --- a/src/theme/DocSidebar/Desktop/ProductSwitcher/ProductLogo/styles.module.css +++ b/src/theme/DocSidebar/Desktop/ProductSwitcher/ProductLogo/styles.module.css @@ -3,7 +3,7 @@ display: none; } -.item { +.logo { max-width: 178px; display: flex; align-items: center; diff --git a/src/theme/DocSidebar/Desktop/ProductSwitcher/index.jsx b/src/theme/DocSidebar/Desktop/ProductSwitcher/index.jsx index 5e9b600ed..634cf977a 100644 --- a/src/theme/DocSidebar/Desktop/ProductSwitcher/index.jsx +++ b/src/theme/DocSidebar/Desktop/ProductSwitcher/index.jsx @@ -76,9 +76,12 @@ const ProductSwitcher = ({ isDropdown }) => { if (!isDropdown) items = products; return ( -

    +
    {isDropdown && ( -
    +
    {
    { Find out more on{" "} how we use cookies diff --git a/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/LoginButton/index.jsx b/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/LoginButton/index.jsx index 1ff0440a5..f03305c51 100644 --- a/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/LoginButton/index.jsx +++ b/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/LoginButton/index.jsx @@ -12,18 +12,8 @@ const NavMeta = ({ isDark }) => { if (window.location.pathname === "/") altStyle = true; const { colorMode, setColorMode } = useColorMode(); return ( -
    - -
    +
    +
    { className={clsx( styles.button, styles.secondary, - { [styles.darkMode]: isDark }, - "ml-3", + styles.signUpButton, + { [styles.darkMode]: isDark } )} target="_self" to="https://cloud.seqera.io/login" > - Sign Up + Sign Up
    ); diff --git a/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/LoginButton/styles.module.css b/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/LoginButton/styles.module.css index ad4e064c6..3392b4d45 100644 --- a/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/LoginButton/styles.module.css +++ b/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/LoginButton/styles.module.css @@ -34,6 +34,30 @@ } } +.container { + display: flex !important; + align-items: center; + visibility: visible; +} + +.toggleButton { + display: flex; + flex-direction: row; + margin-right: 0.75rem; +} + +.buttonContainer { + display: flex; +} + +.signUpButton { + margin-left: 0.75rem; +} + +.signUpText { + display: inline; +} + .lightDarkMode { width: 30px; height: 30px; diff --git a/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/index.jsx b/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/index.jsx index 6877d43ab..3777151dd 100644 --- a/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/index.jsx +++ b/src/theme/Navbar/Layout/SeqeraHeader/HeaderDesktop/NavItems/index.jsx @@ -10,7 +10,7 @@ import Hamburger from "./Hamburger"; import { useHeaderContext } from "../../context"; import ActiveLink from "./ActiveLink"; import NavbarLogo from '@theme/Navbar/Logo'; -import { useLocation } from 'react-router-dom'; +import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle'; const NavItems = ({ isDark = false, hideMenu }) => { @@ -23,24 +23,23 @@ const NavItems = ({ isDark = false, hideMenu }) => { } = useHeaderContext(); - // Note: This workaround was added to resolve pages from 404ing when navigating away from platform-api paths, due to separate build implementation. - // TODO: Revert this workaround once we have docs in a single build - const location = useLocation(); - const isOnPlatformAPI = location.pathname.includes('/platform-api'); return ( -
    -
    -
    +
    +
    +
    -
    +
    {!hideMenu && ( -