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

UIP-1976, UIP-1975 Release over_react 1.5.0 (HOTFIX) #46

Merged

Conversation

greglittlefield-wf
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf commented Jan 30, 2017

Copy missing updates from https://github.com/Workiva/web_skin_dart/pull/608

Testing:

Verify that the dynamic-height demo in w_virtual_components master is no longer broken with this dependency override:

dependency_overrides:
  over_react:
    git:
      url: git@github.com:greglittlefield-wf/over_react.git
      ref: resize_sensor_quick_mount

Ultimate Problem

ResizeSensor (especially its componentDidMount) was too slow to use on VirtualList items in order to support dynamic-height items (UIP-1511).

Solution

  • Add quickMount prop to ResizeSensor, which minimizes layouts caused by accessing element dimensions. When enabled:
    • The initial dimensions will not be retrieved, so the first onResize event will contain 0 for the previous dimensions.
      • onInitialize will never be called.
      • Sensor scroll events fired as a result of resetting the component on mount will be ignored until one animation frame later, preventing additional sensors dimension accesses.
        • This can't be done for normal sensors, since it causes timing issues in tests.
    • The sensors will be initialized/reset in the next animation frame after mount, as opposed to synchronously, helping to break up resulting layouts.
  • Add docs section for props.quickMount
  • Update Sauce iframe styling to move it within the viewport, to prevent animation frame throttling in Firefox
Semi-unrelated changes
  • Remove flexbox styles for Safari <9 (no longer supported)

@aviary-wf
Copy link

Raven

Number of Findings: 0

@rmconsole2-wf rmconsole2-wf changed the title Copy over ResizeSensor quickMount updates from web_skin_dart UIP-1975 Copy over ResizeSensor quickMount updates from web_skin_dart Jan 30, 2017
@jacehensley-wf
Copy link
Contributor

+1

@greglittlefield-wf greglittlefield-wf force-pushed the resize_sensor_quick_mount branch from 58c6864 to 9c6a0c3 Compare January 30, 2017 17:27
@greglittlefield-wf greglittlefield-wf changed the title UIP-1975 Copy over ResizeSensor quickMount updates from web_skin_dart todo Jan 30, 2017
@jacehensley-wf
Copy link
Contributor

+10

  • Dynamic height lists works as expected

@greglittlefield-wf greglittlefield-wf changed the title todo UIP-1976 Release over_react 1.5.0 (HOTFIX) Jan 30, 2017
@leviwith-wf leviwith-wf changed the title UIP-1976 Release over_react 1.5.0 (HOTFIX) UIP-1976, UIP-1975 Release over_react 1.5.0 (HOTFIX) Jan 30, 2017
@jacehensley-wf
Copy link
Contributor

+1

@leviwith-wf
Copy link
Contributor

QA Resource Approval: +10

  • dynamic height working as expected again

  • Dev +1’s on MPR
  • Dev +1’s present on related CRs
  • Version info updated
  • Tests Pass
  • Rosie run complete/evaluation clean

Ready for merge and tag.

@leviwith-wf leviwith-wf merged commit 6329e2a into Workiva:master Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants