53 Commits

Author SHA1 Message Date
4f39fb728b chore: update tslint rules (#7391) 2019-06-26 15:13:48 +03:00
37b53c6030 fix(text): crash when removing FormattedText (#7237)
* fix(text): crash when removing FormattedText

* refactor: fixed crash on ios too
2019-05-13 17:03:46 +03:00
82f7e24b80 fix(label-android): numeric text ignores text-transform (#7123) 2019-04-10 10:46:38 +03:00
9f8d24a811 Prevent app crash for css text-transform (#6815)
* Prevent app crash for css text-transform

* refactor: formatting

* refactor: formatting

* minor refactoring

* fix: use isString - text is sometimes String

* fix: use isString - text is sometimes String
2019-02-07 10:59:53 +02:00
46705ee332 refactor(core-modules): implement createNativeView and initNativeView for all components
refactor(core-modules): implement createNativeView and initNativeView for all components
2018-09-26 13:59:12 +03:00
03cfc0cee3 chore(tslint): update tslint rules and fix errors (#5747)
* chore(tslint): fix tslint config & errors
* chore(tslint): enable double quotes, whitespace, and arrow-return-shorthand rules and fix errors
2018-04-26 18:36:32 +03:00
7cd8e7ef54 fix(text): Allow -1 to be a valid binding value for text views (#5563)
* fix(android/text ios/text): allow -1 to be a valid binding value

Instead of using -1 as special value, use Symbol(-1)
so that it can't be reset accidentally

Closes issue #5559

* renamed the symbol
2018-03-21 11:37:30 +01:00
2701ea3c1e Fix failing test on ios 11 (#4686)
Add new perf-test page for view recycling
Changed the initialization of TextTransformation field
2017-08-16 15:19:01 +03:00
0f14101238 recycling now happens only if nativeView and android properties are not accessed. (#4627)
recycleNativeView filed now accepts: "always" | "never" | "auto". Always will recycle the nativeView no matter if its nativeView or android proprties are accessed. Never will disable recycling. Auto will recycle it only if nativeView and android properties are not accessed.
2017-08-01 15:04:16 +03:00
74f26f4498 Add CSS support for line-height (#4534)
* Add CSS support for line-height (issue #1664)

* Implemented @vakrilov's feedback

* Implemented @vakrilov's feedback (changed Android default impl)
2017-07-13 15:00:18 +03:00
09535627b9 disable recycling on specific button (#4527)
* disable recycling on specific button
add more thorough test for view recycling
fix memory leak with android ActionBar
improve padding reset when view is recycled
improve reset of several controls

* stopping local animations when view is recycled
fix tns-ios version in tests/package.json

* Fix isClickable on android when reusing nativeView
2017-07-11 09:48:08 +03:00
23757e5dfc Enable recycling of nativeView 2 (#4467)
* enable recycling of nativeView

* backgroundInternal is reset if setting new value leads to background.isEmpty() == true.

* android background.getDefault always return copy of the background. Now all controls that mutate the background can be reset to initial state (e.g. Button & ActionBar)
passing resources to copied background so it respect density.
fix properties initNativeView

* reset padding when backgroundInternal is reset.

* Fix text reset
Fix padding reset

* fix tsc errors

* fix ugly text rendering.

* Add unit tests for recycling native views
Fix several issues that came from the above tests
Fix maxLength property missing a converter callback
Remove old files

* Remove old files

* Revert backgroundInternal setter

* change the order of tests so that appium can work again

* Remove suggestion on every TextView & TextField init (strangely it is enabled after view is recycled....)

* Fix function to get parent layout if specified

* Button stateListAnimator restored when button is recycled
zIndex defaultValue is now undefined instead of NaN

* revert zIndex.setNative to always clear stateListAnimator because it was breaking one UI test (setting value=0 was returning the previous stateListAnimator)

* fix search-bar backgound-color recycling

* Fix alignments setters

* Fix imageView recycling
Fix button recycling
Fix edit-text recycling
resetNativeView is called only if recycleNativeView flag is true

* Fix incorrect merge

* Fix text-view & text-field textTransform

* Fix EditText text reset

* Fix runtime crash on ARM emulator API 21

* Fix text-base minHeight. maxHeight reset
Fix reset of isUserInteractionEnabled
2017-06-29 18:01:22 +03:00
f2462158fb Chrome devtools elements tab support for Android (#4351)
* Enable chrome-devtools elemets tab

* Trigger updates when property is chaned form native

* Tslint fixes

* Don't run dom-elemet tests in IOS

* fix tests

* Create package.json

* Update package.json

* domNode changed to field for performance
2017-06-12 16:48:27 +03:00
6b10e94005 FIX: Span with unknown font-family crash 2017-05-10 18:42:23 +03:00
a6909da543 Fix: TextAlign initial value 2017-04-12 17:43:40 +03:00
f350f7191d textTransform, whiteSpace & textAlignment defaultValue is now “initia” (#3948)
removed enum namespaces
add valueConverter to clipToBounds
2017-04-06 09:50:37 +03:00
be85af4a0d Text transform - no default value 2017-03-30 18:35:55 +03:00
e6250e718a Disable recycling of native views
createNativeView will set iOS nativeView if it is null/undefined
2017-03-28 18:08:59 +03:00
c18a76c93a rename:
_createNativeView to createNativeView;
_initNativeView to initNativeView
_disposeNativeView to disposeNativeView
_resetNativeView to resetNativeView
2017-03-28 18:08:59 +03:00
f2898f84d5 NativeView recycled for android 2017-03-28 18:08:59 +03:00
2b28730011 Split get/set native to getDefault setNative 2017-03-22 16:37:52 +02:00
a64bba62aa whiteSpace default value change to undefined (#3782)
TKUnit default message change to empty string
isSet method is now instance method of Property classes
fix detaching from parent bindingContext - were using oldParent.parent instead of parent
editable-text-base.android - onTextChanged implementation commented. Does nothing.
frame - onCreateView wrapped in try/catch and shows label with exception message if any
text-base.android - should support reset of nativeView. TransformationMethod won’t be set if TextField is secure
Change some types to their string couterparts
TextField.android won’t support multilines anymore in order to work as iOS
In android when page is removed from native backstack we won’t call tearDownUI again a second time
2017-03-14 10:26:45 +02:00
629eb6e683 Use relative imports in tns-core-modules.
Use tns-core-modules/* imports in outside code (apps, tests, etc)
2017-03-13 14:37:59 +02:00
1d49f5f3c3 fix padding on text-view & text-field (#3758)
* fix padding on text-view & text-field
text-base is now snapshotable
view.android is now snapshotable

* createNativeView returns the nativeView for android
Fix image tests
Implement test for image loaded from res://
EffectivePaddings updated when nativeView have some from its native theme
2017-03-09 16:09:53 +02:00
ea22eb9c20 refactoring circular imports 2017-03-06 14:05:55 +02:00
33aa48bdfd Add support for snapshot
Fix Layout class getMeasuredWidth & getMeasuredHeight
Move some classes to widgets
Fix API17 tests
2017-03-06 14:05:55 +02:00
a0c74bb4a9 Fix resetting horizontal text alignment 2017-02-22 13:37:10 +02:00
3770f7e636 formatted text fix (#3531)
* Fix formattedText implementation for iOS
Fix typeof undefined checks
Add slow tests message
Improve tests speed

* fix tslint
reduce transitions duration in test

* waitUntilReady will throw if timeout
fix tests that needs to wait without throwing
improve test speed
2017-01-26 18:21:30 +02:00
312a99667e Enable Button tests, fix AbsoluteLayout tests 2017-01-23 09:42:24 +02:00
e34b0f622c fix span (#3510)
* Remove Bindable.
Fix Observable & ObservableArray tests
Fix formattedString text
Change implementation of Span, FormattedString & TextBase
properties valueChange called before native setter

* revetred formattedString tests asserts - formattedText update text property again
properties - when getting value we now use always property name instead of key (using key could return undefined for property that is set to its default value)
updated fontSize & fontInternal properties on all controls
fix font properties so that fontInternal is reset if the new font is the same as Font.default

* fix tslint errors
2017-01-20 16:42:20 +02:00
cc337094e9 Fix text & fromattedText failing tests 2017-01-12 14:12:41 +02:00
cd3cd13075 View tests turned green 2017-01-11 17:34:25 +02:00
45ac38d968 Refactor formatted text 2017-01-11 16:37:23 +02:00
309ea148e1 Fix setting text property to number. (#3449)
Fix setting JS property from native.
2017-01-09 18:13:31 +02:00
14e1da5820 Style-properties tests 2017-01-09 17:24:38 +02:00
120390b925 Fix: All formatted string appear with commas between each letter 2017-01-06 17:00:04 +02:00
421810c293 TextView tests. 2017-01-05 16:09:13 +02:00
9d6f6cca79 Fix font on Android 2017-01-04 14:13:33 +02:00
becf428e90 Fix most of the label tests 2016-12-28 17:33:38 +02:00
0ec9950d46 Padding 2016-12-22 14:45:41 +02:00
7931ecd4f8 Fix tslint errors 2016-12-21 17:42:31 +02:00
4cd3eed1cd Trying to fix padding... 2016-12-21 14:30:34 +02:00
93d4fa5d57 Total TextBase refactoring + several bug fixes. 2016-12-16 14:54:00 +02:00
51e448aa10 Fixed: getViewById, TextDecoration 2016-12-15 13:20:25 +02:00
b20fd7fd4c Fix nativeView issues
Fix Listeners base class
2016-12-15 10:46:20 +02:00
19ee47ba24 got to layouts 2016-12-13 15:51:18 +02:00
07e2102c5d restore properties deleted with merge 2016-12-13 15:51:18 +02:00
1202cb7288 almost all without layouts 2016-12-13 15:51:18 +02:00
94dee2973a . 2016-12-13 15:51:18 +02:00
645f428f59 alpha1 2016-12-13 15:51:18 +02:00