💾 Archived View for thebird.nl › gn-gemtext-threads › issues › trait-page-mapping-bug.gmi captured on 2023-05-24 at 18:13:09. 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