Skip to content

Commit 4bcde2c

Browse files
Merge branch 'main' into bugfix/ZEN-wrong-path
2 parents 86e1d7a + 1678935 commit 4bcde2c

File tree

18 files changed

+460
-48
lines changed

18 files changed

+460
-48
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Report a problem or bug to help us improve
4+
title: ''
5+
labels: bug
6+
type: Bug
7+
assignees: ''
8+
9+
---
10+
11+
## Description
12+
13+
_A clear description of the problem._
14+
15+
## Expected Behavior
16+
17+
_What did you expect to happen instead?_
18+
19+
## Reproduction
20+
21+
_Steps to reproduce the behavior. If applicable, add screenshots that display the problem._
22+
23+
## Environment
24+
_Which version of BioFile Finder has the bug and with what environment?_
25+
- [ ] Web
26+
- Browser: [e.g., Chrome, Safari]
27+
- [ ] Desktop
28+
- OS: [e.g. Windows, Linux, Mac with Apple chip, Mac with Intel chip]
29+
- Version: [e.g. 8.1.1]
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project/app
4+
title: ''
5+
labels: ''
6+
type: Feature
7+
assignees: ''
8+
9+
---
10+
11+
## Use Case
12+
13+
_What would you like to do that you cannot currently accomplish? (Provide a detailed use case)_
14+
15+
_Is your feature request related to a problem? e.g., I'm frustrated when [...]_
16+
17+
## Suggest a Solution
18+
19+
_A concise description of your preferred solution, and any alternatives you've considered_
20+
21+
## Additional Details
22+
23+
_Any other context or screenshots about the feature request_

.github/ISSUE_TEMPLATE/ux_issue.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: UX request
3+
about: 'For AICS internal use: Request support from UX team'
4+
title: ''
5+
labels: UX
6+
assignees: ''
7+
8+
---
9+
10+
### Description
11+
- _Type of UX work needed (research, discovery and/or design)_
12+
- _Problem(s) to solve_
13+
14+
***
15+
_Detail what you already know and/or your best guesses. UX will help fill in blanks once assigned._
16+
17+
### Size
18+
_Effort level (xs, sm, m, lg, xl)_
19+
20+
### Scope
21+
_What will we do? What will we NOT do?_
22+
23+
### User needs statement(s)
24+
As a _[type of user]_, I need/want to _[action(s)]_, so that I can _[goal]_.
25+
26+
### Additional notes
27+
_Knowns/unknowns, stakeholders, time/dependency considerations, deliverables_

packages/core/App.module.css

+7
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,10 @@
9191
/* flex child */
9292
flex: 0 0 var(--file-details-width);
9393
}
94+
95+
.hidden {
96+
/* arbitrarily large to move input off-screen */
97+
left: -100;
98+
top: -100;
99+
position: absolute;
100+
}

packages/core/App.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export default function App(props: AppProps) {
104104
})}
105105
ref={measuredNodeRef}
106106
>
107+
{/* hidden input to capture autofocus on mount */}
108+
<input className={styles.hidden} autoFocus />
107109
<div className={styles.coreAndFileDetails}>
108110
<div className={styles.querySidebarAndCenter}>
109111
<QuerySidebar className={styles.querySidebar} />

packages/core/components/DirectoryTree/DirectoryTreeNode.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323

2424
.focused {
25-
border: 1px solid var(--highlight-text-color);
25+
border: 1px solid var(--highlight-hover-background-color);
2626
margin: 0;
2727
}
2828

packages/core/components/FileList/FileList.module.css

+1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@
3333
height: var(--row-count-intrisic-height-height);
3434
font-size: var(--row-count-intrisic-height);
3535
margin-top: var(--row-count-margin-top);
36+
margin-block-end: 0;
3637
}

packages/core/components/StatusMessage/StatusMessage.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
display: none;
1818
}
1919

20-
.centeringParent {
20+
.centering-parent {
2121
display: flex;
2222
font-size: var(--l-paragraph-size);
2323
font-weight: 500;

packages/core/entity/FileSet/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export default class FileSet {
211211

212212
Object.entries(filtersGroupedByAnnotation).forEach(([_, appliedFilters]) => {
213213
sqlBuilder.where(
214-
appliedFilters.map((filter) => filter.toSQLWhereString()).join(") OR (")
214+
appliedFilters.map((filter) => filter.toSQLWhereString()).join(" OR ")
215215
);
216216
});
217217

packages/core/entity/FileSet/test/FileSet.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe("FileSet", () => {
127127
'WHERE (REGEXP_MATCHES("scientist"'
128128
);
129129
expect(fileSet.toQuerySQLBuilder().from(mockDatasource).toString()).to.contain(
130-
'OR (REGEXP_MATCHES("scientist"'
130+
'OR REGEXP_MATCHES("scientist"'
131131
);
132132
});
133133
});

packages/core/hooks/useFileAccessContextMenu.ts

+43-19
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import { interaction, selection } from "../state";
1414
* previously saved applications. Can be supplied an array of filters to use
1515
* to find files to access instead of the currently selected files.
1616
*/
17-
export default (filters?: FileFilter[], onDismiss?: () => void) => {
17+
export default (folderFilters?: FileFilter[], onDismiss?: () => void) => {
1818
const dispatch = useDispatch();
1919
const isOnWeb = useSelector(interaction.selectors.isOnWeb);
2020
const fileSelection = useSelector(selection.selectors.getFileSelection);
2121
const isQueryingAicsFms = useSelector(selection.selectors.isQueryingAicsFms);
2222

2323
const [fileDetails, setFileDetails] = React.useState<FileDetail>();
2424

25-
const openWithSubMenuItems = useOpenWithMenuItems(fileDetails, filters);
25+
const openWithSubMenuItems = useOpenWithMenuItems(fileDetails, folderFilters);
2626

2727
fileSelection.fetchFocusedItemDetails().then((fileDetails) => {
2828
setFileDetails(fileDetails);
@@ -33,6 +33,30 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
3333
evt.preventDefault();
3434

3535
const contextMenuItems: IContextualMenuItem[] = [
36+
...(!folderFilters
37+
? []
38+
: [
39+
{
40+
key: "expand",
41+
text: "Expand all",
42+
iconProps: {
43+
iconName: "ExploreContent",
44+
},
45+
onClick() {
46+
dispatch(selection.actions.expandAllFileFolders());
47+
},
48+
},
49+
{
50+
key: "collapse",
51+
text: "Collapse all",
52+
iconProps: {
53+
iconName: "CollapseContent",
54+
},
55+
onClick() {
56+
dispatch(selection.actions.collapseAllFileFolders());
57+
},
58+
},
59+
]),
3660
// Avoid showing default open option when on web
3761
...(isOnWeb
3862
? []
@@ -43,10 +67,10 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
4367
iconProps: {
4468
iconName: "OpenInNewWindow",
4569
},
46-
disabled: !filters && fileSelection.count() === 0,
70+
disabled: !folderFilters && fileSelection.count() === 0,
4771
onClick() {
48-
if (filters) {
49-
dispatch(interaction.actions.openWithDefault(filters));
72+
if (folderFilters) {
73+
dispatch(interaction.actions.openWithDefault(folderFilters));
5074
} else if (fileDetails) {
5175
dispatch(
5276
interaction.actions.openWithDefault(undefined, [
@@ -60,7 +84,7 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
6084
{
6185
key: "open-with",
6286
text: "Open with",
63-
disabled: !filters && fileSelection.count() === 0,
87+
disabled: !folderFilters && fileSelection.count() === 0,
6488
iconProps: {
6589
iconName: "OpenInNewWindow",
6690
},
@@ -71,7 +95,7 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
7195
{
7296
key: "save-as",
7397
text: "Save metadata as",
74-
disabled: !filters && fileSelection.count() === 0,
98+
disabled: !folderFilters && fileSelection.count() === 0,
7599
iconProps: {
76100
iconName: "Saveas",
77101
},
@@ -86,13 +110,13 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
86110
{
87111
key: "csv",
88112
text: "CSV",
89-
disabled: !filters && fileSelection.count() === 0,
113+
disabled: !folderFilters && fileSelection.count() === 0,
90114
title: "Download a CSV of the metadata of the selected files",
91115
onClick() {
92116
dispatch(
93117
interaction.actions.showManifestDownloadDialog(
94118
"csv",
95-
filters
119+
folderFilters
96120
)
97121
);
98122
},
@@ -104,29 +128,29 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
104128
{
105129
key: "json",
106130
text: "JSON",
107-
disabled: !filters && fileSelection.count() === 0,
131+
disabled: !folderFilters && fileSelection.count() === 0,
108132
title:
109133
"Download a JSON file of the metadata of the selected files",
110134
onClick() {
111135
dispatch(
112136
interaction.actions.showManifestDownloadDialog(
113137
"json",
114-
filters
138+
folderFilters
115139
)
116140
);
117141
},
118142
},
119143
{
120144
key: "parquet",
121145
text: "Parquet",
122-
disabled: !filters && fileSelection.count() === 0,
146+
disabled: !folderFilters && fileSelection.count() === 0,
123147
title:
124148
"Download a Parquet file of the metadata of the selected files",
125149
onClick() {
126150
dispatch(
127151
interaction.actions.showManifestDownloadDialog(
128152
"parquet",
129-
filters
153+
folderFilters
130154
)
131155
);
132156
},
@@ -141,7 +165,7 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
141165
key: "copy-to-cache",
142166
text: "Copy to vast",
143167
title: "Copy selected files to NAS Cache (VAST)",
144-
disabled: !filters && fileSelection.count() === 0,
168+
disabled: !folderFilters && fileSelection.count() === 0,
145169
iconProps: { iconName: "MoveToFolder" },
146170
onClick() {
147171
dispatch(interaction.actions.showCopyFileManifest());
@@ -153,7 +177,7 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
153177
key: "download",
154178
text: "Download",
155179
title: "Download selected files to a specific directory",
156-
disabled: !filters && fileSelection.count() === 0,
180+
disabled: !folderFilters && fileSelection.count() === 0,
157181
iconProps: {
158182
iconName: "Download",
159183
},
@@ -168,13 +192,13 @@ export default (filters?: FileFilter[], onDismiss?: () => void) => {
168192
);
169193
},
170194
[
171-
filters,
172195
dispatch,
173-
onDismiss,
174-
isOnWeb,
196+
fileDetails,
175197
fileSelection,
198+
folderFilters,
199+
isOnWeb,
176200
isQueryingAicsFms,
177-
fileDetails,
201+
onDismiss,
178202
openWithSubMenuItems,
179203
]
180204
);

0 commit comments

Comments
 (0)