Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into setup-cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoPascoli committed Jan 27, 2025
2 parents d494952 + a31f9c1 commit 315469b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webapp/src/components/App/Studies/StudiesList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function StudiesList(props: StudiesListProps) {
>
{`${t("studies.scanFolder")} ${folder}?`}
<CheckBoxFE
label={t("studies.requestDeepScan")}
label={t("studies.recursiveScan")}
value={isRecursiveScan}
onChange={handleRecursiveScan}
/>
Expand Down
10 changes: 10 additions & 0 deletions webapp/src/components/App/Studies/StudyTree/__test__/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ export const FIXTURES_BUILD_STUDY_TREE = {
name: "root",
path: "",
children: [
{
name: "default",
path: "/default",
children: [],
},
{
name: "workspace",
path: "/workspace",
Expand Down Expand Up @@ -270,6 +275,11 @@ export const FIXTURES_BUILD_STUDY_TREE = {
name: "root",
path: "",
children: [
{
name: "default",
path: "/default",
children: [],
},
{
name: "workspace",
path: "/workspace",
Expand Down
11 changes: 10 additions & 1 deletion webapp/src/components/App/Studies/StudyTree/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ import type { StudyTreeNode, NonStudyFolderDTO } from "./types";
* @returns A tree structure representing the studies.
*/
export function buildStudyTree(studies: StudyMetadata[]) {
// It is important to initialize the root node with the default workspace as a child
// Otherwise we won't see the default workspace if no study has a path (which only
// happens when a user moves a study to another folder)
const tree: StudyTreeNode = {
name: "root",
children: [],
children: [
{
name: "default",
children: [],
path: "/default",
},
],
path: "",
};

Expand Down
2 changes: 1 addition & 1 deletion webapp/src/redux/ducks/studies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const initialState = studiesAdapter.getInitialState({
filters: {
inputValue: "",
folder: "root",
strictFolder: true,
strictFolder: false,
managed: false,
archived: false,
variant: false,
Expand Down

0 comments on commit 315469b

Please sign in to comment.