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

Create loose selector (autocomplete) for JSONSchemaForm #513

Merged
merged 27 commits into from
Nov 22, 2023

Conversation

garrettmflynn
Copy link
Member

A component of #512 to allow for cross-row comparison. Also makes the Species interactions uniform across tables and forms.

@garrettmflynn garrettmflynn self-assigned this Nov 12, 2023
@garrettmflynn garrettmflynn changed the title Create loose selector (autocomplete) to JSONSchemaForm Create loose selector (autocomplete) for JSONSchemaForm Nov 12, 2023
@garrettmflynn garrettmflynn marked this pull request as ready for review November 15, 2023 18:40
@garrettmflynn
Copy link
Member Author

garrettmflynn commented Nov 15, 2023

@CodyCBakerPhD This is ready to go—aside from any fixes we want on the DANDI side. I added the common names as additional "keywords", so those are still searchable and show up in the form autocomplete view.

@CodyCBakerPhD
Copy link
Collaborator

Bug: session start time is now exposed at global NWB file metadata

image

Same for Subject ID

image

@CodyCBakerPhD
Copy link
Collaborator

And subject age/dob/etc

@CodyCBakerPhD
Copy link
Collaborator

Easiest fix might just be to do what we were going to do anyway and remove those pages at the start and go straight to selecting data formats

@garrettmflynn
Copy link
Member Author

Yep agreed

@garrettmflynn
Copy link
Member Author

garrettmflynn commented Nov 21, 2023

Fixed removing the session-specific properties in the metadata preprocessing script here. Will remove the global pages in a separate PR

@CodyCBakerPhD
Copy link
Collaborator

Fixed removing the session-specific properties in the metadata preprocessing script here. Will remove the global pages in a separate PR

I still see all the same ones after deleting and regenerating the pipeline - did I need to do a rebuild with npm ci as well?

@garrettmflynn
Copy link
Member Author

Argh. My bad, flipped the default value for one of the arguments that is used to determine whether to generate the global vs. session metadata.

Just fixed and tested locally.

@CodyCBakerPhD
Copy link
Collaborator

I can confirm the unintended fields are removed from the global forms, but now the auto-complete is no longer working on that page or the subject metadata table page (the dropdown)

@garrettmflynn
Copy link
Member Author

Hmm I just tested and it works fine for me. Do you see any errors in the console?

Just as a reminder, it doesn't populate immediately because of the required API call—so it won't show up as a search component when you reload. Though if you navigate off and back on, it should.

@CodyCBakerPhD
Copy link
Collaborator

The only 4 things that pop up in the console (conda or in-app dev) when I type stuff in the subject species box are

127.0.0.1 - - [21/Nov/2023 19:20:48] "OPTIONS /neuroconv/validate HTTP/1.1" 200 -

127.0.0.1 - - [21/Nov/2023 19:20:48] "OPTIONS /neuroconv/validate HTTP/1.1" 200 -

127.0.0.1 - - [21/Nov/2023 19:20:48] "POST /neuroconv/validate HTTP/1.1" 200 -

127.0.0.1 - - [21/Nov/2023 19:20:48] "POST /neuroconv/validate HTTP/1.1" 200 -

No matter how long I wait

Then, when I first navigate to the subject metadata table page, closest thing I see to an error is

Uncaught (in promise) undefined :5173/?page=conversi…IDE+Tutorial+Data:1
<html>
<body>
<!--StartFragment-->
Promise.then (async) |   |  
-- | -- | --
  | (anonymous) | @ | globals.ts:15
  | resolve | @ | globals.ts:14
  | preprocessMetadataSchema | @ | base-metadata.schema.ts:67
  | default | @ | subject.schema.ts:11
  | render | @ | GuidedSubjects.js:115
  | update | @ | lit-element.ts:160
  | performUpdate | @ | reactive-element.ts:1329
  | scheduleUpdate | @ | reactive-element.ts:1261
  | __enqueueUpdate | @ | reactive-element.ts:1233
  | await in __enqueueUpdate (async) |   |  
  | requestUpdate | @ | reactive-element.ts:1208
  | (anonymous) | @ | Dashboard.js:214
  | Promise.then (async) |   |  
  | setMain | @ | Dashboard.js:213
  | Dashboard.window.onpushstate.window.onpopstate | @ | Dashboard.js:129
  | Dashboard.window.history.pushState | @ | Dashboard.js:118
  | #activatePage | @ | Dashboard.js:309
  | attributeChangedCallback | @ | Dashboard.js:159
  | main.onTransition | @ | Dashboard.js:278
  | to | @ | Page.js:85
  | onNext | @ | GuidedPathExpansion.js:226
  | await in onNext (async) |   |  
  | handleEvent | @ | lit-html.ts:2018

<!--EndFragment-->
</body>
</html>

@garrettmflynn
Copy link
Member Author

garrettmflynn commented Nov 22, 2023

Whoa. Can you regenerate the Tutorial pipeline and see if it persists?

@CodyCBakerPhD
Copy link
Collaborator

Whoa. Can you regenerate the Tutorial pipeline and see if it persists?

That's what I have been doing - including re-running npm ci

Only thing I haven't done is a complete reinstall of environment but I can try that next

@CodyCBakerPhD
Copy link
Collaborator

OK a fresh environment fixed everything 🤷‍♀️

@CodyCBakerPhD
Copy link
Collaborator

@CodyCBakerPhD CodyCBakerPhD merged commit 5805725 into main Nov 22, 2023
11 checks passed
@CodyCBakerPhD CodyCBakerPhD deleted the loose-select-dropdown branch November 22, 2023 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants