213 Commits

Author SHA1 Message Date
57a86051b2 feat(action-bar-android): add properties to control the titleView content insets (#7805) 2019-10-02 14:41:36 +03:00
dfcbe6c319 style: formatting and whitespaces (#7840) 2019-09-19 15:40:31 +03:00
673c8087e0 feat: implement css-variables and css-calc (#7553)
* feat: implement basic support for css-variables

* fix(test): test-watch-android and test-watch-ios was broken

* fix: processing css-variables belong in CssProperty-classes

Not in the StyleScope.

* fix(css-variables): set style attribute override value from css-classes

* feat: add css calc-support using 'reduce-css-calc'

* fix(tslint): missing semicolon and incorrect quotemark

* feat: move css-variable handling to Style-class

* chor: add comments explaining css-variable implmentation

* chor: set css-variables before other style properties

* chor(css-variables): cleaning up

* chor: code style fixes

* test(CSS-CALC): Add tests for nested css-calc statements

* fix(CSS-CALC): dip-unit not supported by reduce-css-calc

* fix(tslint): use double quotemarks

* test(css-calc): test _cssCalcConverter directly

* chor(css-variables): rename and clean up _cssVariableConverter to _evaluateCssVariable

* chor: rename varname to varName for consistency

* chor: support css-calc and variables for normal properties

* chor: use string.replace to evaluate css-variables

* fix: Missing blank line before return

* chor: rename css-calc functions

* fix: undefined css-variables treated as 'unset'

* fix(tslint): use double quotemarks

* feat(css-variable): handle fallback values

* chor(css-variables): handle unsetValue

* chor: process css-calc and css-variables in style-scope

* chore: clean-up css-calc/variable expressions

* fix(css-calc): handle invalid expressions

* chore(CSSState): update comments

* chore(Style): rename css-variable functions

* chore(css-variables): describe fallback logic

* chore: move reset scoped css-variables to Style-class

* chore(CssState): simplify check for css expressions

* chore: add reduce-css-calc to /package.json
2019-08-20 00:56:56 +03:00
129d899820 docs: add comments about how app.css+snapshot work 2019-08-02 17:04:05 +03:00
9113a04d80 refactor: return of missing css errors 2019-08-02 15:46:04 +03:00
abc143eeac Merge remote-tracking branch 'origin/master' into svetoslavtsenov/merge-release-in-master 2019-07-16 13:26:15 +03:00
aed1daa8f5 fix: Missing app.css error in playground (#7499) 2019-07-10 18:39:21 +03:00
8756b3da16 refactor: HMR and webpack improvements (#7462)
* chore: update project

* refactor: clear module-name cache on orientation

* feat: add custom component in qualifiers app

* feat: enable HMR for custom components

* refactor: remove redundant check

* chore: clean console.log
2019-07-08 11:11:14 +03:00
d985c33de3 chore: require relative path within tns-core-modules (#7367) 2019-06-28 18:23:39 +03:00
4f39fb728b chore: update tslint rules (#7391) 2019-06-26 15:13:48 +03:00
9ecf07fee6 fix(css-state): _appliedSelectorsVersion assignment (#7405)
Assign CSS state applied selectors version after ensuring and matching the selectors.
2019-06-26 00:49:55 -07:00
28d7240cc5 chore: tslint errors 2019-06-25 18:00:04 +03:00
4299d4aedc Merge branch 'master' into mdonev/release-to-master20190621 2019-06-21 15:39:51 +03:00
dfe76213dd fix: clear the resolvedPage when entry is being cleared, change the passed View to be a weak reference (#7327)
* fix: clear the `resolvedPage` when entry is being cleared
fix: change the passed `View` to be a weak reference

* chore: add trace logs when weak ref has been cleared but is continuing to be used
chore: add condition to check if weak ref has not been cleared when it is being used

* chore: refactor the way the `resolvedPage` is cleared

* chore: add backward compatible property to avoid breaking changes

* chore: refactor condition to check if WeakRef is not cleared
chore: add tracelogs

* chore: refactor condition to check if WeakRef is not cleared
chore: add tracelogs

* refactor: weakRef usages

* chore: change the way WeakRef type check is done
2019-06-21 01:48:49 -07:00
ecd9fc3e9d feat: bundle workflow support (#7337) 2019-06-20 15:58:36 +03:00
c5db112b8d feat(android): androidX support (#7039)
* feat: migrate support library namespaces to androidX

* feat(tns-platform-declarations): update to androidX typings

* chore(tests): migrate test apps to AndroidX

* chore(tns-platform-declarations): update tsconfig to include androidx dts files

* update package.json to androidx

* chore(androidx): migrate forgotten support library namspaces

* feat(tns-core-modules-widgets): migrate to AndroidX namespaces

* chore(utils): update androidx namspace for getPaletteColor method

* chore(apps): update tns-platform-declarations package

* Update package.json
2019-06-10 09:21:41 +03:00
2e15dd66d9 refactor: remove ununsed method (#7232) 2019-05-22 14:56:54 +03:00
7458e68844 Merge branch 'master' into animate-width-height 2019-05-21 14:12:14 +03:00
cf533a7b6d feat(android): elevation shadow support (#7136) 2019-05-10 11:05:28 +03:00
66d631ebca Revert "Revert "feat(animation): support animating width/height properties (WIP) (#4917)" (#5136)"
This reverts commit 8973a6febde4a4b41637d80b17506a7d25ffebf8.
2019-05-07 13:58:07 +03:00
037c54faaf Merge branch 'master' into mdonev/release-to-master-7135 2019-04-12 11:38:17 +03:00
170d2a84eb fix: no trace message on empty app.css (#7135) 2019-04-12 11:36:38 +03:00
b436ecde36 refactor: replace var usage with let/const (#7064) 2019-03-25 18:09:14 +02:00
34fe24732d chore: deprecate utils.ios.getter (#7054) 2019-03-22 17:33:21 +02:00
07194225b3 Merge branch 'master' into merge-release-master-5.2.1 2019-02-19 11:53:30 +02:00
44b8acd79c feat(HMR): apply changes in page styles at runtime when app root is a frame (#6857)
* feat(HMR): apply changes in page styles at runtime

* fix: livesync tests

* test: changeCssFile method

* refactor: address comments

Add a comment.
Update `let` to `const`.
Update `changesCssFile` test.

* test: add an assert
2019-02-14 14:03:13 +02:00
8330ac0ac1 fix(css): widget properties in css didn't work (#6889) 2019-02-13 15:10:06 +02:00
4c15f71789 fix: iOS tests 2018-12-14 14:34:50 +02:00
790bcfb470 refactor(HMR): apply changes in application styles at runtime 2018-12-14 14:34:50 +02:00
42a1491e6e feat(HMR): apply changes in application styles at runtime
Expose `HmrContext` interface.
Apply changes in `app.css` instantly.
Avoid navigation on livesync when changes in `app.css` have been made.
Apply changes in `app.css` on back navigation.
2018-12-14 14:34:47 +02:00
11d3884243 fix(android-styling): correctly detect if drawable uses ColorFilter (#6342)
* fix(android-styling): correctly detect if drawable uses ColorFilter

Treat a widget with a BorderDrawable background as any other, even if it's FilterOnly

If the drawable has been replaced with a new one, clear _cachedDrawable

Fixes #6341

* test(button): add test for changing border-radius and color in button

* test: fix test checks for IOS

* keep original drawable cached
2018-11-27 10:44:34 +02:00
2933a9a934 fix: Resolve incorrect name of listener when unsubscribing (#6487) 2018-11-02 15:33:17 +02:00
1232d1edfd feat(tslib): add tslib helpers to global (#6351)
* feat(tslib): add tslib helpers to global

* Adds tslib as a dependency to tns-core-modules
* Replaces globals/decorators with globals/tslib
* Adds support for async/await, rest and spread operators.

* refactor: rename tslib to ts-helpers to avoid confusion with npm package
2018-10-05 17:12:45 +03:00
12fade7155 fix: Page and Frame isLoaded undefined checks (#6255)
* fix(view): isLoaded handling

closes https://github.com/NativeScript/NativeScript/issues/6179

* refactor: Error handling code in onCreateView
2018-09-17 15:37:29 +03:00
ca0043701b refactor: remove obsolete ViewHelper.setBackground method (#6240) 2018-09-05 17:35:59 +03:00
85b8c018a5 feat(styling): Added 2 functions to control applicationAdditionalSelectors (#6124)
* Added getAdditionalSelectors function so that nativescript-theme can be functional again in NS 4.x

* Change to a better more extensible additional css system.

* removed redunant function on the name.

* Fix lint issues

* Adding mergeSelectors to the remove function

* Added test of new add/remove css functions.

* fix: revert testRunner.ts changes that disabled all tests except style

* refactor: fix typo

* chore: fix typo and change test to no not affect global styles
2018-08-02 11:51:07 +03:00
6ce1d22d9a feat(CSS): import of relative paths (#6023)
* feat(CSS): import of relative paths

* refactor: address comments
2018-07-21 05:54:32 +03:00
f9d66de79c fix(styling-gradient): change imports in definition files (#5852) 2018-05-23 09:57:24 +03:00
3f8af4cc0e fix(styling-gradient): introduce gradient definition file (#5828) 2018-05-17 15:44:40 +03:00
2fc1d8a8d4 chore(tsc): enable noUnusedLocals compiler option for tns-core-modules (#5755) 2018-05-10 16:12:59 +03:00
9d21a743c4 Revert 5772 revert 5534 css gradients (#5779)
* Revert "Revert "Css gradients" (#5772)"

This reverts commit 7edf56197a179b13e1afe4c706aea4a99ac62aca.

* chore(): fix LinearGradient circular dependency
2018-05-10 10:44:35 +03:00
11f0d6e98d feat(tabview): add tab text font size property (#5752)
* feat(tabview): add tab text font size property

* chore(tabview): set tab font size default value

* chore(tabview): move font implementation to widget

* chore(tabview): fix font size get return type
2018-05-09 17:13:34 +03:00
7edf56197a Revert "Css gradients" (#5772)
This reverts commit 5a83a1c858e8095353aa50fe4ea080b07bf85813.
2018-05-03 18:17:07 +03:00
5a83a1c858 Css gradients (#5534)
* feat(ios): Added support for css gradients.

* feat(android): Added support for css gradients.

* fix: Fixed gradient borders on ios

* fix(gradient): added backgroundGradient to View and Style.

* fix(ios-gradients): fixed ios gradients covering view content.

* test(gradient): Added ui app tests for background gradients.

* test(gradient): Added a test ensuring background gradient property is applied to style.

* style(gradient): Fixed tslint errors.

* fix(gradient): Removed the background-gradient property and added the gradient to background-image.

* style: fixed a consecutive blank line tslint error.

* fix(tests): fixed the bug that was causing tests to fail.

* chore(linear-gradient): fix equality comparer

* test(gradient): add linear gradients test app

* chore(tslint): update with latest tslint rules
2018-05-03 13:24:41 +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
c0a7a45ab9 refactor: Handle TS2.7 stricter tuples checks (#5366) 2018-02-01 13:04:55 +02:00
60773e7545 fix(webpack): fix fragment css not being applied with webpack (#5172)
Support css files for fragments to be registered using global.registerModule
and global.registerWebpackModules.
2017-12-14 18:51:44 +02:00
8973a6febd Revert "feat(animation): support animating width/height properties (WIP) (#4917)" (#5136)
This reverts commit 57ed0cf405be44e31358ff17f372b5d926e63639.
2017-12-07 12:11:24 +02:00
634cf9a822 Fix background scale quality (#5113)
UIGraphicsBeginImageContextWithOptions with scale factor 0 makes sure the device scale factor is used automatically and not 1.0
2017-12-05 23:12:12 +02:00
57ed0cf405 feat(animation): support animating width/height properties (WIP) (#4917)
* feat(animation): support animating width/height properties

 - width/height can be specified in any valid PercentLength form that can be parsed.
 - make width/height properties be based on animatable CSS property. TODO: affectsLayout????
 - add a few basic tests. Could probably use a few more?
 - fix a few null pointer exceptions in PercentLength helpers

* test(ui): add animation examples to ui-tests-app

 - basic height animation
 - height animation in StackLayout
 - fix an issue where strings were not automatically converted to PercentLength when calling directly into `View.animate`

* test(ui): cleanup and add summary/details layout example

 - use height transition to cover textview content.
 - when clicking on the summary view, animate the summary height up to a small header and show the text view.
 - fake animating the height on the textview by very subtly animating its translateY value while shrinking the header height. This tricks your mind into think that the text view is also vertically growing, even thought it's just slightly moving up along the Y axis.

* test(ui): add animation curves test page

 - verify all built-in animation curve types work as expected.

* test(ui): update animation curve example for multiple properties

 - add a segmented bar that allows choosing which properties to animate using the various curves.
 - interestingly, a whole bunch of properties fail with spring on iOS.
 - refactor width/height animations handlers to remove duplication on iOS.
 - implement proper spring animation for width/height on iOS.

* test(ui): add stress example with 100 labels animating and fps meter

 - same curve/property selector as the curves example, but with 10x10 grid of items that stagger animate, and an FPS meter.
 - sadly it looks like width/height animations are considerably slower than the others when you have a bunch of them. I'm not sure that's entirely surprising since they interact with the layout system.
 - the better news is that even with the army example, my really old android 4 tablet manages ~30fps. On height/width animations from the curves example, the old tablet does fine with no noticeable FPS hit.

* refactor: deduplicate existing droid width/height animations

 - stash to prep for replacing with LayoutTransition.

* test(animation): unit tests for extent animation and PercentLength parse

 - update animation scaffold to allow specifying the parent stack layout height/width
 - test basic supported units, px, %
 - test basic percent length parser behaviors

* chore: cleanup cruft and remove noise from diff

 - undo the import mangling that WebStorm helpfully applied
 - remove .editorconfig file
 - clean up in tests, remove cruft

* chore: cleanup from review

 - more import changes

* chore: remove .editorconfig
2017-12-05 13:55:54 +02:00