-
Notifications
You must be signed in to change notification settings - Fork 3
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
First Round of Updates from Oliver User Test #548
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Some conflicts here now |
This looks great! A first step towards the 'auto-population from a DOI' functionality
Not crazy about this - it's adding a ton of uninformative text to the metadata forms that creates visual clutter - what problem was this intended to solve? Also, 'NWBFile' is an unusual reference outside of a programmatic context. It's the technical name for the neurodata type of the file itself, and the name of the Python parent class, but we usually refer to the file itself as 'NWB file(s)' Also also these fields are actually written to the 'general' group of the file, not attributes of the file itself; likewise, subject info is technically 'general/subject/...', but I don't think that it really important to understand when inputting these values in a turbo-tax like way |
Feels great!
LGTM |
When you open an accordion and fill things in, you might lose track of what general header (e.g. General Metadata, previously NWBFile, which is still the path identifier; Subject; etc.) a certain property is referring to. I agree it comes with a bit of clutter and some reference inconsistencies. I could take it or leave it—though it was something that Oliver emphasized as a possible issue that I agree with. This is easily toggled on / off with a flag passed as JSONSchemaForm properties. Alternatively, maybe we could take a different tactic? Like some sort of indicator that sticks on the top-right of the instance window that tells users what sub-property they are currently at? |
A toggleable setting would be fine with me, first major aspect design/layout aspect that leads down the road of fine detail configurability so that's fun Indicator might also be a good idea I do think that this could be separated out to a different issue with different proposed PRs to easily compare feel of different implementations; it's not as straightforward as the other simple improvements on this PR |
Alright, I've toggled this behavior off for now. I'll open a new PR after implementing an indicator rather than the current method that replicates the displayed path alongside all JSONSchemaInput instances. |
} | ||
}; | ||
|
||
#moveToNextInput = (ev) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ev' = 'event'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike ogThis
, both ev
(or even just e
) and el
are somewhat standard abbreviations in Javascript, similar to Python's except Exception as e
. See https://dev.to/rahulbhai9/every-abbreviation-used-in-javascript-explained-29p2
Though I understand that more explicit variables could be better. There're at least 10 instances of each of these in the code, so I'd change all of those if that's what you'd prefer.
Should I move forward with that? If so, I think it'll be more appropriate to seek out and remove all my abbreviations in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I understand that more explicit variables could be better. There're at least 10 instances of each of these in the code, so I'd change all of those if that's what you'd prefer.
Should I move forward with that? If so, I think it'll be more appropriate to seek out and remove all my abbreviations in a separate PR
Sure, if a single PR to adjust all abbreviations is easier for you
except Exception as e
We also try to avoid that; I always do except Exception as exception
, the most we usually reduce to is exc
. But in any case we're appealing to readability for those who might not be familiar with such patterns or if they once were perhaps they have forgotten; no reason not to just write out what you mean in any case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I'll get started with that abbreviation PR.
DOI validation seems to have problems; I can't even submit the 'example' DOI successfully Perhaps this is a cross platform regex issue? Note the Inspector only checks the start of the string (https://github.com/NeurodataWithoutBorders/nwbinspector/blob/dev/src/nwbinspector/checks/nwbfile_metadata.py#L117), and now that I checked that I see it also does take a handful of specific URL domains too, forgot about those ("http://dx.doi.org/", "https://doi.org/") |
I'd just mistakenly included the I've updated the associated regex to allow any of those prefixes. |
OK LGTM - added one small extra bit to the description on the popup for the alternative https form and tested both with a real publication |
Beyond #547, this PR implements the following changes as noted in @oruebel's user test: