gigascience / gigadb-website

Source code for running GigaDB
http://gigadb.org
GNU General Public License v3.0
9 stars 15 forks source link

Remove "Keywords:" from Dataset landing page if there are no keywords #2027

Open tuli opened 2 months ago

tuli commented 2 months ago

User story

As a website user
I want the word "Keywords" not to be visible if the dataset has no keywords So that the landing page looks better

Acceptance criteria

Given conditions : a dataset spreadsheet is generated where the keywords column is empty. When event: the spreadsheet is uploaded to the database by tech Then outcome: the word "Keywords: " should not be visible on the dataset landing page.

Given a dataset as some keywords attached to it When I navigate to the dataset form And I remove all the keywords Then the word "Keywords: " should not be visible on the dataset landing page.

Additional Info

Product Backlog Item Ready Checklist

Product Backlog Item Done Checklist

GigaDBUpload_v19_102572_GIGA-D-23-00276_stereo.xls

Screenshot 2024-09-11 at 11 28 48

luistoptal commented 1 month ago

@only1chunts is there a way for me to get access to this dataset?

only1chunts commented 1 month ago

I've just had a look for public datasets that have no keywords and found 102537, and that does NOT show the issue that @tuli raised! I can still see the issue on the Mockup page of the one that Mary Ann found it on, so its a real issue on mock up pages, but its been fixed on the public pages.

luistoptal commented 1 month ago

@only1chunts it's hard for me to tell what is going on here without looking directly at the database but my guess is that the db contains something like an empty string or maybe a space, this would display the keywords title in screen like in the mockup. My PR fixes that. Can you tell me if this dataset has something like an empty space in the keywords field in the DB, to verify?

only1chunts commented 1 month ago

@luistoptal if it does then its not showing any evidence of it in the admin page i.e. the box where we enter them has the place holder text showing: image Of interest, I noticed a related bug while checking this #2061

luistoptal commented 1 month ago

@rija @only1chunts I don't think I have access to the production database, if I had access to it, I would look at wherever the keywords recoird is for the entry provided above and see what's in there exactly, for example maybe there's a comma or a space that is filtered by the input (speculating). Based on the frontend code, the only case where the "Keywords:" would be displayed empty is if the list of keywords contained a blank spaxce, a comma or something similar, the PR a few lines above solves that case though

only1chunts commented 1 month ago

I think @luistoptal might be correct in that there must be a hidden value for the keywords associated with that particular dataset (102572) somehow because I've finally now found a previously published dataset with no keywords in it and that doesn't have the same issues, i.e. it does not display the Keywords header as expected when there are no keywords e.g. 100532