Commit Graph
4590 Commits
Author SHA1 Message Date
David Robles 4ad8361eea Prevent premature placeholder image clearing when setting the video asset at a later point in time. 2016-11-17 10:35:26 -08:00
Marvin Nazari 31ffea40c2 [ASCellNode] implement a .viewController property 2016-11-17 11:26:55 +01:00
Adlai Holler da465bf812 Merge pull request #2624 from facebook/HTDeprecateTableViewDelegates
[ASCollectionNode, ASTableNode] Deprecate asyncDelegate & asyncDataSource Properties
2016-11-17 18:41:41 +09:00
Hannah Trosi 6565b8348d collectionView 2016-11-17 16:46:07 +09:00
Hannah Trosi c9143fb5df tableView only 2016-11-17 15:18:55 +09:00
Adlai Holler 00f448d534 Merge pull request #2623 from facebook/AssertLog
[ASDisplayNode] Convert assertion to log so developer can see layout issues onscreen.
2016-11-17 14:55:44 +09:00
Adlai Holler b0ead608d9 Merge pull request #2622 from facebook/AHEventLoggingInProduction
[ASTraceEvent, Debugging] Greatly Improve Event Logging.
2016-11-17 14:53:56 +09:00
Scott Goodson 8c01fccfca [ASDisplayNode] Convert assertion to log so developer can see layout issues onscreen.
In this case, the user hasn't specified enough about the layout of a node.  We default to
0, 0 - but ideally the case should not occur at all.  So it's important to help developers
detect these cases and fix them quickly.

An assertion causes developers several problems:
- They can't see important information unless an exception breakpoint is manually added.
- They can't see their layout onscreen and so visually understanding the problem is impossible.
- They can't proceed with testing to trigger other faults in the layout and are blocked fixing one at a time.

A log fixes every one of those problems:
- They can set a breakpoint on the log line very easily if desired.
- They can see their layout display and recognize the 0,0 node even more quickly than the log text information.
- They can see if multiple logs print out, or if the log only occurs for one item in a feed, or certain types --
    This helps them debug faster by knowing if the layout is always broken or certain conditions break it.

Since developing with ASLayoutSpecs is an iterative process, it's crucial that we let developers have the
freedom to experiment and test without hitting too many assertions.  Fortunately it will be impossible to ignore
these huge logs (full recursive description) and their nodes will be 0, 0 size, so they will get fixed.
2016-11-16 21:14:15 -08:00
Adlai Holler 4a48ba8be2 Improve our event logging greatly 2016-11-17 12:04:30 +09:00
Adlai Holler df7c2b6d96 Merge pull request #2619 from craighowarth/allow-decoration-views
[ASCollectionView] Allow Decoration Views
2016-11-17 09:43:03 +09:00
Craig Howarth e8688d645a [ASCollectionView] Allow Decoration Views 2016-11-16 17:16:15 -05:00
Adlai Holler 14fa50d42f Merge pull request #2613 from facebook/AHFixCarthage
Fix the Carthage Build
2016-11-16 11:51:09 +09:00
Adlai Holler 9e04088b65 Merge pull request #2610 from garrettmoon/fixCallingContentsOffMainThread
[ASDisplayNode] Placeholder contents configuration needs to check self.contents on main.
2016-11-16 11:09:26 +09:00
Adlai Holler 244ff00152 Fix carthage? 2016-11-16 11:03:55 +09:00
appleguy 4d16d58407 Add method to specify the default NSURLSessionConfiguration for (#2609)
ASPINRemoteImageDownloader. This will allow callers to supply their own custom
logic whether that is background downloads, custom http headers, cookie
storage, etc.
2016-11-14 19:53:30 -08:00
Adlai Holler a080773532 Remove legacy ASVideoNode flags (#2608) 2016-11-15 11:56:56 +09:00
Garrett Moon b1f0bbf514 self.contents isn't safe to access on the main thread. 2016-11-14 16:21:14 -08:00
rmalik 7769883dc8 Add method to specify the default NSURLSessionConfiguration for
ASPINRemoteImageDownloader. This will allow callers to supply their own custom
logic whether that is background downloads, custom http headers, cookie
storage, etc.
2016-11-14 16:19:48 -08:00
Michael Schneider d649f2524f Remove legacy ASVideoNode flags 2016-11-14 09:21:38 -08:00
Adlai Holler e2e32870ed Reduce Flashing & Optimize ASTableNode/ASCollectionNode Data Loading (#2541)
* Optimize data controller loading by combining section updates with first set of item updates

* Update call pattern test

* Add some explanation about the approach
2016-11-14 14:30:41 +09:00
Michael Schneider 44aa582ceb Fix crash if batch update blocks are nil although method declaration allows nullable (#2599) 2016-11-14 10:15:11 +09:00
Austin Louden ae11fc755e Update deprecations in ASCollectionView example, enable warnings (#2594)
* Update example deprecations and flags

* update podfile
2016-11-10 22:42:37 -08:00
gazreese 3cdbc63e31 [ASVideoNode] Addition of reset method to return to initial state (#2119)
* [ASVideoNode] Addition of reset method to allow video node to return to initial state of placeholder and play button

* Implemented pull request review comments for code style
2016-11-10 16:35:43 -08:00
Michael Schneider 2ba8239ff5 ASViewController example improvements (#2592) 2016-11-10 16:33:01 -08:00
Adlai Holler 171cc2f527 Improve Automatic Subnode Management Node Ordering (#2589)
* Add failing tests for subnode ordering

* Ensure that subnode ordering matches layout spec tree ordering
2016-11-10 09:22:53 +09:00
george-gw f22e1c2eb0 [LayoutSpecExamples] Added swift counterpart. (#2576)
* [LayoutSpecExamples] Added swift counterpart.

* Fixed copyright text.
2016-11-10 08:54:53 +09:00
Michael Schneider 1eb2bb6606 Add ASDynamicCast (#2586) 2016-11-10 07:41:45 +09:00
Adlai Holler 6bbc9a3cb0 Add a macro (default 0) to control event backtrace recording (#2584) 2016-11-08 21:50:59 -08:00
Adlai Holler 9385425d07 Fix compiler complaining about unused variable in release builds (#2583) 2016-11-09 14:31:05 +09:00
Adlai Holler 88fecbe3eb Fix Issue in ASPagerNode Flags Handling, Restore Disabled Test (#2582)
* Fix ASPagerNode flags handling, restore affected test

* Rejigger ASPagerNode's flag handling to ensure it handles edge case in production
2016-11-09 14:20:07 +09:00
Hannah Troisi edf2b669ae [ASCollectionViewLayoutInspecting] make -scrollableDirections required (#2543)
* [ASCollectionViewLayoutInspecting] make -scrollableDirections a required method

* doh!

* fixed?

* add assert per @appleguy's comment

* use self.layoutInspector, add check at the start of didChangeBounds...
2016-11-09 13:48:16 +09:00
appleguy 55b5dff80c [ASLayoutSpec] Initial commit to support visualizing layout specs (with Playground app). (#2554)
* Initial ASLayoutSpecPlayground commit

* Initial exploratory stab at the main challenge of the app - visualizing ASLayoutSpecs

* Halfway through moving debug features out of ASDK framework files and into debug files. Project builds.

* [ASLayoutSpecPlayground] Created new Inspector node, cleaning up internal implementation to start formalizing support for layout spec visualization.

* Workaround for ensuring creation of visualizerNode for ALL layoutspecs

* continued development

* Layout Inspector Work in Progress

* Resizing the playground works in the shrink direction, not for grow.

* added new ASLayoutableInspectorNode features

* Cleaned up examples code.

* Cleaning up  code.

* more code cleanup

* [ASLayoutableInspector] Transition to an ASTableNode-based architecture to support larger numbers of buttons / customizable types.

* [ASLayoutableInspector] Support different layoutable property types to set up buttons that can edit all of them.

* Huy debugging

* Refactored layout inspector code for extensibility.

* Properly lock layoutableContextMap

* Fix context handling in ASDisplayNode:measureWithSizeRange

* Fix ASLayoutSpecPlayground:ViewController:toggleVisualization

* added slider to InspectorCell

* [ASLayoutSpecPlayground] Improvements to propagation of visualize mode, resize handle, minor cleanup.

* Fix to ASEnvironment

* [ASLayoutSpecPlayground] Fix a few minor issues from the merge with latest master.

* Implement layout spec cache

* add pager ndoe

* add more examples

* add more layout examples

* [ASLayoutPlayground] Fix merge issues

* [ASLayoutPlayground] Fix up the example project from the 2.0 API changes.

* [ASLayoutPlayground] Some fixes (#2411)

* [ASLayoutPlayground]: Some fixes
* Fixed crash when tapping descender.
* Fixed setting the item to inspect.
* Fixed button states in inspector node.
* Added sliders for spacingBefore, spacingAfter, ascender.

* [ASLayoutSpecPlayground] Deselect the buttons when editing is over.

* [ASLayoutSpecPlayground] Changed flexGrow/Shrink's values from YES/NO to 1.0/0.0

* [Project] Create new Debug/ directory for advanced tools dedicated to debugging.

* [LayoutSpecPlayground] Rename project without AS in title, to be consistent with LayoutSpecExamples.

* [Bulid] Fix Xcode project to use new Debug subdirectory / group.

* [Bulid] Fix a small merge error.

* [Build] Fix build issue for Framework target.

* [Bulid] Fix podspec to expose InspectorNode header; Remove old-cocoapods emojis from ASDKgram :)

* Move aside ASLayoutSpecPlayground-Swift to match master

* [LayoutSpecPlayground] Cleanup implementation in several files, xcodeproj, etc.

* [ASControlNode] Add comment for new assertion, to be enabled in a separate diff.
2016-11-08 20:16:16 -08:00
Adlai Holler a1156e108f Reduce memory consumption caused by event tracing (#2570) 2016-11-08 18:06:31 -08:00
Michael Schneider 2e46aa1e89 Move ASEventLog out of the Private folder (#2580) 2016-11-09 10:41:45 +09:00
Hannah Troisi 549a90418c another deprecation warning (#2571) 2016-11-09 10:41:27 +09:00
Adlai Holler 5c15869087 Disable Text Node Fast Path (#2581)
* Disable text node fast path

* Actually commit the test change
2016-11-09 10:25:02 +09:00
Huy Nguyen fb6d1830a0 Beter table/collection update history (#2562)
- Introduce thread-safe ASEventLog
- ASCollectionNode and ASTableNode share their event log with their ASDataController. The controller uses it to log change set submitting and finishing events.
- ASCollectionNode and ASTableNode print their data source and delegate in their debug description.
2016-11-08 16:44:49 -08:00
Garrett Moon 06f5754b37 This way we only have to update the version number in one place. (#2577) 2016-11-08 16:19:52 -08:00
Scott Goodson d3e942acf7 [Build] Disable failing test in ASViewController until it can be investigated. 2016-11-08 15:25:05 -08:00
Scott Goodson f9a96d58b8 [Build] Update build script to use iOS 10.1 (Xcode 8.1). 2.0-beta.1 2016-11-07 18:24:34 -08:00
Luke Parham 2754af3858 added index of page with node method to ASPagerNode along with some tests (#2561) 2016-11-07 16:07:54 -08:00
Hannah Troisi 9949c6348d [Examples] update example projects to 2.0 API (#2568)
* update example projects to latest Collection / Table API

* udpate delegate / data source methods
2016-11-07 15:55:09 -08:00
Garrett Moon cc00626642 Fix Carthage build (#2567) 2016-11-07 15:54:23 -08:00
Scott Goodson c4a4df7c52 [Build] Move aside ASLayoutSpecPlayground-Swift for now, as it is causing an Xcode 8.0-specific build failure. 2016-11-07 15:15:58 -08:00
Garrett Moon 47f9084bee Include latest version of PINRemoteImage and PINCache (#2565) 2016-11-07 15:01:33 -08:00
Hannah Trosi 72eb924932 replace missing layoutSpecThatFits method 2016-11-07 03:17:48 -08:00
Garrett Moon 17bd3acdee Revert "Need to trampoline to main to make contents check safe if nodes are loaded. (#2545)"
This reverts commit 11e07ff409.
2016-11-06 18:09:29 -08:00
Scott Goodson d7ba0a9c6d [Build] Add imports that are necessary for clang to parse header files after compilation.
This allows the objc-diff tool (which creates API diffs) to run successfully.
2016-11-06 15:04:30 -08:00
Hannah Troisi 7a373ac638 Update Layout Examples to ASDK 2.0 (#2551)
* Objective-c project updated to ASDK 2.0

* fix assets error

* [LayoutSpecExamples] Renamed new example project to be easier to type / find.

* [Bulid] Manually create Sample.xcscheme file to hopefully fix complaining bulid :).

* clean up project

* commentary on ASAbsoluteLayoutSpec

* address @maicki's comments
2016-11-06 13:47:48 -08:00
Scott Goodson 735d1411d2 [Cocoapods] Update podspec to 2.0-beta.1 version; reference AsyncDisplayKit Twitter account. 2016-11-05 19:32:41 -07:00