Skip to content

Edit mode automatically resets to browse mode if editing before tab documents returned #278

@coleshaw

Description

@coleshaw

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:

  1. Open one of the rna_seq records above.
  2. Open the dev tools / network tab to watch the requests.
  3. Click the pencil / Edit icon as soon as the page appears to load.
  4. There should be 4 requests to Magma /retrieve. The first one or two will have finished by the time you click Edit.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions