Skip to content

Commit

Permalink
Merge branch 'main' into alphaomega
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Oct 17, 2023
2 parents 0a3c7c6 + 6395832 commit dbe03be
Show file tree
Hide file tree
Showing 36 changed files with 355 additions and 330 deletions.
2 changes: 1 addition & 1 deletion docs/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ This will automatically add the new page to the sidebar. The page itself can be
constructor(...args) {
super(...args);
console.log(this.info.globalState) // This will print the global state that is currently being passed between subpages (i.e. within guided mode)
console.log(this.info.globalState) // This will print the global state that is currently being passed between subpages
}
render() {
Expand Down
1 change: 1 addition & 0 deletions guideGlobalMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"PlexonRecordingInterface",
"PlexonSortingInterface",
"AxonaRecordingInterface",
"NeuralynxRecordingInterface"
"AlphaOmegaRecordingInterface"
]
}
8 changes: 2 additions & 6 deletions pyflask/manageNeuroconv/manage_neuroconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,7 @@ def convert_to_nwb(info: dict) -> str:
resolved_output_path = resolved_output_directory / nwbfile_path

# Remove symlink placed at the default_output_directory if this will hold real data
if (
not run_stub_test
and resolved_output_directory == default_output_directory
and default_output_directory.is_symlink()
):
if resolved_output_directory == default_output_directory and default_output_directory.is_symlink():
default_output_directory.unlink()

resolved_output_path.parent.mkdir(exist_ok=True, parents=True) # Ensure all parent directories exist
Expand Down Expand Up @@ -401,7 +397,7 @@ def update_conversion_progress(**kwargs):
)

# Create a symlink between the fake data and custom data
if not run_stub_test and not resolved_output_directory == default_output_directory:
if not resolved_output_directory == default_output_directory:
if default_output_directory.exists():
# If default default_output_directory is not a symlink, delete all contents and create a symlink there
if not default_output_directory.is_symlink():
Expand Down
2 changes: 1 addition & 1 deletion schemas/json/dandi/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"description": "From the <a href='https://gui-staging.dandiarchive.org' target='_blank'>staging (testing) server</a>"
}
},
"required": ["main_api_key", "staging_api_key"]
"required": ["main_api_key"]
}
}
}
36 changes: 36 additions & 0 deletions schemas/json/generated/NeuralynxRecordingInterface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"required": [],
"properties": {
"NeuralynxRecordingInterface": {
"required": [
"folder_path"
],
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
},
"stream_name": {
"type": "string"
},
"verbose": {
"type": "boolean",
"default": false
},
"es_key": {
"type": "string",
"default": "ElectricalSeries"
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "source.schema.json",
"title": "Source data schema",
"description": "Schema for the source data, files and directories",
"version": "0.1.0"
}
2 changes: 1 addition & 1 deletion src/renderer/assets/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/* Notfy */
.notyf__toast {
max-width: clamp(300px, 40vw, min-content) !important;
max-width: 40vw !important;
}

.notyf__message {
Expand Down
14 changes: 2 additions & 12 deletions src/renderer/assets/css/guided.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
width: 100%;
height: 100%;
border-radius: 5px;
margin-top: 15px;
}

.guided--nav-bar-dropdown {
Expand Down Expand Up @@ -434,14 +433,6 @@
margin: 6px;
}

.guided--main-tab,
.guided--parent-tab {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}

.guided--page,
.guided--panel {
width: 100%;
Expand Down Expand Up @@ -900,9 +891,10 @@ h1.guided--text-sub-step {
background-color: var(--color-border);
border: none;
display: inline-block;
cursor: pointer;
border-radius: 16px;
cursor: pointer;
}

.guided--capsule.active {
background-color: var(--color-light-green);
}
Expand All @@ -922,7 +914,6 @@ h1.guided--text-sub-step {
background-color: #d5eaff;
border: none;
display: inline-block;
cursor: pointer;
transform: skewx(-25deg);
}
.guided--capsule-sub-page.active {
Expand Down Expand Up @@ -1196,7 +1187,6 @@ h1.guided--text-sub-step {
margin-bottom: 15px;
border-bottom: 5px solid #b80d49;
width: 100%;
margin-top: -0.5rem !important;
}

.guided--button-tab-container {
Expand Down
37 changes: 3 additions & 34 deletions src/renderer/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1471,43 +1471,12 @@ details[open] > summary::before {
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.getting-started-overview {
padding-left: 0 !important;
padding-right: 0 !important;
height: 100%;
text-align: center;
display: flex;
flex-direction: column;
/* display: grid;
grid-template-rows: 68% 14% 15%; */
}

.getting-started-header {
width: auto;
height: 18rem;
.standalone-section {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
margin: 0 auto;
margin-top: 3rem;
align-items: center;
margin-bottom: 0rem;
}

.front-page_logo {
margin-top: 0.5rem;
display: flex;
align-items: center;
flex-direction: row;
width: 63rem;
flex-direction: column;
justify-content: center;
}

.header-text {
font-size: 18px;
margin-top: 1rem;
font-weight: bold;
margin-bottom: 20px;
}

.overview-card-layout {
Expand Down
10 changes: 0 additions & 10 deletions src/renderer/assets/css/section.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
/* Section ------------------ */

.section {
/* position: absolute; */
top: 0;
left: 210px;
right: 0;
bottom: 0;
height: 100%;
width: 100%;
margin-right: 0;
padding: 0px 50px 50px 50px;
display: flex;
flex-direction: column;
/* display: grid;
grid-template-rows: min-content auto;
grid-template-columns: 1fr; */
/* padding-top: 7px;
padding-left: 30px; */
box-sizing: border-box;
overflow-x: hidden;
overflow-y: auto;
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/assets/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
.u-category-windows {
--color-accent: hsl(190, 60%, 36%);
}
.u-category-menu {
--color-accent: hsl(190, 60%, 36%);
}

.u-category-native-ui {
--color-accent: hsl(222, 53%, 50%);
}
Expand Down
6 changes: 2 additions & 4 deletions src/renderer/src/stories/FileSystemSelector.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LitElement, css, html } from "lit";

import { remote } from "../electron/index";
import { fs, remote } from "../electron/index";
const { dialog } = remote;

function getObjectTypeReferenceString(type, multiple, { nested, native } = {}) {
Expand Down Expand Up @@ -126,7 +126,7 @@ export class FilesystemSelector extends LitElement {
};

#checkType = (value) => {
const isLikelyFile = value.split(".").length !== 1;
const isLikelyFile = fs ? fs.lstatSync(value).isFile() : value.split(".").length;
if ((this.type === "directory" && isLikelyFile) || (this.type === "file" && !isLikelyFile))
this.#onThrow("Incorrect filesystem object", `Please provide a <b>${this.type}</b> instead.`);
};
Expand All @@ -150,8 +150,6 @@ export class FilesystemSelector extends LitElement {

if (this.multiple && !Array.isArray(resolvedValue)) resolvedValue = [];

console.log(resolvedValue);

this.value = resolvedValue;
this.onSelect(this.value);
const event = new Event("change"); // Create a new change event
Expand Down
9 changes: 8 additions & 1 deletion src/renderer/src/stories/JSONSchemaInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,14 @@ export class JSONSchemaInput extends LitElement {
modal.toggle(false);
});

return html` <div>${list} ${addButton}</div> `;
return html`
<div
class="schema-input"
@change=${() => validateOnChange && this.#triggerValidation(name, list, path)}
>
${list} ${addButton}
</div>
`;
}

// Basic enumeration of properties on a select element
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/stories/List.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class List extends LitElement {
#empty {
padding: 20px 10px;
margin-left: -40px;
color: gray;
}
Expand Down
22 changes: 14 additions & 8 deletions src/renderer/src/stories/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,16 @@ export class Main extends LitElement {
if (section) {
if (capsules === true || !("capsules" in page)) {
let pages = Object.values(section.pages);
if (pages.length > 1)
capsules = {
const pageIds = Object.keys(section.pages);
if (pages.length > 1) {
const capsulesProps = {
n: pages.length,
selected: pages.map((o) => o.pageLabel).indexOf(page.info.label),
};

capsules = new GuidedCapsules(capsulesProps);
capsules.onClick = (i) => this.toRender.page.to(pageIds[i]);
}
}

if (header === true || !("header" in page) || !("sections" in page.header)) {
Expand All @@ -123,7 +128,6 @@ export class Main extends LitElement {

const headerEl = header ? new GuidedHeader(header) : html`<div></div>`; // Render for grid

const capsuleEl = capsules ? new GuidedCapsules(capsules) : "";
const footerEl = footer ? new GuidedFooter(footer) : html`<div></div>`; // Render for grid

const title = header?.title ?? page.info?.title;
Expand All @@ -137,12 +141,14 @@ export class Main extends LitElement {
return html`
${headerEl}
${capsules
? html`<div style="width: 100%; text-align: center; padding-top: 15px;">${capsuleEl}</div>`
: html`<div style="height: 25px;"></div>`}
? html`<div style="width: 100%; text-align: center; padding-top: 15px;">${capsules}</div>`
: html`<div style="height: 50px;"></div>`}
<main id="content" class="js-content" style="overflow: hidden; display: flex;">
<section class="section js-section u-category-windows">
<section class="section">
${title
? html`<div style="position: sticky; top: 0; left: 0; background: white; z-index: 1;">
? html`<div
style="position: sticky; top: 0; left: 0; background: white; z-index: 1; margin-bottom: 20px;"
>
<div
style="display: flex; flex: 1 1 0px; justify-content: space-between; align-items: end;"
>
Expand All @@ -156,7 +162,7 @@ export class Main extends LitElement {
</div>`
: ""}
<div style="padding-top: 10px; height: 100%; width: 100%;">${page}</div>
<div style="height: 100%; width: 100%;">${page}</div>
</section>
</main>
${footerEl}
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/stories/NavigationSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ export class NavigationSidebar extends LitElement {
render() {
return html`
<nav id="guided-nav" class="guided--nav">
<h1 class="guided--text-sub-step mb-0 mt-0">Guided Mode</h1>
<h4>Sections</h4>
<hr />
<ul id="guided-nav-items" class="guided--container-nav-items">
${Object.entries(this.sections)
.map(([sectionName, info]) => {
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/src/stories/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ export class Search extends LitElement {
background: white;
border-radius: 5px;
width: 100%;
height: 100%;
overflow: auto;
}
.header {
padding: 25px;
background: white;
position: sticky;
top: 0;
z-index: 1;
}
input {
Expand All @@ -45,7 +48,6 @@ export class Search extends LitElement {
position: absolute;
left: 0;
right: 0;
z-index: 1;
background: white;
}
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/src/stories/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ export class Table extends LitElement {
const validator = async function (value, callback) {
if (!value) {
if (!ogThis.validateEmptyCells) {
ogThis.#handleValidationResult(
[], // Clear errors
this.row,
this.col
);
callback(true); // Allow empty value
return true;
}
Expand Down Expand Up @@ -288,7 +293,6 @@ export class Table extends LitElement {
let contextMenu = ["row_below", "remove_row"];
if (this.schema.additionalProperties) contextMenu.push("col_right", "remove_col");

console.log(this.contextMenu);
contextMenu = contextMenu.filter((k) => !(this.contextMenu.ignore ?? []).includes(k));

const descriptionEl = this.querySelector("#description");
Expand Down
Loading

0 comments on commit dbe03be

Please sign in to comment.