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
[TIMOB-12196] initial ListView implementation #3947
Conversation
First test I ran was to see how default templates work Observed results: Continuing FR |
Previous discussions had indicated that auto height of the listitem will not be supported. Do not see that documented anywhere so will consider it a bug until specified in spec. |
Stopping FR now. Looks like there is a separate ticket for eventing and test case creation is in progress. Is this PR to only test the template mechanism? Will resume once there is clarity on the scope of this PR. |
@vishalduggal ready for CR+FR. Test case attached to TIMOB-13014 |
@@ -0,0 +1,25 @@ | |||
/** | |||
* Appcelerator Titanium Mobile | |||
* Copyright (c) 2009-2013 by Appcelerator, Inc. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All new files are copyright 2013 only.
Also missing ifdef statements for all new files in the ListModule
rowHeight property of listView is specified as a V2 property, but that seems to be the only way of controlling row heights in this implementation. |
id propertiesValue = [item objectForKey:@"properties"]; | ||
NSDictionary *properties = ([propertiesValue isKindOfClass:[NSDictionary class]]) ? propertiesValue : nil; | ||
BOOL allowsSelection = [TiUtils boolValue:[properties objectForKey:@"allowsSelection"] def:YES]; | ||
return allowsSelection ? indexPath : nil; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you return nil from here, is the 'didSelectRowAtIndexPath' method called. If not,this is a change in behavior from tableView and will fail FR since the spec does not state that setting this to false will prevent itemClick event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if the user taps the accessory button instead of trying to select the row, the itemClick will fire, which is a discrepancy in behavior.
One thing I noticed in the test cases is the setting of color and font for title properties for all built in templates although the spec says that it is supported only for default template. Can we update spec or is this hidden iOS goods? |
image property does not seem to work with Ti.UI.LIST_ITEM_TEMPLATE_CONTACTS. Bug or limitation? No documentation in spec. |
|
||
+ (UIView*)titleViewForText:(NSString*)text inTable:(UITableView *)tableView footer:(BOOL)footer | ||
{ | ||
CGSize maxSize = CGSizeMake(320, 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using the tableView bounds here? Especially for width since 320 is an iPhone constant.
Functionally Reviewed and approved for now. |
[TIMOB-12196] initial ListView implementation
TIMOB-12196
Test case attached to TIMOB-13014