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

Simplify conditional logic in ActiveTaskControls.js #2398

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Simplify conditional logic in ActiveTaskControls.js #2398

merged 1 commit into from
Aug 12, 2024

Conversation

jake-low
Copy link
Contributor

@jake-low jake-low commented Aug 8, 2024

I started making these changes as part of #2397 but realized that they could be kept separate and would be easier to review that way.

This is just a minor style refactor to (IMO) make it slightly easier to tell what version of the completion widget will be shown based on the properties of the task that's currently being worked on. It should have no effect on behavior; all I did was move some terminal else branches upwards (making them into early returns) in order to reduce the level of nesting, and factored one complex condition out into a named variable.

Tip: check "Hide whitespace" in the diff view settings for this PR to make review easier. Most of the changes shown by default are the result of un-indenting a large else block.

@jake-low jake-low changed the title Simplify onditional logic in ActiveTaskControls.js Simplify conditional logic in ActiveTaskControls.js Aug 8, 2024
@jake-low
Copy link
Contributor Author

jake-low commented Aug 8, 2024

This PR can wait to merge until #2388 is merged. That PR adds new functionality while this one is just housekeeping, and it'll be easy to rebase this over those changes but not as easy the other way around.

@CollinBeczak CollinBeczak self-requested a review August 12, 2024 16:55
@jake-low jake-low merged commit 191ca37 into maproulette:main Aug 12, 2024
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