Skip to content

Commit

Permalink
Dynamic groups modal updates (voxel51#3209)
Browse files Browse the repository at this point in the history
* data flow updates

* tweaks

* cypress debug script

* tweaks

* fixes

* cleanup, fix carousel highlighting

* v4

* v4s

* cleaning

---------

Co-authored-by: imanjra <ibrahim@voxel51.com>
  • Loading branch information
benjaminpkane and imanjra authored Jun 23, 2023
1 parent 62e7b69 commit bf650d5
Show file tree
Hide file tree
Showing 52 changed files with 889 additions and 894 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Clone fiftyone
uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
submodules: true
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
token: ${{ secrets.TEAMS_GITHUB_PAT }}
ref: main
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install pip dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Clone fiftyone
uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
submodules: true
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
submodules: true

- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
id: pip-cache
with:
python-version: 3.8
Expand Down Expand Up @@ -72,13 +72,6 @@ jobs:
yarn start
working-directory: ./e2e

- name: Upload videos
if: always()
uses: actions/upload-artifact@v2
with:
name: videos
path: e2e/cypress/videos

- name: Upload snapshots
if: always()
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: actions/setup-python@v2
uses: actions/setup-python@v4
id: pip-cache
with:
python-version: ${{ matrix.python }}
Expand Down
1 change: 1 addition & 0 deletions app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module.exports = {
],
},
],
"react/prop-types": 0,
},
settings: {
react: {
Expand Down
1 change: 1 addition & 0 deletions app/packages/app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineConfig({
pluginRewriteAll(),
],
server: {
port: parseInt(process.env.FIFTYONE_DEFAULT_APP_PORT || "5173"),
proxy: {
"/plugins": {
target: `http://127.0.0.1:${
Expand Down
2 changes: 1 addition & 1 deletion app/packages/core/src/Root/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const useGA = (prepared: PreloadedQuery<RootQuery>) => {
const buildType = dev ? "dev" : "prod";

ReactGA.initialize(gaConfig.app_ids[buildType], {
debug: dev,
debug: false,
gaOptions: {
storage: "none",
cookieDomain: "none",
Expand Down
19 changes: 8 additions & 11 deletions app/packages/core/src/components/Actions/Selected.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import {
AbstractLooker,
FrameLooker,
ImageLooker,
VideoLooker,
} from "@fiftyone/looker";
import { useEventHandler, useSetSelected } from "@fiftyone/state";
import React, {
MutableRefObject,
RefObject,
Expand All @@ -11,15 +18,6 @@ import {
useRecoilValue,
} from "recoil";

import {
AbstractLooker,
FrameLooker,
ImageLooker,
VideoLooker,
} from "@fiftyone/looker";

import { useEventHandler, useSetSelected } from "@fiftyone/state";

import * as fos from "@fiftyone/state";
import { State } from "@fiftyone/state";
import { ActionOption } from "./Common";
Expand Down Expand Up @@ -160,8 +158,7 @@ const toIds = (labels: State.SelectedLabel[]) =>

const useVisibleSampleLabels = (lookerRef: RefObject<AbstractLooker>) => {
const isGroup = useRecoilValue(fos.isGroup);
const activeSlice = useRecoilValue(fos.currentSlice(true));
const activeSample = useRecoilValue(fos.activeModalSample(activeSlice));
const activeSample = useRecoilValue(fos.activeModalSample);
const labelValues = useRecoilValue(fos.labelValues({ sample: activeSample }));

const currentSampleLabels = lookerRef.current
Expand Down
9 changes: 3 additions & 6 deletions app/packages/core/src/components/Grid/Grid.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import Flashlight from "@fiftyone/flashlight";
import { freeVideos } from "@fiftyone/looker";
import { useEventHandler, useExpandSample } from "@fiftyone/state";
import React, { useEffect, useLayoutEffect, useRef } from "react";
import { useRecoilCallback, useRecoilValue } from "recoil";
import { v4 as uuid } from "uuid";

import Flashlight from "@fiftyone/flashlight";
import { freeVideos } from "@fiftyone/looker";

import { useEventHandler } from "@fiftyone/state";
import { flashlightLooker } from "./Grid.module.css";
import { rowAspectRatioThreshold } from "./recoil";
import useExpandSample from "./useExpandSample";
import usePage from "./usePage";
import useResize from "./useResize";

Expand Down
36 changes: 0 additions & 36 deletions app/packages/core/src/components/Grid/useExpandSample.ts

This file was deleted.

Loading

0 comments on commit bf650d5

Please sign in to comment.