-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-24080] : iOS - Paragraph style support in attributed string #10032
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
6b381e5
[TIMOB-24080] : iOS - Paragraph style support in attributed string
vijaysingh-axway 1f3cd18
[TIMOB-24080] : Doc added
vijaysingh-axway 9b2613d
[TIMOB-24080] : iOS paragraph style support to AttributedString
vijaysingh-axway 0f35540
Merge branch 'master' into TIMOB-24080
vijaysingh-axway e812a87
[TIMOB-24080] : Indentation fixed for doc
vijaysingh-axway eff5079
Merge branch 'master' into TIMOB-24080
vijaysingh-axway 18cfc04
Merge branch 'master' into TIMOB-24080
vijaysingh-axway 126efc4
[TIMOB-24080] : Updated docs
vijaysingh-axway b39ec57
[TIMOB-24080] : Unite test added
vijaysingh-axway 0b08469
[TIMOB-24080] : UNit test added
vijaysingh-axway cae392a
[TIMOB-24080] : Linting issue fixed.
vijaysingh-axway 6155bbe
[TIMOB-24080] : Linting issue fixed
vijaysingh-axway 04bc22b
Merge branch 'master' into TIMOB-24080
vijaysingh-axway 3e42ad6
Merge branch 'master' into TIMOB-24080
vijaysingh-axway b683bee
Merge branch 'master' into TIMOB-24080
vijaysingh-axway 7e6498e
[TIMOB-24080] : Unit test linting issue fixed
vijaysingh-axway 67ca65f
[TIMOB-24080] : Final linting fixed
vijaysingh-axway 103c545
Update ti.ui.attributedstring.addontest.js
hansemannn b912dac
Merge branch 'master' into TIMOB-24080
vijaysingh-axway f6a06e8
Update TiUIAttributedStringProxy.m
hansemannn 2e13750
[TIMOB-24080] : iOS - Paragraph style support in attributed string
vijaysingh-axway 760b9fb
Merge branch 'master' into TIMOB-24080
vijaysingh-axway 2396835
[TIMOB-24080] : Doc updated
vijaysingh-axway f084a52
Update Attribute.yml
hansemannn d1e3234
Update UI.yml
hansemannn fc95b6f
Update TiUIAttributedStringProxy.m
hansemannn 4ce0309
Merge branch 'master' into TIMOB-24080
hansemannn a72382e
Merge branch 'master' into TIMOB-24080
vijaysingh-axway bd42f0b
Merge branch 'master' into TIMOB-24080
vijaysingh-axway c733c1f
Merge branch 'master' into TIMOB-24080
vijaysingh-axway a69174a
Merge branch 'master' into TIMOB-24080
keerthi1032 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -529,7 +529,7 @@ - (NSNumber *)convertUnits:(id)args | |
MAKE_SYSTEM_PROP(ATTRIBUTE_STRIKETHROUGH_COLOR, AttributeNameStrikethroughColor); | ||
MAKE_SYSTEM_PROP(ATTRIBUTE_OBLIQUENESS, AttributeNameObliqueness); | ||
MAKE_SYSTEM_PROP(ATTRIBUTE_EXPANSION, AttributeNameExpansion); | ||
MAKE_SYSTEM_PROP(ATTRIBUTE_LINE_BREAK, AttributeNameLineBreak); | ||
MAKE_SYSTEM_PROP(ATTRIBUTE_LINE_BREAK, AttributeNameLineBreak); // deprecated | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like we only warn the user via code so far, not via docs. Please add. |
||
|
||
- (NSNumber *)ATTRIBUTE_UNDERLINE_STYLE_NONE | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2011-Present by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
/* eslint-env mocha */ | ||
/* global Ti */ | ||
/* eslint no-unused-expressions: "off" */ | ||
'use strict'; | ||
var should = require('./utilities/assertions'); | ||
|
||
describe('Titanium.UI.AttributedString', function () { | ||
|
||
it.ios('Ti.UI.AttributedString', function () { | ||
should(Ti.UI.AttributedString).not.be.undefined; | ||
}); | ||
|
||
it.ios('apiName', function () { | ||
var attributedString = Ti.UI.createAttributedString({ | ||
text: 'abc' | ||
}); | ||
should(attributedString).have.readOnlyProperty('apiName').which.is.a.String; | ||
should(attributedString.apiName).be.eql('Ti.UI.AttributedString'); | ||
}); | ||
|
||
it.ios('createAttributedString', function () { | ||
var attributedString = Ti.UI.createAttributedString({ | ||
text: 'abc' | ||
}); | ||
|
||
should(attributedString).be.a.Object; | ||
should(attributedString.text).be.a.String; | ||
should(attributedString.text).be.eql('abc'); | ||
}); | ||
|
||
it.ios('attributes', function () { | ||
var str = 'Lorem ipsum dolor sit amet.'; | ||
var attributedString = Ti.UI.createAttributedString({ | ||
text: str, | ||
attributes: [ { | ||
type: Ti.UI.ATTRIBUTE_PARAGRAPH_STYLE, | ||
value: { | ||
alignment: Ti.UI.ATTRIBUTE_TEXT_ALIGNMENT_JUSTIFIED, | ||
minimumLineHeight: 40, | ||
headIndent: 5, | ||
lineSpacing: 5 | ||
}, | ||
range: [ 0, str.length ] | ||
} ] | ||
}); | ||
|
||
should(attributedString.text).be.eql(str); | ||
should(attributedString.attributes.length).be.eql(1); | ||
|
||
attributedString.addAttribute({ | ||
type: Ti.UI.ATTRIBUTE_FONT, | ||
value: { | ||
fontSize: 16 | ||
}, | ||
range: [ 0, str.length ] | ||
}); | ||
should(attributedString.attributes.length).be.eql(2); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this is deprecated?