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

Allow users to upload templates #403

Merged
merged 7 commits into from
Jul 14, 2023
Merged

Allow users to upload templates #403

merged 7 commits into from
Jul 14, 2023

Conversation

ivansg44
Copy link
Collaborator

Added upload template option in file menu

Load template fn now receives optional file arg, which should be an uploaded schema.json file.

ivansg44 added 6 commits July 12, 2023 14:13
* Also "change template" now "select template" in file menu
* Checks for json extension, and shows error msg if needed

* Other housekeeping copy/pasted from open file callback
@ivansg44 ivansg44 added the enhancement New feature or request label Jul 13, 2023
@ivansg44 ivansg44 requested review from ddooley and pkalita-lbl July 13, 2023 22:58
lib/toolbar.html Outdated
@@ -26,7 +38,7 @@
>
<input
type="file"
accept=".xlsx,.xls,.tsv,.csv,.json"
accept=".json"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you were probably testing this - or maybe reusing? At any rate we need ".xlsx,.xls,.tsv,.csv," back in there - or else regular data files can't be loaded. A test data file is in the cancogen template folder under example input. Maybe this means a separate input for data load rather than template load.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change should have been under upload template, but put it under open file

Copy link
Collaborator

@ddooley ddooley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorting out the file load permitted file type input; vs template load input.

@ivansg44 ivansg44 requested a review from ddooley July 14, 2023 18:27
Copy link
Collaborator

@ddooley ddooley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Collaborator

@pkalita-lbl pkalita-lbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. It doesn't need to be hashed out here, but this is reminding me that at some point we should get back to the discussion about using proper LinkML semantics instead of the is_a == 'dh_interface' thing (see also #390 and #338)

@ddooley
Copy link
Collaborator

ddooley commented Jul 14, 2023

Yes, I'm wondering what a purer solution looks like than "is_a dh_interface" but we can take it back to #338 . Any class can be displayed by DH more or less usefully. The menu system needs some kind of way to be cued about top-level-nice-DH-classes default that can be overridden though.

@ddooley ddooley merged commit 27ec8ec into master Jul 14, 2023
@ivansg44 ivansg44 deleted the upload_templates branch July 17, 2023 17:22
kennethbruskiewicz pushed a commit that referenced this pull request Aug 21, 2023
Allow users to upload templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants