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

DDF-4903 Fix render loop caused by poller in dropdown.js #4906

Merged
merged 1 commit into from Jun 4, 2019

Conversation

adimka
Copy link

@adimka adimka commented Jun 3, 2019

What does this PR do?

Fixes a render loop in dropdown.js caused by React's equality check not being sufficient for this model.

Who is reviewing it?

@samuelechu @mojogitoverhere

Select relevant component teams:

@codice/ui

Ask 2 committers to review/merge the PR and tag them here.

@djblue
@vinamartin

How should this be tested?

Open a component using react-comppnent/dropdown/dropdown.js
Throw a debug in that component's render method.
Ensure that the debug isn't hit constantly.

Any background context you want to provide?

What are the relevant tickets?

Fixes: #4903

Checklist:

  • Documentation Updated
  • Update / Add Threat Dragon models
  • Update / Add Unit Tests
  • Update / Add Integration Tests

Notes on Review Process

Please see Notes on Review Process for further guidance on requirements for merging and abbreviated reviews.

Review Comment Legend:

  • ✏️ (Pencil) This comment is a nitpick or style suggestion, no action required for approval. This comment should provide a suggestion either as an in line code snippet or a gist.
  • ❓ (Question Mark) This comment is to gain a clearer understanding of design or code choices, clarification is required but action may not be necessary for approval.
  • ❗ (Exclamation Mark) This comment is critical and requires clarification or action before approval.

@mojogitoverhere
Copy link
Contributor

build now

@cxbot
Copy link

cxbot commented Jun 3, 2019

Internal build has been scheduled, your results will be available at build completion.

@cxbot
Copy link

cxbot commented Jun 3, 2019

Refer to this link for build results (access rights to CI server needed):
https://jenkins.codice.org/job/DDF-Jobs/job/pr/job/Linux/6832/
✅ JOB SUCCESS

@djblue djblue added the 👤 UI Has UI Changes label Jun 3, 2019
@mojogitoverhere
Copy link
Contributor

hero in progress

@mojogitoverhere
Copy link
Contributor

🎉 Hero build was successful! 🎉

  1. Set a breakpoint in the render function of the location.js react component
  2. Created a new anyGeo query
  3. Verified the breakpoint was only hit 5 times (once for each item in the dropdown)
  4. Also verified the fix in a different dropdown component in a downstream project

@djblue djblue merged commit 1ed85a7 into codice:master Jun 4, 2019
@jlcsmith jlcsmith added this to the 2.16.0 milestone Jun 4, 2019
bakejeyner pushed a commit to bakejeyner/ddf that referenced this pull request Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👤 UI Has UI Changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poller in dropdown.js performs an unchecked call to setState, causing a render loop
7 participants