Skip to content

Commit

Permalink
feat: ✨ merge in gm subject spreadsheet feature
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Dec 4, 2023
2 parents e66eff3 + 398362c commit c70e32c
Show file tree
Hide file tree
Showing 20 changed files with 2,139 additions and 441 deletions.
3 changes: 2 additions & 1 deletion assets/css/file_views.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
display: flex;
white-space: nowrap;
width: 100%;
align-items: flex-start;
align-items: center;
justify-content: space-between;
padding: 2px;
}
/* Add borders to swal file row in swal file list besides the top border for first element and bottom border for last element */
Expand Down
69 changes: 69 additions & 0 deletions assets/css/guided.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
width: 200px;
}

.guided--container-lottie-small {
height: 70px;
width: 70px;
}

.black-arrow-lottie-container {
height: 150px;
width: 150px;
Expand All @@ -48,6 +53,24 @@
margin: 0px 10px 10px 10px;
}

.file-import-container {
display: flex;
border-radius: 10px;
border: 1px dashed #258193;
}

.file-import-container.horizontal {
width: 100%;
flex-direction: row;
align-items: center;
margin: 0px 10px 10px 10px;
}

.file-import-container.vertical {
flex-direction: column;
justify-content: center;
}

.guided--container {
overflow-y: auto;
display: flex;
Expand Down Expand Up @@ -748,6 +771,12 @@
padding: 0px 3px;
}

.flex-center {
display: flex;
justify-content: center;
align-items: center;
}

.guided--container-footer-buttons.flex-start {
justify-content: flex-start;
}
Expand Down Expand Up @@ -1053,3 +1082,43 @@
-webkit-box-orient: vertical;
overflow: hidden;
}

.guided--container-card {
display: flex;
width: 100%;
flex-direction: row;
align-items: center;
justify-content: space-between;
overflow-x: auto;
}

.guided--card-item {
display: flex;
flex: 1;
margin: 5px;
flex-direction: column;
align-items: center;
justify-content: center;
border: 1px solid var(--color-teal);
border-radius: 5px;
padding: 10px;
}

.guided--card-item-text {
margin: 0px;
font-weight: 500;
font-size: 14px;
color: #000;
}

.guided--card-item-header-text {
margin: 0px;
margin-bottom: 5px;
font-weight: 700;
font-size: 16px;
color: #000;
}

.align-flex-center {
align-items: center;
}
2 changes: 0 additions & 2 deletions assets/css/helperClasses.css
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@
border-left: none !important;
}

////////////////////////// MARGIN AND PADDING CLASSES //////////////////////////

.m-0 {
margin: 0 !important;
}
Expand Down
Binary file added assets/img/organized-subjects-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/subjects-pools-spreadseet-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/subjects-spreadseet-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
40 changes: 40 additions & 0 deletions main-process/native-ui/dialogs/open-file.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
const { ipcMain, dialog, BrowserWindow } = require("electron");

ipcMain.on("open-create-dataset-structure-spreadsheet-path-selection-dialog", (event) => {
const mainWindow = BrowserWindow.getFocusedWindow();

// Get the path to the directory where the user wants to save the spreadsheet
const spreadsheetPath = dialog.showOpenDialogSync(mainWindow, {
properties: ["openDirectory"],
title: "Select a folder to save the spreadsheet to",
});

if (spreadsheetPath) {
event.sender.send("selected-create-dataset-structure-spreadsheet-path", spreadsheetPath[0]);
}
});

ipcMain.on("open-subject-multi-folder-import-dialog", (event) => {
const mainWindow = BrowserWindow.getFocusedWindow();

const files = dialog.showOpenDialogSync(mainWindow, {
properties: ["openDirectory", "multiSelections"],
title: "Select your subject folders",
});

if (files) {
mainWindow.webContents.send("selected-subject-names-from-dialog", files);
}
});

ipcMain.on("open-sample-multi-folder-import-dialog", (event) => {
const mainWindow = BrowserWindow.getFocusedWindow();

const folders = dialog.showOpenDialogSync(mainWindow, {
properties: ["openDirectory", "multiSelections"],
title: "Select your sample folders",
});

if (folders) {
mainWindow.webContents.send("selected-sample-names-from-dialog", folders);
}
});

ipcMain.on("open-file-dialog-dataset", (event) => {
dialog.showOpenDialog(
BrowserWindow.getFocusedWindow(),
Expand Down
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,7 @@ ipcMain.on("get-port", (event) => {
log.info("Renderer requested port: " + selectedPort);
event.returnValue = selectedPort;
});

ipcMain.on("open-file-at-path", async (event, path) => {
shell.openPath(path);
});
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "soda-for-sparc",
"productName": "SODA for SPARC",
"version": "12.3.3",
"version": "12.4.5-beta",
"description": "Keep Calm and Curate ",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion pyflask/startup/minimumApiVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ def get_api_version():
"""
Returns the version of the API
"""
return {'version': os.getenv('API_VERSION', "12.3.3")}
return {'version': os.getenv('API_VERSION', "12.4.5-beta")}
Loading

0 comments on commit c70e32c

Please sign in to comment.