Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-project: Return active, completed workflows when project is out of data #6450

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

goplayoutside3
Copy link
Contributor

@goplayoutside3 goplayoutside3 commented Nov 7, 2024

Package

app-project

Linked Issue and/or Talk Post

Closes: #6188
Old corresponding PFE PR: zooniverse/Panoptes-Front-End#5394

Describe your changes

  • Edit fetchWorkflowsHelper() to first request active incomplete workflows, and if all active workflows are complete, return all active workflows for display in WorkflowSelector.
  • Remove subjectSets: [] from workflow object in fetchWorkflowsHelper(). The add-on subjectSets property is handled in each page file for /classify/workflow/[workflowId] and not needed in the helper function, which is intended to be agnostic to whether a workflow is configured for subject set selection.
  • Clean up fetchWorkflowsHelper.spec for readibility.

How to Review

  • The active FEM project spreadsheet is helpful here.
  • If a project is complete, such as Davy Notebooks, all active workflows should be available as buttons on the homepage or after clicking Classify
  • If a project has incomplete workflows, the UI should not change compared to production
  • If a project has no active workflows at all (such as RBGE Herbariaum), the WorkflowSelector has no buttons.

Checklist

PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.

General

  • Tests are passing locally and on Github
  • Documentation is up to date and changelog has been updated if appropriate
  • You can yarn panic && yarn bootstrap or docker-compose up --build and FEM works as expected
  • FEM works in all major desktop browsers: Firefox, Chrome, Edge, Safari (Use Browserstack account as needed)

General UX

Example Staging Project: i-fancy-cats

  • All pages of a FEM project load: Home Page, Classify Page, and About Pages
  • Can submit a classification
  • Can sign-in and sign-out
  • The component is accessible

Refactoring

  • The PR creator has described the reason for refactoring
  • The refactored component(s) continue to work as expected

@@ -67,12 +70,12 @@ async function buildWorkflow(workflow, displayName, env) {
id: workflow.id,
links: workflow.links,
prioritized: workflow.prioritized,
subjectSets: []
Copy link
Contributor Author

@goplayoutside3 goplayoutside3 Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The add-on subjectSets property is handled in each page file for /classify/workflow/[workflowId] and not needed in the helper function, which is intended to be agnostic to whether a workflow is configured for subject set selection.

You'll see this remove from spec files too.

@goplayoutside3 goplayoutside3 requested a review from a team November 7, 2024 19:23
@coveralls
Copy link

coveralls commented Nov 7, 2024

Coverage Status

coverage: 77.591% (+0.003%) from 77.588%
when pulling 43a2b89 on handle-all-complete-workflows
into 0859941 on master.

@mcbouslog mcbouslog self-assigned this Nov 12, 2024
@mcbouslog mcbouslog requested review from mcbouslog and removed request for a team November 12, 2024 17:26
Copy link
Contributor

@mcbouslog mcbouslog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! We checked multiple projects with different workflow configurations.

@github-actions github-actions bot added the approved This PR is approved for merging label Nov 12, 2024
@mcbouslog mcbouslog removed their assignment Nov 12, 2024
@goplayoutside3 goplayoutside3 merged commit 5c66752 into master Nov 12, 2024
7 checks passed
@goplayoutside3 goplayoutside3 deleted the handle-all-complete-workflows branch November 12, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Availability of Buttons for Completed Workflows on Project Landing Page
3 participants