AllenNeuralDynamics / aind-metadata-entry-js

Metadata entry using javascript
https://metadata-entry.allenneuraldynamics.org
MIT License
1 stars 1 forks source link

Remove decimal drop down #177

Closed micahwoodard closed 2 months ago

micahwoodard commented 2 months ago

fixes #148

micahwoodard commented 2 months ago

Hi @helen-m-lin and @mekhlakapoor I'm definitely not done but so far I've created a custom select widget and basically if the options == ['string', 'number'], the selectwidget doesn't appear. It's working in that aspect but the formatting now seems off for the rest of the select widgets. I was wondering if you had any suggestions on why or how to change it back to match the rest of the widgets? I'm going to keep digging but figured I'd ask if you knew off the top of your head!

micahwoodard commented 2 months ago

I added test scripts and checked that all anyOfs have number first. I think I need to add another layer if the options are number, string, null though so currently doing that

micahwoodard commented 2 months ago

Okay added in condition of removing string if options are number/string/null

micahwoodard commented 2 months ago

Left some comments! Could you also check that the output json passes pydantic validation?

Yes it seems like it validates, but I'm basing that on the fact that when I click the validate button, it doesn't complain. Is that what you mean?

micahwoodard commented 2 months ago

John mentioned that the text box actually needs to be a string text box so I'm working on that now

micahwoodard commented 2 months ago

@helen-m-lin I've spent a bit of time last week and this morning trying to figure out how to either change the resulting textbox or change the default of the anyof widget but I haven't had a ton of luck. Is there anything you would suggest looking into or would changing the schema to have the string be the first input be a possibility?