tom-and-the-toothfairies / pathways

:older_woman: :hospital: :pill: :pill:
https://tomandthetoothfairies.info/
5 stars 0 forks source link

Passionfruit #181

Closed 22a closed 7 years ago

22a commented 7 years ago

Opening to see how many cucumbers I have snapped. 🥒

This PR:

Tab UI looks like this:

screen shot 2017-04-01 at 04 31 24

and implements a few possibly useful things like the error tab pulling focus when there's an error and reverting back to the analysis tab otherwise, and automatic numbering on the warning tab (which is also possible to implement for the error tab but atm I've hard coded that to 1 because one error breaks our request chain thus preventing a second error).

It also moves a lot of the if ( things_we_want_to_display.length > 0) { logic into the view module.

22a commented 7 years ago

Nice, many sheared vegetables, I'll worry about those tests tomorrow, from what I can tell they're mostly about the warning panels not being visible when there's no errors (as they're a tab click away now).

Also I forgot to include a screenshot of the new DDI display:

screen shot 2017-04-01 at 04 39 01

the wrapper around the ddi info changes from green to red depending on the harmful attribute.

As always, if you don't like this feel free to change it, nothing's set in stone.

Also I didn't know if the enclosing_constructs attribute is relevant to some feature so I didn't display it.

c-brenn commented 7 years ago

:wow: Looks very nice.

Do you think we should display the line numbers of the drugs in a DDI? They're in the /api/ddis response iirc.

c-brenn commented 7 years ago

Colour coding DDIs is a really good idea.

One strange nuance of his DDI categorisations is alternative DDIS. An alternative DDI is when two arms of a branch contain drugs that interact when taken together. Because they're in a branch they can't be taken together and so should never actually interact. The customer wants us to highlight them anyway.

I'd suggest maybe orange for alternative DDIS if they are harmful. And green otherwise.

All other DDIs are harmful if the participating drugs are harmful.

houli commented 7 years ago

Want to also sneak in Save PML TX file instead of download

c-brenn commented 7 years ago

Do you think we can get rid of the TX? Just Save PML File?

houli commented 7 years ago

It's a brand

c-brenn commented 7 years ago

I'm wondering about the positioning of the download button too. Not a fan of it's current spot at the bottom. Any ideas?

houli commented 7 years ago

Oh actually, a test for the numbers yes

c-brenn commented 7 years ago

Certainly worthy of a mention in the change log too.

houli commented 7 years ago

The testing documentation needs a sizy overhaul but I will assign myself that

houli commented 7 years ago

Some of the finest grapefruit on the market, I'm happy