2600 Commits

Author SHA1 Message Date
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
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
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
Garrett Moon
cc00626642 Fix Carthage build (#2567) 2016-11-07 15:54:23 -08:00
Garrett Moon
17bd3acdee Revert "Need to trampoline to main to make contents check safe if nodes are loaded. (#2545)"
This reverts commit 11e07ff409d64ed7cf48877a325b8b4ad737daef.
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
Michael Schneider
de36ef29bd Fix height check in ratio layout spec (#2553) 2016-11-05 18:45:42 -07:00
Michael Schneider
e4da4131cf Improve layout spec block documentation (#2547) 2016-11-05 18:45:18 -07:00
Garrett Moon
11e07ff409 Need to trampoline to main to make contents check safe if nodes are loaded. (#2545) 2016-11-04 11:33:17 -07:00
Garrett Moon
62a0296148 Implementation needs to match decleration. (#2539) 2016-11-02 18:19:26 -07:00
Michael Schneider
dae374d482 Initial commit to cleanup modifying subnode hierarchy (#2535) 2016-11-02 17:12:35 -07:00
Garrett Moon
076d22e9f1 Do not reuse NSStringDrawingContexts (#2537) 2016-11-02 14:37:51 -07:00
george-gw
ff9e493a59 Fixed asciiArtString. (#2523) 2016-11-01 17:33:27 -07:00
Adlai Holler
a6e2f8e5ab Finish Porting indexPath-Oriented Methods to ASTableNode/ASCollectionNode (#2527)
* Finish porting over the indexPath-oriented properties from table/collection view to node

* Make indexPathForSelectedRow a property
2016-11-01 15:03:46 -07:00
Hannah Troisi
e1e5eb6ca0 improve deprecation message (#2524) 2016-11-01 11:33:31 -07:00
Hannah Troisi
aac52d7f6d Improve Deprecation Warning for myself (#2521) 2016-11-01 09:12:04 -07:00
Michael Schneider
58e9c807b9 Fix using UIActivityIndicatorView provided in view block (#2522) 2016-11-01 07:58:54 -07:00
Hannah Troisi
8e6f842b8d [ASLayoutElementStyle] implement -description with sizing info (#2495)
* Layout style object debugging

* Remove cocoapods crap
2016-11-01 07:58:43 -07:00
Scott Goodson
6297fa5241 [ASTableNode] Minor fix so visibleNodes is in the same position as declaration in ASCollectionNode. 2016-10-31 20:24:24 -07:00
Garrett Moon
68990cb6cc Deprecations should be re-enabled. If there are specific deprecations… (#2519)
* Deprecations should be re-enabled. If there are specific deprecations we'd like to hold off on, we should address those specifically.

* Fix decleration

* Move select to undeprecated

* Fix deprecations
2016-10-31 17:30:40 -07:00
Michael Schneider
4464b7de60 Improve deprecation situation for 2.0 (#2514)
* Improve deprecations for 2.0

- Add deprecations for node / layoutSpec style properties
- Implement missing methods on ASDisplay from deprecation header
- Cleanup all of the deprecation categories

* Remove DeprecatedProtocolMethods

* Fix "Life without Cocoapods"

* Update comments
2016-10-31 16:46:21 -07:00
Adlai Holler
f09b92641c Invalidate TextNode Renderer Instead of Changing constrainedSize (#2516)
* Instead of changing its constrained size, just invalidate renderer. It's virtually the same.

* Check constrained size before invalidating renderer
2016-10-31 14:14:21 -07:00
Michael Schneider
7ecce6b677 Remove thread affinity for _displaysAsynchronously (#2518) 2016-10-31 14:12:50 -07:00
Garrett Moon
9aeef7b503 Revert "We need to ensure point dimensions are valid for sizing. (#2503)" (#2512)
This reverts commit 1165628905f92aa00c1605230f32953f5d7f0670.

I wanted to catch dimension issues early, we should move the assert to setting
width and height. The former was correct for here.
2016-10-31 00:02:50 -07:00
Adlai Holler
3eb7a307fa Share a singleton shadower for all cases when shadow isn't drawn, fix issues (#2511) 2016-10-30 15:34:29 -07:00
Michael Schneider
611894329a [ASStackLayoutSpec] Performance improvements (#2470)
* Initial commit for ASStackLayoutSpec improvements

* Remove the lock in ASStackLayoutSpec and make the ASStackLayoutSpecStyle const

I think we don't need lock here as the style already has a lock while we set the value

* Add ASStackLayoutSpecItem  that replaces layout specific items

* Prevent baseline pass if not needed

* Update comments
2016-10-30 12:07:18 -07:00
Tamás Kárai
ca203158da [ASControlNode] Invoke target actions in the same order as they were added (#2456)
* added control node test

* fix tests

* target action pair

* go back to class

* move ASControlTargetAction to Private

* added ASControlTarget to cimpole sources

* add ASControlTargetAction to framework target as well

* init local variables with nil

* removed comment with private Apple class name

* isEqual implementation for ASControlTargetAction

* eliminate retain cycle

* use ASControlTargetAction isEqual

* change to NSMutableOrderedSet

* Use OrderedSet and isEqual

* Use that NSMutableOrderedSet stored the same object only once

* Moving back to NSMutableArray

* minor improvements
2016-10-30 11:44:50 -07:00
Adlai Holler
f066efd49e Improve Table Performance, Especially When Using Section Index Bar (#2506)
* Only trigger table view height requery if row-node height changed

* Make ASTableView handle the section index bar better

* Remove outdated comment

* Add a main thread assertion
2016-10-30 09:18:13 -07:00
george-gw
d83f058f82 Deprecate indexPath-based Methods on ASTableView/ASCollectionView (#2498)
* Deprecated indexPath methods in ASTableView and ASTableNode and added several indexPath methods to ASTableNode and ASCollectionNode.

* Fixed incorrect doc.
Removed unnecessary __kindof.
2016-10-29 09:50:11 -07:00
Michael Schneider
c4451edab1 Add assertion for invalid constrainedSize in calculateSizeThatFits: (#2507) 2016-10-28 16:45:22 -07:00
george-gw
09168ceee0 [Swift] Addressed two warnings when building for swift. (#2497) 2016-10-28 15:40:22 -07:00
Michael Schneider
fb92b448e0 [ASDisplayNode] Proper handling of constrainedSize (#2505)
* Check in ASLayout if size is valid for sizing instead of valid for layout

* Return constrainedSize from calculateSizeThatFits:

Remove invalid constrainedSize check within ASNetworkImageNode. Furthermore as ASDisplayNode does not return CGSizeZero anymore we have to give the display nodes we use in tests and are involving a stack spec an intrinsic content size.

* Remove extra constrainedSize handling in ASNetworkImageNode handling

* Change test to use FLT_MAX
2016-10-28 15:39:03 -07:00
Garrett Moon
1165628905 We need to ensure point dimensions are valid for sizing. (#2503) 2016-10-28 15:18:45 -07:00
Adlai Holler
8add4619cf Reduce Traffic to Table/Collection View When Updating (#2496)
* Improve the call pattern when loading table/collection data

* When deleting sections, no need to delete rows first

* Clean up a couple things
2016-10-28 09:42:45 -07:00
george-gw
54cda5fdbb [ASCellNode] Added indexPath property. (#2468)
* [ASCellNode] Added indexPath property.

* [ASCellNode] Cached the type of scrollView we're using in the node, and placed that logic in setScrollView.

* [ASCellNode] Removed table and collection view from indexPath, since they return the index paths from the view-space.

* Changed the logic for getting indexPath so that it works even when the cell is not displayed.

* [VerticalWithinHorizontalScrolling] Explicitally synthesized indexPath property.
2016-10-27 16:56:00 -07:00
Hannah Troisi
c67a74ec41 add descender to ASEnvironmentMergeObjectAndState() (#2494) 2016-10-27 16:22:21 -07:00
Adlai Holler
c0125010c1 Workaround iOS 7 text drawing bug (#2492) 2016-10-27 11:48:49 -07:00
Michael Schneider
eb6cf0689d Only throw if ASLayoutElement style width or height are ASDimensionUnitFraction (#2484) 2016-10-26 17:17:09 -07:00
Adlai Holler
627d146a5a Add scrollToItem: Method to Node, Handle Section Index Paths (#2462)
* Add scrollToItem: method to node, handle section index paths

* Update ASPagerNode.mm to use the node version

* Add some docs
2016-10-26 12:48:25 -07:00
Michael Schneider
d4af95c9f1 Add ASLayoutSizeAuto (#2478) 2016-10-26 11:43:14 -07:00
Garrett Moon
5651606684 [ASCollectionView] layoutInspector can be nil'd at anytime making flags unsafe (#2473)
* Call layoutInspector before checking flags. Thanks @adlai!

* Don't create layout inspector with nil layout.
2016-10-26 11:42:29 -07:00
george-gw
ea9d785180 Call reloadData if necessary when accessing specific methods. (#2479)
Added test case.
2016-10-26 11:38:21 -07:00
Michael Schneider
6d5bd6e969 Cleanup calculateLayoutThatFits: (#2480) 2016-10-26 11:26:57 -07:00