When a constructed view has multiple tabs, a Magma /retrieve request is made for each tab. However, if a user enters "Edit" mode before all those requests return, every time a request returns, the page automatically resets itself to "Browse" mode, which is super confusing.
This can be seen in production with an rna_seq record (because they have four tabs?), like
https://timur.ucsf.edu/ipi/browse/rna_seq/IPIADR002.T1.rna.tumor#overview or https://timur.ucsf.edu/ipi/browse/rna_seq/IPICRC003.T1.rna.tcell#overview.
To reproduce:
- Open one of the
rna_seq records above.
- Open the dev tools / network tab to watch the requests.
- Click the pencil / Edit icon as soon as the page appears to load.
- There should be 4 requests to Magma
/retrieve. The first one or two will have finished by the time you click Edit.
- Watch the network page. As the last couple of requests finish, the page will automatically change back to Browse mode with no intervention from the user.
NOTE: It appears that each request is identical, and thus redundant. It should be possible to streamline the calls to one.