You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The project Hero component makes API requests for a project's active workflows when it mounts. Linked subject sets are also loaded, even if the project home page doesn't display them.
Describe the solution you'd like
Active workflows should be requested once. The request isn't authenticated, so could be made on the server.
Ideally, subject sets should only be requested by projects that use grouped workflows (but we don't know if workflows are grouped until we've requested them from the API.)
The text was updated successfully, but these errors were encountered:
Another option would be to store a snapshot of the store in localStorage or IndexedDB, check for the existence of this prior to making the request, and load up the snapshot if it exists rather than make the requests. This is the strategy we're planning for the classifier. If we use a snapshot, we can preload via snapshot into the classifier store as well? We would have to make sure the store trees matched between the project app and classifier.
PH-TESS is out of data at the moment, so not loading workflows, but Galaxy Zoo makes four extra requests for subject sets linked to its workflows. It'd be nice to defer those unless a project is actually using subject set selection. https://fe-project.zooniverse.org/projects/zookeeper/galaxy-zoo
Package
app-project
Is your feature request related to a problem? Please describe.
The project Hero component makes API requests for a project's active workflows when it mounts. Linked subject sets are also loaded, even if the project home page doesn't display them.
front-end-monorepo/packages/app-project/src/screens/ProjectHomePage/components/Hero/HeroContainer.js
Lines 28 to 30 in 672df21
To see this, try the following with the Network tools open. Look for API requests that fetch
workflows
andset_member_subjects
.Describe the solution you'd like
Active workflows should be requested once. The request isn't authenticated, so could be made on the server.
Ideally, subject sets should only be requested by projects that use grouped workflows (but we don't know if workflows are grouped until we've requested them from the API.)
The text was updated successfully, but these errors were encountered: