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

Add Nearby Tasks Widget in task review #2063

Merged
merged 6 commits into from
Sep 4, 2023
Merged

Conversation

CollinBeczak
Copy link
Collaborator

Purpose: To help reviewers see if there are any nearby tasks that should've been completed with the task, or task bundle submitted.
Screen Shot 2023-07-26 at 4 37 23 PM
Screen Shot 2023-07-26 at 4 37 16 PM

@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2023

Codecov Report

Merging #2063 (746bd4f) into develop (d2d0792) will decrease coverage by 0.10%.
Report is 12 commits behind head on develop.
The diff coverage is 11.95%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           develop    #2063      +/-   ##
===========================================
- Coverage    25.05%   24.95%   -0.10%     
===========================================
  Files          635      640       +5     
  Lines        21489    22167     +678     
  Branches      6532     6826     +294     
===========================================
+ Hits          5383     5531     +148     
- Misses       13502    13910     +408     
- Partials      2604     2726     +122     
Files Changed Coverage Δ
src/components/ReviewTaskPane/ReviewTaskPane.js 12.90% <ø> (ø)
src/components/TaskPane/PublicTaskPane.js 21.42% <ø> (ø)
src/components/TaskPane/TaskPane.js 4.90% <ø> (ø)
...dgets/ReviewNearbyTasksWidget/TaskMarkerContent.js 0.00% <0.00%> (ø)
src/components/Widgets/widget_registry.js 50.00% <ø> (ø)
...ReviewNearbyTasksWidget/ReviewNearbyTasksWidget.js 4.41% <4.41%> (ø)
src/components/TaskClusterMap/TaskClusterMap.js 33.51% <57.14%> (+2.78%) ⬆️

... and 17 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AndrewPhilbin
Copy link
Contributor

I'm getting an error because of a missing prevProps argument/parameter in the componentWillUnmount lifecycle for the ReviewNearbyTasksWidget:

componentWillUnmount() {
    const challengeId = _get(this.props.task, 'parent.id');
    if (_isFinite(challengeId)) {
      this.props.unsubscribeFromChallengeTaskMessages(challengeId);
    }

    if (
      _isFinite(_get(this.props, 'task.id')) &&
      _isFinite(_get(prevProps, 'task.id')) &&
      this.props.task.id !== prevProps.task.id
    ) {
      this.props.resetSelectedTasks();
    } else if (
      this.props.task &&
      this.props.selectedTasks &&
      !this.props.isTaskSelected(this.props.task.id)
    ) {
      this.props.selectTasks([this.props.task]);
    }
  }

Adding prevProps as an argument seems to fix:

componentWillUnmount(prevProps) {
  ...
}

@AndrewPhilbin AndrewPhilbin merged commit 8c1805f into develop Sep 4, 2023
@jschwarz2030 jschwarz2030 deleted the tasksTaskWidget branch October 18, 2023 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants