Commit Graph
384 Commits
Author SHA1 Message Date
Alexander Vakrilov 3dc3a411c3 feat: Flexible Error/Exception handling (#5929)
* feat: trace.error() implementation

* refactor: Based on PR review

* chore: adding error-handling guide

* docs: fix typos
2018-06-18 16:37:55 +03:00
Martin Yankov a75505fbc0 test(): move the tab view tests before frame tests (#5957) 2018-06-15 19:29:08 +03:00
Martin Yankov 69b3eb70d5 test(): add more timeout to tab navigations tests (#5953) 2018-06-14 13:19:06 +03:00
Morten Sjøgren 0e04cb4ad1 fix(android): NavigationButton was read as "Button" by screenreaders. (#5949)
The navigation button for the vision-impaired users were always read as:
"Button" by the TalkBack service on Android.
2018-06-14 12:54:33 +03:00
Manol Donev 0b9d4aea0a fix(android): label width shrinking on shorter text change (#5917) 2018-06-07 16:44:33 +03:00
Martin Yankov b122bd4a37 fix(ios): set current tab as topmost frame on load (#5908) 2018-06-06 14:47:42 +03:00
ADjenkov c3a7c815e5 chore(layout-changed): update layoutChanged event tests delay 2018-05-23 00:54:29 +03:00
Alexander Djenkov 0fc1547a19 feat(view): introduce LayoutChanged event on every View component (#5825)
* feat(view): introduce LayoutChanged event

* test(view): add LayoutChanged event tests

* chore(view-android): attach to onLayoutChange only if listener attached

* feat(view-android): override on/off in order to attach and detach from OnLayoutChangeListener
2018-05-21 17:22:40 +03:00
Manol Donev 1365f13594 fix(modal): innerView.closeModal(...) not passing back context (#5833) 2018-05-18 16:50:27 +03:00
Svetoslav 2168c36a5f tests: disable all tests related to outside urls (#5800) 2018-05-09 13:17:32 +03:00
Michael VanDyke d58665115b test(platform): fix typo in platform module cookbook example (#5758)
* test(platform): add missing properties to platformModule documentation

The platformModule cookbook documentation was missing a few properties
that are now available. This commit adds those properties to be
included in the examples.

resolves: NativeScript/NativeScript#5707

* test(platform): fix typo in platform module cookbook example
2018-04-30 10:49:54 +03:00
Manol Donev 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
Manol Donev 451589dbd6 fix(modal): exception when calling ViewBase.showModal(...) (#5737) 2018-04-26 00:19:44 +03:00
Michael VanDyke 0fd0812ede test(platform): add missing properties to platformModule documentation (#5709)
The platformModule cookbook documentation was missing a few properties
that are now available. This commit adds those properties to be
included in the examples.

resolves: NativeScript/NativeScript#5707
2018-04-25 14:05:30 +03:00
Alexander Vakrilov 49ea10b81e fix(layout): IOS Layout not invalidated with custom root (#5724)
* fix(layout): Buuple up layout trough viewControllers

* test: Layout invalidates correctly with different root view

* chore: tslint
2018-04-23 15:47:27 +03:00
Eddy Verbruggen 6bdb5b553f feat(file-system): add ability to retrieve file size (#5710) 2018-04-20 18:01:15 +03:00
Vasil Trifonov a616dbb9bb Updated weak event listener tests for v8 6.5 (#5697)
* Updated weak event listener tests for v8 6.5

* added missing parentheses
2018-04-18 16:57:26 +03:00
Manol Donev cf950e1ebb fix(navigation): fix frame.navigate call inside page.navigatedTo handler (#5649) 2018-04-11 11:25:54 +03:00
tbozhikov c06d5bae63 chore: set keepAspectRatio to true as default in image-asset (#5613)
* chore: set keepAspectRatio to true as default in image-asset

* fix: remove empty lines
2018-04-10 00:46:27 +03:00
Nikolay Tsonev a316e53d54 new tabview examples (#5628)
* new tabview exmples

* tabs limit example

* minor code snippet edits
2018-04-05 17:35:36 +03:00
Manol Donev 81a2cbd0fe refactor(ios): clean up iOS8 or lower specific checks in codebase (#5581) 2018-03-26 13:37:21 +03:00
Brendan Ingham 4b244921d4 feat(List-View) : Add the ability to check if an item is visible or not. (#5557)
* feat(list-view): Adds the ability to check whether or not an Item at index is Visible on screen within a listView

* feat(list-view): add the unit-test for checking if list-item is visible.

* clean(list-view): fix invalid reference in list-view-common

* chore(list-view): remove unused logic

* test(list-view) updates the tests for checking if item at index is visible

* chore(ListView Tests): update the test_check_if_item_at_index_is_visible unit test to include 40 children, and test if the last item is visible or not.

* Chore(ListView IOS): Apply requested changes to the for-loop, and replace with Array.some for readability.

* chore(ListView android): Fix TSLint issues.
2018-03-21 07:18:01 +01:00
Manol Donev 7506905770 fix(image): image aspect dimensions for ImageSource.fromAsset(...) (#5556) 2018-03-19 17:01:26 +02:00
Martin Yankov dfa70dd384 feat(frame): rework frame retrieval api (#5527)
Rework the frame api to support working with multiple Frames.
* frameModule.topmost() - now returns the last navigated Frame or
the currently selected tab item's Frame if the tab item's view is a
Frame.
* frameModule.getFrameById(id: string) - returns a navigated Frame by id.
* args.object.page.frame - can be used in page elements event handlers.
Returns the Frame of the current element's page.
* chore: Update madge-android npm script path
2018-03-13 18:10:45 +02:00
Sudhanshu Siddh 319c153360 feat(ios-image-source): standardize quality scale in image-source (#5517)
* feat(ios-image-source): standardize quality scale in image-source for both platforms

Normalize quality in saveToFile and toBase64String to follow 0-100 scale - standardize implementation on both platforms

closes #5474
2018-03-13 15:19:24 +01:00
Nathan Walker fa80355464 fix(animations): change throw -> trace to avoid unnecessary app crash (#5475)
* fix(animations): change throw -> trace to avoid unnecessary app crash

Fixes major cause of crashes/bugs in production apps using animation.

* Fix fix animation throw (#1)

* chore(tests): Cleanup code snippets comments

* refactor(animations): Plat-specific cancel and play methods refactored
2018-03-08 20:42:33 +02:00
Martin Yankov 8141737f74 fix-next(tabview): visually pre-load tab items on android (#5495) 2018-03-08 14:39:59 +02:00
Vladimir Amiorkov fb5c97cf57 fix-next(css): CSS not applied to "drawerContent" when RadSideDrawer is used as root (#5466)
* fix(XMLBuilder): Pass the "module path name" when building "custom component"
* test(root-view): root view css applied tests
2018-03-01 15:55:21 +02:00
Manol Donev 2704915384 fix(frame): add generic frame cleanup logic after modal dialog close (#5479) 2018-03-01 10:37:26 +02:00
Dimitar Tachev a94ec9946f Improve ImageAsset scaling (#5110)
* Do not depend on current device screen while calculating Image Asset size.

* Scale the image asset to the exact requested size.

* Process image assets natively, pass keepAspectRatio based on the stretch property and Asset options.

* Fixed the splashscreen resource name as it cannot be read when containing a dot.

* Updated the Image Asset scale and rotate logic based on the Native one.

* Make the ImageAsset size more important than the Image decode size as its more specific.

* Fixed tslint errors.

* Added filePath support in the ImageAsset constructor for iOS in order to unify it with the Android implementation, support for relative files and file not found support errors.

* Added unit tests for ImageAssets.

* Added a sample app for UI testing of image-view with ImageAsset src.

* chore: apply PR comments
2018-02-28 14:04:01 +02:00
Martin Yankov 27622d83ba fix-next: ensure proper events on tab change (#5468) 2018-02-28 10:40:05 +02:00
Manol Donev 4898c33a04 fix-next(modal) fix crash when closing modal dialog with root tabview inside (#5446) 2018-02-23 16:46:49 +02:00
Alexander Vakrilov 9423ae40fa test: Fixed unstable timer test (#5449) 2018-02-21 13:07:26 +02:00
Martin Yankov 4ce45666a5 test: add reset root view tests (#5437) 2018-02-21 11:38:37 +02:00
Nikolay Tsonev 625d801014 hiding cookbook/ui/action-bar article in favor of ui/action-bar (#5404)
* hiding cookbook/ui/action-bar article in favor of ui/action-bar

* removing action-bar article from cookbook
2018-02-20 16:43:45 +02:00
Martin Yankov 68d86fb6c6 fix(profiling): resetProfiles doesn't reset all profiles (#5425) 2018-02-19 13:18:50 +02:00
Manol Donev 2edef3de3b fix(frame): root tabview with modal frame when suspend/resume app (#5408) 2018-02-12 16:09:51 +02:00
Martin Yankov b113b0021a feat: Add methods to get the root view and set a different root view at run time (#5386)
* feat: add option to set a different root view at run time

* feat: expose application getRootView method

* refactor: Introduce ViewEntry interface

* fix: Respect root view rturned from launch event in Android

* refactor: getRootView() code + caching root view per activity.

* refactor: add app-root.xml in apps

* refactor: http test made async
2018-02-09 16:04:20 +02:00
Nikolay Tsonev f27d5f212f edit cookbook/image article improve code snippets (#5396) 2018-02-07 18:42:36 +02:00
Nick Iliev 7121eaea89 refactor: update image source documentation snippets and tests (#5390) 2018-02-07 14:58:28 +02:00
Manol Donev 85dc75e09a fix-next: navigation events' workflow in modal dialog scenarios (#5341) 2018-02-06 19:18:28 +02:00
Alexander Vakrilov 464cdd5a07 fix: Fix scroll-view tests for ios 9 and 10 (#5358) 2018-02-02 09:50:15 +02:00
Nikolay Tsonev 9eb341bcb5 adding backStackEntry example, including missing import md file text field (#5319) 2018-01-24 15:28:58 +02:00
Hristo Hristov 18fe9392d6 Fix memory leak in edit-text.android
Fix fromObjectRecursive to doesn't override source object
2018-01-11 13:25:03 +02:00
Hristo Hristov 3384112ce8 When application start is called we don't set Frame to be styleScope
Added requestLayout for TextView
Round desiredSize in nativeMeasure
2018-01-09 13:17:50 +02:00
Hristo Hristov 058a216ac9 Move styleScope from Page to View
Fix image-source test for API 27
setupAsRootView now makes the component styleScope
set css, addCss & addCssFile makes view to be styleScopeHost which cannot be overriden later from parent
Android modals now call setupAsRootView
Small fixes on ios layouts
launch event fired in andriod too
Moved some requestLayout calls to ios files where they belongs
2017-12-19 16:35:15 +02:00
Hristo Hristov 0abfb1493c Fix crash on API17 and API21-25 2017-12-15 13:08:15 +02:00
Hristo Hristov ac04ede97e Implemented showModal on View 2017-12-15 13:08:15 +02:00
Hristo Hristov 28f1a5875e Fix crash on android where we queue few back navigations an exception is thrown.
Fix https://github.com/NativeScript/NativeScript/issues/4986
2017-12-15 13:06:34 +02:00
Hristo Hristov 2e2467ce5d Fixed two android tests to account for small emulator screens and floating density 2017-12-15 13:06:34 +02:00