Commit Graph

57 Commits

Author SHA1 Message Date
Vasil Chimev
4c15f71789 fix: iOS tests 2018-12-14 14:34:50 +02:00
Vasil Chimev
790bcfb470 refactor(HMR): apply changes in application styles at runtime 2018-12-14 14:34:50 +02:00
Vasil Chimev
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
Vladimir Amiorkov
2933a9a934 fix: Resolve incorrect name of listener when unsubscribing (#6487) 2018-11-02 15:33:17 +02:00
Alexander Vakrilov
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
Nathanael Anderson
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
Vasil Chimev
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
Manol Donev
2fc1d8a8d4 chore(tsc): enable noUnusedLocals compiler option for tns-core-modules (#5755) 2018-05-10 16:12:59 +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
Martin Yankov
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
Panayot Cankov
cb4691b061 Check for .css files when .less, .scss etc. are queried in style-scope (#5128) 2017-12-05 08:59:21 +02:00
Panayot Cankov
255fedac83 Add a globals.registerWebpackModules that can register dynamic require webpack context (#5087) 2017-11-22 13:02:42 +02:00
Hristo Hristov
43fbabb5e9 Fixed most module cyclic references. There is one left for ios and android: (#4978)
- http -> http-request -> image-source
that can't be fixed easily and will be removed once we delete image-source module because it is obsolete anyway.
There is one more for android:
- frame -> fragment that could be removed if we use global object.
Updated madge bersion
2017-11-10 15:47:02 +02:00
Panayot Cankov
f7a3a36b9c Housekeeping node tests, renamed to unit-tests (#4936)
Add parsers for the background css shorthand property, make ViewBase unit testable in node environment

Add background parser and linear-gradient parser

Use sticky regexes

Simplify some types, introduce generic Parsed<T> instead of & TokenRange

Apply each parser to return a { start, end, value } object

Move the css selector parser to the css/parser and unify types

Add the first steps toward building homegrown css parser

Add somewhat standards compliant tokenizer, add baseline, rework and shady css parsers

Enable all tests again, skip flaky perf test

Improve css parser tokenizer by converting some char token types to simple string

Implement 'parse a stylesheet'

Add gonzales css-parser

Add parseLib and css-tree perf

Add a thin parser layer that will convert CSS3 tokens to values, for now output is compatible with rework

Make root tsc green

Return the requires of tns-core-modules to use relative paths for webpack to work

Implement support for '@import 'url-string';

Fix function parser, function-token is no-longer neglected

Make the style-scope be able to load from "css" and "css-ast" modules

Add a loadAppCss event so theme can be added to snapshot separately from loaded
2017-10-20 10:42:07 +03:00
Panayot Cankov
35be4bc40a Animations improperly reset (#4900)
* Animations improperly reset

* Scope stop and start of animations to avoid blinks
2017-10-03 15:50:09 +03:00
Panayot Cankov
6d7c1ff295 Avoid applying CSS multiple times (#4784)
* Move the applyStyleFromScope to onLoaded, when the views are created and id or className properties are set the CSS selectors are queried and applied multiple times

* Condense the changes when applying properties
2017-09-25 18:32:00 +03:00
Hristo Hristov
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
Stanimira Vlaeva
43b21ce7e7 refactor(css-selector): export createSelector method (#4580)
needed for NativeScript Angular's animation driver
2017-07-20 18:02:01 +03:00
Stanimira Vlaeva
9bba250424 Refactor transform animations (#4296)
* feat: add matrix module

* fix(animations): parse transform property correctly

* fix(css-animations): compute transformation value with matrix

* refactor: add typings for keyframes array in style scope

* fix(animations): transform regex and method invocation

* fix(matrix): rewrite decomposition function

* refactor: transform animations parse

* test: add tests for css animation transform

* refactor: move transformConverter to style-properties

* lint: remove unnecessary comma

* lint: remove unnecessary word in d.ts

* fix(style-properties): correctly use transformConverter

* fix(matrix): flat multiply affine 2d matrices

cc @PanayotCankov
2017-06-09 18:20:07 +03:00
Panayot Cankov
c519a4bb6f add profile for functions, profile CSS-es on startup, use __time 2017-05-25 14:40:13 +03:00
Panayot Cankov
108f4c287d Inital animations were not played in android, since CSS in android is now applied before the native view is created/assigned 2017-04-12 10:40:45 +03:00
Panayot Cankov
4105083dd4 Fix iOS animations, transition was workin in DIP, when css class is change objects were flickering 2017-04-03 17:17:59 +03:00
vakrilov
740d71a238 Apply page css when using nav-entry with create method 2017-04-03 14:51:57 +03:00
Hristo Deshev
b89951845b Fix CSS animations for elements that have not been loaded yet.
- Always apply animations even if it happens before the loaded event.
- Add an extra check for Android LinearInterpolator to get rid of a
curve resolution crash.
2017-03-24 15:28:29 +02:00
Hristo Hristov
92723d176b Livesync reloads css (#3835) 2017-03-21 13:04:50 +02:00
Hristo Deshev
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
vakrilov
e6691472da FIX: CSS imports not applied 2017-03-13 11:26:08 +02:00
Panayot Cankov
d38e99cabd Expose hasLaunched() on the application, style-scope will load css-es if app hasLaunched 2017-03-13 10:57:51 +02:00
Hristo Hristov
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
Panayot Cankov
b487aa0790 Fix application.cssFile var, promoted to get/set function 2017-03-09 13:47:36 +02:00
Hristo Deshev
b45cbe929b No more ambient modules for tns-core-modules/* subpackages.
- Use path mappings in tsconfig.json to resolve module typings
- Only use ambient mobules for global API's
- Move single-file modules to a subdir with the same name so that
we can provide a hand-written typing next to it (via package.json)
- Delete all mentions of tns-core-modules.d.ts
- Delete reference d.ts assembly build steps. Not needed anymore.
- HACK! Use a <reference> for global typings in application.d.ts
to avoid publishing a separate @types/tns-core-modules package.
- Rename declarations.d.ts to tns-core-modules.d.ts to preserve
JS project mappings in references.d.ts (the only place we use those)
2017-03-07 17:59:02 +02:00
Hristo Hristov
ea22eb9c20 refactoring circular imports 2017-03-06 14:05:55 +02:00
Panayot Cankov
dc97ed24f9 Fix flexbox css not applied. Fix addCss duplicating some selectors. 2017-02-23 16:41:08 +02:00
Hristo Hristov
dc25c85e97 addCssFile on application module wasn’t changing the app styles (#3666) 2017-02-21 09:28:51 +02:00
Hristo Hristov
a582adc561 Hhristov/fix (#3653)
* Fix action-bar systemIcon
Fix CSS applying

* refactoring

* fix console

* remove StyleScope import - it is private and cannot be imported in public .d.ts
2017-02-17 17:21:57 +02:00
Panayot Cankov
5265bf0ae3 Animation properties and some backward compatability with the QSF 2017-02-08 10:52:54 +02:00
vakrilov
e5f7c7e4d4 Segmented bar styles 2017-02-01 17:45:14 +02:00
Rossen Hristov
c3327ea52f Fix animations and lots of cyclic requires 2017-01-13 14:41:38 +02:00
vakrilov
e983295952 Style tests fixes 2017-01-12 14:24:12 +02:00
Nedyalko Nikolov
08e73b3d10 Fixed style scope. 2017-01-09 14:19:04 +02:00
Rossen Hristov
eb4ac8d109 Fix all tslint errors 2017-01-06 12:00:06 +02:00
Nedyalko Nikolov
421810c293 TextView tests. 2017-01-05 16:09:13 +02:00
Panayot Cankov
c66e3e8ab5 Fix tslint errors 2016-12-27 13:20:59 +02:00
PanayotCankov
7931ecd4f8 Fix tslint errors 2016-12-21 17:42:31 +02:00
Panayot Cankov
6feeb140e3 Fixing type errors in tests 2016-12-19 10:36:25 +02:00
Hristo Hristov
f75f583573 tns-core-modules done 2016-12-13 15:51:18 +02:00
Hristo Hristov
19ee47ba24 got to layouts 2016-12-13 15:51:18 +02:00
Hristo Hristov
befb494a50 up to segmented-bar.ios 2016-12-13 15:51:18 +02:00
Hristo Hristov
a64847ca9d next 2016-12-13 15:51:18 +02:00
Hristo Hristov
b58e0b08a3 refactoring 2016-12-13 15:51:18 +02:00