chop-dbhi / ehb-datasources

datasource drivers, e.g. REDCap and Nautilus, that can be plugged into the Biorepository Portal
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

Issue166 redcap form status #43

Closed stxphcodes closed 5 years ago

stxphcodes commented 5 years ago

Add completion field to redcap forms and display and cache completion status on record table.

r3m0chop commented 5 years ago

Having just seen this for the first time, I am curious if this well needed "Color coding redcap record table" has taken into account any accessibility issues surrounding those with color blindness that might not allow for the user to distinguish such variations in color?

For your consideration, rather than merely setting style="background-color:<color>" (or its updated class="btn btnsmall btn-<success_status>"), you may want to also consider including an additional icon, or (likely for most accessibility) at least providing alternate wording such as Update rather than Edit where applicable.

I might further recommend that you .format() these all together into a single string_to_return variable with each if, rather than doing the format at each return, in order to improve maintainability. And, along the lines of maintainability, I also note that this same set of code seems to appear in a couple different places in ehb_datasources/drivers/redcap/driver.py that could be consolidated and possibly even incorporate more self-documenting variable names than i, j, and l, for example. But I digress, and will aim to save such code-directed details for the actual code review. Just wanted to emphasize the very "accessible" possibilities of including further accessibility into the representation.

stxphcodes commented 5 years ago

@r3m0chop Great suggestions - thank you! I will try to address some of them before the code review so we don't have to go over it twice. As for color blindness, interesting and definitely applicable point. I will look into different alternatives/additions to the edit buttons.

seg1129 commented 5 years ago

@szh2425 We can make the color blindness a new issue and implement in another phase. @r3m0chop, great suggestion thank you!