-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix frames field on non-video datasets * add support for computing real bounds to lightning queries when nonfinites are present * ux cleanup * lightning test fixes * sample count copy fix * unwind fix * numeric cleanup * string cleanup * details * modal and keypoints bugs * fix top lightning bolt
- Loading branch information
1 parent
a07b12c
commit 7300c9f
Showing
28 changed files
with
716 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/packages/core/src/components/Filters/NumericFieldFilter/Box.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { LoadingDots } from "@fiftyone/components"; | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
const BoxDiv = styled.div` | ||
background: ${({ theme }) => theme.background.level2}; | ||
border: 1px solid var(--fo-palette-divider); | ||
border-radius: 2px; | ||
color: ${({ theme }) => theme.text.secondary}; | ||
margin-top: 0.25rem; | ||
padding: 0.25rem 0.5rem; | ||
`; | ||
|
||
export default function Box({ | ||
children, | ||
text, | ||
}: React.PropsWithChildren<{ text?: string }>) { | ||
const value = text === "Loading" ? <LoadingDots text="Loading" /> : text; | ||
return ( | ||
<BoxDiv | ||
style={{ | ||
height: 71, | ||
display: "flex", | ||
justifyContent: "center", | ||
flexDirection: "column", | ||
textAlign: "center", | ||
}} | ||
> | ||
{children ? children : value} | ||
</BoxDiv> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/packages/core/src/components/Filters/NumericFieldFilter/use-show.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as fos from "@fiftyone/state"; | ||
import { useRecoilValue } from "recoil"; | ||
import * as state from "./state"; | ||
|
||
export default function useShow( | ||
modal: boolean, | ||
named: boolean, | ||
path: string, | ||
showRange: boolean | ||
) { | ||
const queryPerformance = useRecoilValue(fos.queryPerformance); | ||
const hasBounds = useRecoilValue( | ||
state.hasBounds({ | ||
path, | ||
modal, | ||
shouldCalculate: !queryPerformance || modal, | ||
}) | ||
); | ||
const indexed = useRecoilValue(fos.pathHasIndexes(path)); | ||
const frameField = useRecoilValue(fos.isFrameField(path)); | ||
|
||
return { | ||
show: hasBounds || (queryPerformance && !modal) || !named, | ||
showLoadButton: named && queryPerformance && !showRange && !modal, | ||
showQueryPerformanceIcon: | ||
named && queryPerformance && indexed && !frameField && !modal, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.