Commit Graph

5976 Commits

Author SHA1 Message Date
Manol Donev
75ee84cdd2 fix(image): fix(image): apply tintColor correctly on iOS (#5546)
only reset image to non-template when tintColor is changed to a non-color (removed)
2018-03-15 18:41:02 +02:00
Alexander Djenkov
c2cd53fe5f fix(cache-images): respect decodeWidth and decodeHeight when caching images (#115)
* feat(image-fetcher): limit bitmap to device sizes when no request width/height set.

* fix(cache-images): create new cache for images with different decodeHeight/decodeWidth.
2018-03-15 16:39:01 +02:00
Nikolay Tsonev
310edf70cf add zonedCallback in connectivity module (#5531) 2018-03-15 16:25:43 +02:00
Manol Donev
75bd1d2c49 fix(uilabel): line height setter should not break line break mode (#5544)
fix(uilabel): line height setter should not break line break mode
2018-03-15 16:21:03 +02:00
Vasil Chimev
e43c7546bd fix-next(frame): remove current entry fragment on reset root view (#5533)
* chore(e2e): add @types as devDependencies

Update `tsconfig.json` file.

* fix-next(frame): remove current entry fragment on reset root view

* refactor(e2e): undo skip tab root tests

* refactor(frame): extract disposeCurrentFragment() method

Extract the common logic from _onRootViewReset() and onUnloaded() methods to avoid code duplication.
2018-03-14 19:56:15 +02:00
Martin Yankov
cf8dcfa40c feat(view): expose method for android back override (#5537)
Expose method on View class onBackPressed(). Third party controls
like RadSideDrawer can use this method to override the default Android
back button handling. By default the app closes.
2018-03-14 18:15:05 +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
Alexander Vakrilov
45bf5b8f57 chore(docs): Update writing-tests.md with note about code snippets comments (#5489)
* Update WritingUnitTests.md

* chore: typo
2018-03-13 15:42:51 +01: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
Vasil Chimev
e1a1d643c8 test(e2e): add modal-navigation app tests (#5445)
* test(e2e): modal-navigation app webpack support

* test(e2e): add modal-navigation app smoke test

* chore(e2e): tslint disable next line

* chore(e2e): modal-navigation app compilation

* refactor(e2e): modal-nabivation app pages

* test(e2e): add app root modal frame tests

* test(e2e): add app root modal frame background tests

* refactor(e2e): app root modal frame tests

* test(e2e): add tab root modal frame tests

* refactor(e2e): modal frame tests

* test(e2e): add modal page tests

* docs(e2e): add scenarios

* refactor(e2e): modal-navigation app tests

* test(e2e): turn on/off "Don't keep activities"

* test(e2e): delete no background tests

* test(e2e): add modal tab tests

* refactor(e2e): quit driver after all tests

* refactor(e2e): config files

* fix(e2e): tab root tests

* refactor(e2e): skip tab root tests until fix app

* chore(e2e): config files
2018-03-13 09:06:12 +02:00
Panayot Cankov
1cbb1e8d0d feat(webpack): mark the CSS type for stylable views explicitly (#5257)
We want webpack's uglification to mangle function and class names
but that's what the current implementation of the CSS in {N} relys on
to get the CSS type for each view when targeted by CSS type selectors.

The implementation is changed a little so now the CSS type can be set
directly on the prototype of each View class or for TS, through decorator.

BREAKING CHANGES:


Extending classes requires marking the derived class with @CSSType
The root classes are not marked with CSSType and classes derived from ViewBase and View
will continue to work as expected. More concrete view classes (Button, Label, etc.) are
marked with @CSSType now and store their cssType on the prototype suppressing the previous
implementation that looked up the class function name. So clien classes that derive from one of
our @CSSType decorated classes will now have to be marked with @CSSType.
2018-03-12 16:34:25 +02: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
Alexander Djenkov
0138873ee3 feat(modal): introduce stretched param to showModal method (#5496)
* fix-next(ios-modal-view): force stretch alignment

* feat(modal): introduce stretched param to showModal method

* test(modal-view): add modal view stretched test
2018-03-07 18:17:52 +02:00
Alexander Djenkov
6509efa430 fix(android-images): set decodeHeight/decodeWidth default values to dip (#5490)
BREAKING CHANGE: change decodeHeight/decodeWidth properties to accept device independent pixels by default
2018-03-07 15:56:28 +02:00
Manol Donev
92148833d3 fix-next(tabview): fix tab title layout in modal root tabview Fixes #5392 (#5435)
BREAKING CHANGE: [Android] NativeScript no longer overwrites the horizontal/vertical alignment on the user-defined root visual element when opening it in modal dialog window (i.e. not fullscreen).

If your application logic relied on the previous behavior you need to manually set `horizontalAlignment="center"` and `verticalAlignment="middle"` on the root visual element you are showing modally.
2018-03-02 13:27:21 +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
Stanimira Vlaeva
9ce08196f8 fix: throw if global css file is not found in webpack context (#5186) 2018-03-01 11:05:12 +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
Markus Schlichting
eb76a3b859 fix bug in case statement, allow jpg and jpeg (#5473)
the current implementation does not work if one specifies "jpg", it works only with "jpeg" due to the || syntax used. 
This is a proposal to fix it.
2018-03-01 09:11:59 +02:00
Alexander Djenkov
b878143b63 fix(ios-action-bar): enable NavigationButton text change on first navigation (#5458) 2018-02-28 15:36: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
Dimitar Tachev
9d2095cdad [Android] Improve images handling (#109)
* Fixed the inSampleSize calculations based on total pixels (double inSampleSize size -> 4x less pixels)

* Fixed the inSampleSize calculations when only hight or widths is requested.
Added rotation and scaling while processing images.
Added keepAspectRatio property for further flexibility and accuracy.

* Fixed the ExifInterface creation based on the API level.

* Handle file not found in the native images handling.

* chore: apply PR comments
2018-02-28 14:00:43 +02:00
Martin Yankov
27622d83ba fix-next: ensure proper events on tab change (#5468) 2018-02-28 10:40:05 +02:00
Deyan Ginev
949a99ec35 Extend console tests for iOS (#5459) 2018-02-26 16:41:44 +02:00
Deyan Ginev
0b34e67699 fix(inspector): Fix --debug-brk issue with Inspector (#5460) 2018-02-26 11:47:24 +02:00
Alexander Djenkov
c54e069f57 fix(ios-action-bar): NavigationButton cannot be hidden if navigating with transition (#5451) 2018-02-26 09:44:58 +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
Manol Donev
bddb2e911f feat(tabview):improve tabview tab item title layout (#114) 2018-02-22 18:03:27 +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
Stanimira Vlaeva
c7dd02c22e docs: update the PR template to suggest following the commit message guidelines (#5436) 2018-02-21 11:17:39 +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
dtopuzov
795940c224 chore: 3.4.1 changelog (#5444)
Add changelog for 3.4.1 release.
2018-02-20 16:39:37 +02:00
Stanimira Vlaeva
e42567fdd5 docs(CONTRIBUTING): add commit message guidelines (#5430) 2018-02-19 14:02:44 +02:00
Martin Yankov
68d86fb6c6 fix(profiling): resetProfiles doesn't reset all profiles (#5425) 2018-02-19 13:18:50 +02:00
Alexander Djenkov
714af6bb02 fix(ios-frame): do not update backstack when navigating the same page (#5426) 2018-02-19 11:53:04 +02:00
Vasil Chimev
a9ac20da20 docs: update build scripts and .md files (#113)
* docs: add more on Contributing and Get Help

* chore: update build scripts

* docs: update DevelopmentWorkflow.md

* docs: update .md files

* docs: update DevelopmentWorkflow.md

* docs: update development workflow on Win
2018-02-16 10:07:07 +02:00
Alexander Djenkov
b8e0beccdd fix(ios-layouts): switch contentInsetAdjustmentBehavior on ScrollView (#5411)
* fix(layouts): switch contentInsetAdjustmentBehavior on ScrollView

* chore(ui-tests-app): add test for ScrollView as a root Page element
2018-02-15 09:27:16 +02:00
Manol Donev
e1eea8efe7 test(e2e): add modal-navigation app (#5393)
* chore(apps): add modal-navigation-app for ui testing

* test(e2e): add modal-navigation app

* test(apps): remove modal-navigation-app

The app has been moved to `e2e/modal-navigation`.

* chore: include e2e folder to npm scripts

* docs: include e2e folder to DevelopmentWorkflow.md

* chore(e2e): update .gitignore

* fix(e2e): relative paths

* chore(e2e): update package.json

* test(e2e): add change root view to modal-navigation

* test(e2e): set androidTabsPosition to botton

* chore(e2e): add VSCode launch.json config

* docs(e2e): delete LICENSE and README.md files

* refactor(e2e): rename modal-tab-page to modal-tab-root

* test(e2e): update iOS launch screen
2018-02-14 16:51:51 +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
Vasil Chimev
0c8275fa06 refactor: unmark startActivity as deprecated (#5405)
https://github.com/NativeScript/NativeScript/issues/5307
2018-02-08 17:44:53 +02:00
Alexander Djenkov
f8dce08f0e feat(tab-view-android): enable tabs repositioning (#5385)
* feat(tab-view-android): enable tabs repositioning

* feat(tab-view-android): enable tabs repositioning

* chore(apps): add bottom tab view example
2018-02-08 11:06:07 +02:00
Nikolay Tsonev
f27d5f212f edit cookbook/image article improve code snippets (#5396) 2018-02-07 18:42:36 +02:00
Alexander Djenkov
3ac3641b98 feat(view-pager): add TabViewPager with switchable paging (#112) 2018-02-07 18:20:37 +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
tbozhikov
b728a7384d chore: delete redundant LICENSE files (#5383)
* chore: delete redundant LICENSE files

* chore: add back updated LICENSE in tns-core-modules folder
2018-02-05 13:37:52 +01:00
Martin Yankov
f042417f10 refactor(android-tabview): tab adapter data changed event is called too many times (#5364) 2018-02-05 13:52:32 +02:00