Skip to content

Commit

Permalink
Merge pull request #5179 from voxel51/bugfix/panel-cta-im-x1
Browse files Browse the repository at this point in the history
minor fixes embeddings and model evaluation panels CTA
  • Loading branch information
brimoor authored Nov 22, 2024
2 parents dac2474 + 5939efe commit 488cb28
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
6 changes: 5 additions & 1 deletion app/packages/components/src/components/PanelCTA/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ function TypographyOrNode(props: TypographyProps) {
const { children, ...otherProps } = props;

if (typeof children === "string") {
return <Typography {...otherProps}>{children}</Typography>;
return (
<Typography sx={{ textAlign: "center" }} {...otherProps}>
{children}
</Typography>
);
}

if (React.isValidElement(children)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export default function NativeModelEvaluationView(props) {
demoLabel="Upgrade to FiftyOne Teams to Evaluate Models"
description="Analyze and improve models collaboratively with your team"
docLink="https://docs.voxel51.com/user_guide/evaluation.html"
docCaption="Learn how to create model evaluation via code."
demoDocCaption="Not ready to upgrade yet? Learn how to create model evaluation via code."
docCaption="Learn how to evaluate models via code."
demoDocCaption="Not ready to upgrade yet? Learn how to evaluate models via code."
icon="ssid_chart"
Actions={() => {
return (
Expand Down
33 changes: 12 additions & 21 deletions app/packages/embeddings/src/Embeddings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,18 @@ export default function Embeddings({ containerHeight, dimensions }) {
containerStyle={selectorStyle}
/>
)}
{computeViz.isAvailable && (
<PlotOption
to={() => computeViz.prompt()}
title={"Compute visualization"}
>
<Add />
</PlotOption>
)}
<PlotOption
to={() => {
if (constants.IS_APP_MODE_FIFTYONE) {
setShowCTA(true);
} else {
computeViz.prompt();
}
}}
title={"Compute visualization"}
>
<Add />
</PlotOption>
{!plotSelection.selectionIsExternal && (
<PlotOption
to={plotSelection.clearSelection}
Expand Down Expand Up @@ -152,19 +156,6 @@ export default function Embeddings({ containerHeight, dimensions }) {
)}
<OperatorPlacements place={types.Places.EMBEDDINGS_ACTIONS} />
</div>
<MuiButton
startIcon={<Add />}
onClick={() => {
if (constants.IS_APP_MODE_FIFTYONE) {
setShowCTA(true);
} else {
computeViz.prompt();
}
}}
variant="contained"
>
Compute Embeddings
</MuiButton>
</Selectors>
{showPlot && (
<EmbeddingsPlot
Expand Down

0 comments on commit 488cb28

Please sign in to comment.