broadinstitute / gnomad-blog

Blog for the gnomAD project
https://gnomad.broadinstitute.org/news/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Add genome build to dropdowns to changelog #124

Closed elissa-alarmani closed 1 year ago

elissa-alarmani commented 1 year ago

Related PR: https://github.com/broadinstitute/gnomad-browser/pull/1152

Adds a entry to the changelog noting addition of the genome builds to dropdowns in the browser.

elissa-alarmani commented 1 year ago

Thanks for the suggestions and feedback @mattsolo1 and @ch-kr! I just implemented those changes

mattsolo1 commented 1 year ago

Hmm... not seeing the images on the preview https://gnomad.broadinstitute.org/news/preview/124/2023-08-add-genome-build-to-dropdowns

image

@rileyhgrant any idea what's going on?

rileyhgrant commented 1 year ago

@ rileyhgrant any idea what's going on?

Yup, this is because of some funny directory stuff going on under the hood when Gatsby builds the site. The paths referenced should look like ../images/<my-image> rather than ../../static/images/<my-image>. Here is an example PR, if that's more helpful.

In addition, I would request adding an alt attribute to the <img> tags, for accessibility reasons :)

elissa-alarmani commented 1 year ago

Thanks @rileyhgrant for letting me know! I updated the image path and on the preview it looks like the images are loading

ch-kr commented 1 year ago

The updated change looks good to me! I have one slightly annoying question, though. Now that I've seen the dropdowns side by side, I was wondering: why not make the displays consistent? By that, I mean also group the dataset selection dropdown by build:

GRCh38
gnomAD v3.1.2
76,156 samples

gnomAD v3.1.2 (non-cancer)
74,023 samples
...

GRCh37
gnomAD v2.1.1
141,456 samples
...

instead of the current display?

elissa-alarmani commented 1 year ago

That's a good point to keep consistency, would it look something like this? Screenshot 2023-08-16 at 1 26 00 PM

ch-kr commented 1 year ago

yes, exactly! It might be a good idea to make the build gray here also (to visually match the search bar)

rileyhgrant commented 1 year ago

yes, exactly! It might be a good idea to make the build gray here also (to visually match the search bar)

Nice, I like this idea KC. Alas, the color of the categories is browser dependent, since it's using an HTML tag instead of a react component. That said, most people are likely using Chrome.

Firefox:

firefox

Chrome:

firefox

Safari:

firefox
elissa-alarmani commented 1 year ago

Here is another possible view, I didn't change the color but just reduced its opacity like how it was done with each dataset details of their sample count

Screenshot 2023-08-16 at 4 34 39 PM
ch-kr commented 1 year ago

Alas, the color of the categories is browser dependent, since it's using an HTML tag instead of a react component.

ooh, TIL! In that case, no preference from me about the exact color of the genome build text. My priority is making sure the color in the two views match (so with the colors above: for someone using chrome, the build text should be gray in both views, and for someone using firefox, the build text should be black in both views)

mattsolo1 commented 1 year ago

I personally don't think it's terribly important that the search bar styling matches with the dataset drop down exactly. One is clearly a standard HTML component, the other a custom component. I do think the bold version of the dataset dropdown is a bit more clear and would opt for this across all browsers.