Skip to content

Commit

Permalink
Merge pull request #4179 from voxel51/merge/v0.23.7_to_main
Browse files Browse the repository at this point in the history
Merge/v0.23.7 to main
  • Loading branch information
brimoor authored Mar 21, 2024
2 parents 2086f90 + e1edc8b commit 825e6cf
Show file tree
Hide file tree
Showing 99 changed files with 3,915 additions and 1,440 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ jobs:
- ubuntu-latest-m
- windows-latest
python:
- 3.8
- "3.8"
- "3.10"
- "3.11"
exclude:
- os: windows-latest
python: 3.8
python: "3.8"
- os: windows-latest
python: "3.10"
- os: windows-latest
python: "3.11"
defaults:
run:
shell: bash
Expand Down Expand Up @@ -90,7 +93,7 @@ jobs:
--ignore tests/intensive/ \
--ignore tests/no_wrapper
- name: Upload
if: ${{ !startsWith(matrix.os, 'windows') && matrix.python == '3.9' }}
if: ${{ !startsWith(matrix.os, 'windows') && matrix.python == '3.11' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
98 changes: 31 additions & 67 deletions app/packages/app/src/components/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
Button,
DocsLink,
GitHubLink,
Header,
Expand All @@ -13,9 +12,7 @@ import { useRefresh } from "@fiftyone/state";
import { isElectron } from "@fiftyone/utilities";
import { DarkMode, LightMode } from "@mui/icons-material";
import { useColorScheme } from "@mui/material";
import { AnimatePresence, motion } from "framer-motion";
import React, { Suspense, useEffect, useMemo } from "react";
import ReactDOM from "react-dom";
import ReactGA from "react-ga4";
import { useFragment, usePaginationFragment } from "react-relay";
import { useDebounce } from "react-use";
Expand Down Expand Up @@ -113,82 +110,49 @@ const Nav: React.FC<{
fragment NavFragment on Query {
...NavDatasets
...NavGA
teamsSubmission
}
`,
fragment
);
useGA(data);
const useSearch = getUseSearch(data);

const [teams, setTeams] = useRecoilState(fos.appTeamsIsOpen);
const refresh = useRefresh();
const { mode, setMode } = useColorScheme();
const [_, setTheme] = useRecoilState(fos.theme);

return (
<>
<Header
title={"FiftyOne"}
onRefresh={refresh}
navChildren={<DatasetSelector useSearch={useSearch} />}
>
{hasDataset && (
<Suspense fallback={<div style={{ flex: 1 }}></div>}>
<ViewBar />
</Suspense>
)}
{!hasDataset && <div style={{ flex: 1 }}></div>}
<div className={iconContainer}>
{!data.teamsSubmission && (
<Button
onClick={() => {
setTeams(true);
}}
>
Have a Team?
</Button>
)}
<IconButton
title={mode === "dark" ? "Light mode" : "Dark mode"}
onClick={() => {
const nextMode = mode === "dark" ? "light" : "dark";
setMode(nextMode);
setTheme(nextMode);
}}
sx={{
color: (theme) => theme.palette.text.secondary,
pr: 0,
}}
>
{mode === "dark" ? <LightMode color="inherit" /> : <DarkMode />}
</IconButton>
<SlackLink />
<GitHubLink />
<DocsLink />
</div>
</Header>
{ReactDOM.createPortal(
<AnimatePresence>
{teams && (
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{
opacity: 1,
height: "auto",
}}
exit={{ opacity: 0, height: 0 }}
transition={{ duration: 0.2 }}
key={"teams"}
>
<Teams />
</motion.div>
)}
</AnimatePresence>,
document.getElementById("teams") as HTMLDivElement
<Header
title={"FiftyOne"}
onRefresh={refresh}
navChildren={<DatasetSelector useSearch={useSearch} />}
>
{hasDataset && (
<Suspense fallback={<div style={{ flex: 1 }}></div>}>
<ViewBar />
</Suspense>
)}
</>
{!hasDataset && <div style={{ flex: 1 }}></div>}
<div className={iconContainer}>
<Teams />
<IconButton
title={mode === "dark" ? "Light mode" : "Dark mode"}
onClick={() => {
const nextMode = mode === "dark" ? "light" : "dark";
setMode(nextMode);
setTheme(nextMode);
}}
sx={{
color: (theme) => theme.palette.text.secondary,
pr: 0,
}}
>
{mode === "dark" ? <LightMode color="inherit" /> : <DarkMode />}
</IconButton>
<SlackLink />
<GitHubLink />
<DocsLink />
</div>
</Header>
);
};

Expand Down
12 changes: 12 additions & 0 deletions app/packages/app/src/components/Teams.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Button, ExternalLink } from "@fiftyone/components";
import React from "react";

export default function Teams() {
return (
<ExternalLink
href={"https://voxel51.com/book-a-demo/?utm_source=FiftyOneApp"}
>
<Button>Have a Team?</Button>
</ExternalLink>
);
}
54 changes: 0 additions & 54 deletions app/packages/app/src/components/Teams/Teams.module.css

This file was deleted.

166 changes: 0 additions & 166 deletions app/packages/app/src/components/Teams/Teams.tsx

This file was deleted.

Loading

0 comments on commit 825e6cf

Please sign in to comment.