This repository has been archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay quick-open panel creation until used
Summary: This diff reduces Nuclide's startup time by ~80ms. Most of this expense is the result of two forced layouts caused by quick-open: (1) measuring the document's height for the scrollable area `max-height` calculation, and (2) adding the panel to the DOM. To fix #1, instead of setting the height in javascript of the scrollable area, it's set using CSS. The `max-height` is now `calc(100vh - GAPpx)`. Not only is this less taxing on Atom, but the modal now shrinks smoothly as you resize. To fix #2, moved the panel creation code into the Activation class' render. Since that function got kinda big, I trimmed some of the unnecessary bits - like most of the styling on the modal parent. Reviewed By: jgebhardt Differential Revision: D3683543 fbshipit-source-id: 3b09bdcdd7f3aabb4e9162d68fbf6cdc44434f40
- Loading branch information
Showing
3 changed files
with
115 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters