mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Merge pull request #7244 from NativeScript/mdonev/release-to-master7237
chore: merge release to master
This commit is contained in:
27
CHANGELOG.md
27
CHANGELOG.md
@ -1,3 +1,30 @@
|
|||||||
|
<a name="5.4.0"></a>
|
||||||
|
# [5.4.0](https://github.com/NativeScript/NativeScript/compare/5.3.2...5.4.0) (2019-05-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* throw if failed to load component ([#7186](https://github.com/NativeScript/NativeScript/issues/7186)) ([b7abb3d](https://github.com/NativeScript/NativeScript/commit/b7abb3d))
|
||||||
|
* **android/button:** possible incorrect button visual state ([#7190](https://github.com/NativeScript/NativeScript/issues/7190)) ([2a02360](https://github.com/NativeScript/NativeScript/commit/2a02360))
|
||||||
|
* **devtools-ios:** Ensure UI modifications run on main thread ([c60f74d](https://github.com/NativeScript/NativeScript/commit/c60f74d)), closes [#7219](https://github.com/NativeScript/NativeScript/issues/7219)
|
||||||
|
* **ios:** add null check to TouchGestureRecognizer ([#7182](https://github.com/NativeScript/NativeScript/issues/7182)) ([7d3f0d9](https://github.com/NativeScript/NativeScript/commit/7d3f0d9))
|
||||||
|
* **ios:** application.displayedEvent does not depend on trace to fire ([#7141](https://github.com/NativeScript/NativeScript/issues/7141)) ([#7156](https://github.com/NativeScript/NativeScript/issues/7156)) ([4e56c89](https://github.com/NativeScript/NativeScript/commit/4e56c89))
|
||||||
|
* **ios:** image cache module not longer sets null in NSCache ([#7171](https://github.com/NativeScript/NativeScript/issues/7171)) ([4f79d2e](https://github.com/NativeScript/NativeScript/commit/4f79d2e))
|
||||||
|
* **ios-modal:** closeCallback not being called with popover presentation style ([#7189](https://github.com/NativeScript/NativeScript/issues/7189)) ([aa44eb9](https://github.com/NativeScript/NativeScript/commit/aa44eb9))
|
||||||
|
* **ios-tabview:** crash when setting tab text color ([#7188](https://github.com/NativeScript/NativeScript/issues/7188)) ([77c45da](https://github.com/NativeScript/NativeScript/commit/77c45da))
|
||||||
|
* **text:** crash when removing FormattedText ([#7237](https://github.com/NativeScript/NativeScript/issues/7237)) ([37b53c6](https://github.com/NativeScript/NativeScript/commit/37b53c6))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **android:** elevation shadow support ([#7136](https://github.com/NativeScript/NativeScript/issues/7136)) ([cf533a7](https://github.com/NativeScript/NativeScript/commit/cf533a7))
|
||||||
|
* **android:** implement a 'activityNewIntent' event ([3efc06e](https://github.com/NativeScript/NativeScript/commit/3efc06e))
|
||||||
|
* **android:** implement BorderDrawable outline ([ec07a99](https://github.com/NativeScript/NativeScript/commit/ec07a99))
|
||||||
|
* **hmr:** preserve navigation history on applying changes ([#7146](https://github.com/NativeScript/NativeScript/issues/7146)) ([d35e14e](https://github.com/NativeScript/NativeScript/commit/d35e14e))
|
||||||
|
* **switch:** add property for off state background color ([#7138](https://github.com/NativeScript/NativeScript/issues/7138)) ([f0146f0](https://github.com/NativeScript/NativeScript/commit/f0146f0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [5.3.2](https://github.com/NativeScript/NativeScript/compare/5.3.1...5.3.2) (2019-05-03)
|
## [5.3.2](https://github.com/NativeScript/NativeScript/compare/5.3.1...5.3.2) (2019-05-03)
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,10 +162,10 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
|||||||
const span = new Span();
|
const span = new Span();
|
||||||
span.text = "long label";
|
span.text = "long label";
|
||||||
span.fontWeight = "bold";
|
span.fontWeight = "bold";
|
||||||
|
|
||||||
const span2 = new Span();
|
const span2 = new Span();
|
||||||
span2.text = "long label";
|
span2.text = "long label";
|
||||||
|
|
||||||
const formattedString = new FormattedString();
|
const formattedString = new FormattedString();
|
||||||
formattedString.spans.push(span);
|
formattedString.spans.push(span);
|
||||||
formattedString.spans.push(span2);
|
formattedString.spans.push(span2);
|
||||||
@ -176,7 +176,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
|||||||
const span3 = new Span();
|
const span3 = new Span();
|
||||||
span3.text = "short label";
|
span3.text = "short label";
|
||||||
span3.fontWeight = "bold";
|
span3.fontWeight = "bold";
|
||||||
|
|
||||||
const formattedString2 = new FormattedString();
|
const formattedString2 = new FormattedString();
|
||||||
formattedString2.spans.push(span3);
|
formattedString2.spans.push(span3);
|
||||||
label.formattedText = formattedString2;
|
label.formattedText = formattedString2;
|
||||||
@ -210,7 +210,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
|||||||
const span = new Span();
|
const span = new Span();
|
||||||
span.text = "short label";
|
span.text = "short label";
|
||||||
span.fontWeight = "bold";
|
span.fontWeight = "bold";
|
||||||
|
|
||||||
const formattedString = new FormattedString();
|
const formattedString = new FormattedString();
|
||||||
formattedString.spans.push(span);
|
formattedString.spans.push(span);
|
||||||
label.formattedText = formattedString;
|
label.formattedText = formattedString;
|
||||||
@ -220,10 +220,10 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
|||||||
const span2 = new Span();
|
const span2 = new Span();
|
||||||
span2.text = "long label";
|
span2.text = "long label";
|
||||||
span2.fontWeight = "bold";
|
span2.fontWeight = "bold";
|
||||||
|
|
||||||
const span3 = new Span();
|
const span3 = new Span();
|
||||||
span3.text = "long label";
|
span3.text = "long label";
|
||||||
|
|
||||||
const formattedString2 = new FormattedString();
|
const formattedString2 = new FormattedString();
|
||||||
formattedString2.spans.push(span2);
|
formattedString2.spans.push(span2);
|
||||||
formattedString2.spans.push(span3);
|
formattedString2.spans.push(span3);
|
||||||
@ -733,6 +733,21 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
|||||||
return host;
|
return host;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public test_FormattedText_ShouldNotCrash_WheRemovedFromSpan() {
|
||||||
|
const label = this.testView;
|
||||||
|
label.color = new colorModule.Color("red");
|
||||||
|
this.waitUntilTestElementIsLoaded();
|
||||||
|
|
||||||
|
const span = new Span();
|
||||||
|
span.text = "test";
|
||||||
|
|
||||||
|
const formattedString = new FormattedString();
|
||||||
|
formattedString.spans.push(span);
|
||||||
|
|
||||||
|
label._addChildFromBuilder("FormattedString", formattedString);
|
||||||
|
label._removeView(formattedString);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createTestCase(): LabelTest {
|
export function createTestCase(): LabelTest {
|
||||||
|
@ -12,7 +12,7 @@ import { isString } from "../../utils/types";
|
|||||||
export * from "./text-base-common";
|
export * from "./text-base-common";
|
||||||
|
|
||||||
interface TextTransformation {
|
interface TextTransformation {
|
||||||
new (owner: TextBase): android.text.method.TransformationMethod;
|
new(owner: TextBase): android.text.method.TransformationMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
let TextTransformation: TextTransformation;
|
let TextTransformation: TextTransformation;
|
||||||
@ -344,7 +344,7 @@ export function getTransformedText(text: string, textTransform: TextTransform):
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createSpannableStringBuilder(formattedString: FormattedString): android.text.SpannableStringBuilder {
|
function createSpannableStringBuilder(formattedString: FormattedString): android.text.SpannableStringBuilder {
|
||||||
if (!formattedString) {
|
if (!formattedString || !formattedString.parent) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ export class TextBase extends TextBaseCommon {
|
|||||||
|
|
||||||
createNSMutableAttributedString(formattedString: FormattedString): NSMutableAttributedString {
|
createNSMutableAttributedString(formattedString: FormattedString): NSMutableAttributedString {
|
||||||
let mas = NSMutableAttributedString.alloc().init();
|
let mas = NSMutableAttributedString.alloc().init();
|
||||||
if (formattedString) {
|
if (formattedString && formattedString.parent) {
|
||||||
for (let i = 0, spanStart = 0, length = formattedString.spans.length; i < length; i++) {
|
for (let i = 0, spanStart = 0, length = formattedString.spans.length; i < length; i++) {
|
||||||
const span = formattedString.spans.getItem(i);
|
const span = formattedString.spans.getItem(i);
|
||||||
const text = span.text;
|
const text = span.text;
|
||||||
|
Reference in New Issue
Block a user