💾 Archived View for thebird.nl › gn-gemtext-threads › issues › trait-page-mapping-bug.gmi captured on 2023-04-19 at 23:13:40. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-03-20)

-=-=-=-=-=-=-

Bug when a user quickly clicks "Compute" for mapping on the trait page

Tags

Description

The user sometimes gets a 405 error when they click the "Compute" button on the trait page. This is because the page needs to fully load in beforehand, which can take up to a couple seconds.

I'm not sure how best to address this. The most simple option would be to have the Compute button be greyed out until all the JS is finished loading. I'll probably do this for now, since I'm not sure how else to address the issue of the DataTable needing to load in (since it needs to be in the DOM in order for the sample values to be used in mapping).

Updates

I ended up defaulting the mapping compute buttons to be disabled and say "Loading..."; they're then enabled and have their text changed back to "Compute" after the DataTables have finished loading in.

A good trait for testing this (because it has a giant table that takes a long time to load) is this - https://genenetwork.org/show_trait?trait_id=10011&dataset=BXD-LongevityPublish