Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload section headers #497

Merged
merged 3 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/renderer/assets/css/section.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
transform 0.12s ease-in-out;
}


nwb-main h3,
nwb-main p {
color: var(--color);
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,13 @@ const pages = {
start: new GuidedStartPage({
label: "Start",
}),

details: new GuidedNewDatasetPage({
title: "Project Setup",
label: "Project details",
section: sections[0],
}),

structure: new GuidedStructurePage({
title: "Data Formats",
label: "Data formats",
Expand Down
42 changes: 25 additions & 17 deletions src/renderer/src/stories/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,33 @@ export class Main extends LitElement {

return html`
${headerEl}
${capsules
? html`<div style="width: 100%; text-align: center; padding-top: 15px;">${capsules}</div>`
: html``}
${title
? html`<div
style="position: sticky; padding: 0px 50px; top: 0; left: 0; background: white; z-index: 1; ${capsules ? '' : 'padding-top: 35px;'}"
>
<div style="display: flex; flex: 1 1 0px; justify-content: space-between; align-items: end;">
<div style="line-height: 1em; color: gray;">
<h1 class="title" style="margin: 0; padding: 0; color:black;">${title}</h1>
<small>${unsafeHTML(subtitle)}</small>
${
capsules
? html`<div style="width: 100%; text-align: center; padding-top: 15px;">${capsules}</div>`
: html``
}
${
title
? html`<div
style="position: sticky; padding: 0px 50px; top: 0; left: 0; background: white; z-index: 1; ${capsules
? ""
: "padding-top: 35px;"}"
>
<div style="display: flex; flex: 1 1 0px; justify-content: space-between; align-items: end;">
<div style="line-height: 1em; color: gray;">
<h1 class="title" style="margin: 0; padding: 0; color:black;">${title}</h1>
<small>${unsafeHTML(subtitle)}</small>
</div>
<div style="padding-left: 25px;">${controls}</div>
</div>
<div style="padding-left: 25px;">${controls}</div>
</div>
<hr style="margin-bottom: 0;" />
</div>`
: ""}
<hr style="margin-bottom: 0;" />
</div>`
: ""
}

<main id="content" class="js-content" style="overflow: hidden; ${capsules || title ? '' : 'padding-top: 35px;'}"">
<main id="content" class="js-content" style="overflow: hidden; ${
capsules || title ? "" : "padding-top: 35px;"
}"">
<section class="section">${page}</section>
</main>
${footerEl}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/stories/pages/globals.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const sections = ["Project Structure", "Data Review", "Conversion Preview", "Final Review"];
export const sections = ["Project Structure", "Data Entry", "Conversion Preview", "Upload & Review"];
12 changes: 6 additions & 6 deletions src/renderer/src/stories/pages/guided-mode/GuidedStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Page } from "../Page.js";
import "./GuidedFooter";
import { InfoBox } from "../../InfoBox.js";
import { InspectorListItem } from "../../preview/inspector/InspectorList.js";
import { sections } from "../globals.js";

export class GuidedStartPage extends Page {
constructor(...args) {
Expand Down Expand Up @@ -57,11 +58,11 @@ export class GuidedStartPage extends Page {
<p>
In the GUIDE, the process of running a conversion pipeline is broken into four high-level sections.
<p>
<h4>1. Project Structure</h4>
<h4>1. ${sections[0]}</h4>
<p>
The first section will direct you to specify the high-level structure of your conversion pipeline, including data formats and global metadata.
</p>
<h4>2. Data Review</h4>
<h4>2. ${sections[1]}</h4>
<p>
The second section will have you provide your source data files and NWB File metadata on a per-subject basis to populate your files.
</p>
Expand All @@ -86,17 +87,16 @@ export class GuidedStartPage extends Page {
— though you don't need to specify a value at the current stage.
</p>

<h4>3. Conversion Preview</h4>
<h4>3. ${sections[2]}</h4>
<p>
In the third section, you will preview your conversion before uploading to DANDI.
</p>
<h4>4. Final Review</h4>
<h4>4. ${sections[3]}</h4>
<p>
Finally, you will upload your conversion to DANDI and review the resulting Dandiset.
</p>

<br>
<h4>Additional Resources</h4>
<h2 style="padding: 0; font-size: 20px;">Additional Resources</h2>
<hr>
${new InfoBox({
header: "Where can I learn more about the conversion process?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ const propsToIgnore = [
];

export class GuidedSourceDataPage extends ManagedPage {


constructor(...args) {
super(...args);
this.style.height = "100%"; // Fix main section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ export class GuidedStructurePage extends Page {
this.addButton.setAttribute("hidden", "");

return html`
<div style="width: 100%; display: flex; flex-direction: column; align-items: center;">${this.list} ${this.addButton}</div>
<div style="width: 100%; display: flex; flex-direction: column; align-items: center;">
${this.list} ${this.addButton}
</div>
${this.searchModal}
`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export class GuidedStubPreviewPage extends Page {
constructor(...args) {
super(...args);
this.style.height = "100%"; // Fix main section

}

header = {
Expand Down
8 changes: 3 additions & 5 deletions src/renderer/src/stories/pages/settings/SettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export class SettingsPage extends Page {
if (!this.unsavedUpdates) return this.#openNotyf("All changes were already saved", "success");
this.save();
},
})
]
}),
],
};

constructor(...args) {
Expand Down Expand Up @@ -76,9 +76,7 @@ export class SettingsPage extends Page {
onThrow,
});

return html`
${this.form}
`;
return html` ${this.form} `;
}
}

Expand Down
Loading