-
Notifications
You must be signed in to change notification settings - Fork 21
Adjust get started links to point to the "self hosting vs databricks" selector #309
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
Conversation
Signed-off-by: dbczumar <[email protected]>
Signed-off-by: dbczumar <[email protected]>
Preview for 1d1756e
|
{variant !== "blue" ? ( | ||
<div className="flex flex-col gap-8 p-8 bg-[#fff]/4 rounded-2xl @container justify-between"> | ||
<div className="flex flex-col gap-8"> | ||
<div className="flex flex-row justify-between items-center gap-4"> | ||
<div className="flex flex-row justify-center items-end gap-3 flex-wrap"> | ||
<h3 className="m-0 text-white">Managed hosting </h3> | ||
<span className="text-gray-500 text-sm">ON</span> | ||
<DatabricksLogo /> | ||
</div> | ||
</div> | ||
<div className="flex flex-col gap-4"> | ||
{[ | ||
"Free and fully managed — experience MLflow without the setup hassle", | ||
"Built and maintained by the original creators of MLflow", | ||
"Full OSS compatibility", | ||
].map((bulletPoint, index) => ( | ||
<div key={index} className="flex flex-row items-center gap-4"> | ||
<Checkmark className="shrink-0" /> | ||
<span className="text-md font-light text-gray-600"> | ||
{bulletPoint} | ||
</span> | ||
</div> | ||
))} |
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.
We'll also show the databricks option on the classic ML page, but link to https://docs.databricks.com/aws/en/mlflow/mlflow-3-install. I'll add some info to https://docs.databricks.com/aws/en/mlflow/mlflow-3-install about how to sign up for lighthouse & use it for classic ML too!
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.
cc @xq-yin
Signed-off-by: dbczumar <[email protected]>
const location = useLocation(); | ||
const classicalMLPath = useBaseUrl("/classical-ml"); | ||
const isClassicalMLPage = location.pathname.startsWith(classicalMLPath); | ||
const getStartedHref = isClassicalMLPage ? "/classical-ml#get-started" : "/#get-started"; |
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.
nit: should we extract this to a helper function and add handling for /genai
? functionally i know the CTAs on the main / genai pages are the same but it's a little weird that clicking this button on classic keeps you on the page, but genai boots you back to the homepage
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.
Yeah, agreed - adding the /genai case and moving this into a reusable func
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.
shippable but left a comment about the header button
variant !== "blue" ? "lg:col-span-2" : "", | ||
)} | ||
> | ||
<div id="get-started" className={cn("grid grid-cols-1 lg:grid-cols-2 gap-8")}> |
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.
i think you need to add something like this so docusarus knows that #get-started
is an anchor:
useBrokenLinks().collectAnchor(id); |
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.
Thanks so much! Pushed a fix (hopefully :D)
Signed-off-by: dbczumar <[email protected]>
Signed-off-by: dbczumar <[email protected]>
@@ -15,6 +17,20 @@ import { cva } from "class-variance-authority"; | |||
|
|||
const MD_BREAKPOINT = 640; | |||
|
|||
// Helper function to determine the appropriate "Get started" link based on current page | |||
function getStartedLinkForPage(pathname: string): string { |
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.
I saw this helper function several times in the codebase, think we could extract it out to be a util
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.
Definitely! Extracted!
if (pathname.startsWith(classicalMLPath)) { | ||
return "/classical-ml#get-started"; | ||
} else if (pathname.startsWith(genAIPath)) { | ||
return "/genai#get-started"; | ||
} else { | ||
return "/#get-started"; | ||
} |
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.
if my TS/JS styling memory is still up to date, less indentation with early return is preferred
if (pathname.startsWith(classicalMLPath)) {
return "/classical-ml#get-started";
}
if (pathname.startsWith(genAIPath)) {
return "/genai#get-started";
}
return "/#get-started";
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.
Absolutely! Tidied this up :)
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.
lgtm
Signed-off-by: dbczumar <[email protected]>
Signed-off-by: dbczumar <[email protected]>
Adjust get started links to point to the "self hosting vs databricks" selector