Skip to content
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

feat(ios): update Ti.UI.View.borderRadius to accept number, array and string #11801

Closed
wants to merge 4 commits into from

Conversation

vijaysingh-axway
Copy link
Contributor

@vijaysingh-axway vijaysingh-axway commented Jul 1, 2020

https://jira.appcelerator.org/browse/TIMOB-27305
Note - Merge with PR #11796 , which have doc changes. Unit test is copied from there.

@build build added this to the 9.1.0 milestone Jul 1, 2020
@build build requested a review from a team July 1, 2020 20:08
@build build added the ios label Jul 1, 2020
@build
Copy link
Contributor

build commented Jul 1, 2020

Fails
🚫 Tests have failed, see below for more information.
Messages
📖

💾 Here's the generated SDK zipfile.

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 2 tests have failed There are 2 tests failing and 698 skipped out of 7312 total tests.

Tests:

ClassnameNameTimeError
android.emulator.Titanium.Androidactivity callbacks (9)5.034
Error: timeout of 5000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53120)
android.emulator.Titanium.UI.TextField.focused (9)2.294
Error: timeout of 2000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)

Generated by 🚫 dangerJS against c49c9b8

Copy link
Contributor

@janvennemann janvennemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a super nit-picky note about variable usage, but nothing dramatic. Approved!

iphone/TitaniumKit/TitaniumKit/Sources/API/TiUIView.m Outdated Show resolved Hide resolved
@ssjsamir
Copy link
Contributor

ssjsamir commented Jul 6, 2020

FR Passed Tested with the test case in https://jira.appcelerator.org/browse/TIMOB-27305?focusedCommentId=455767&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-455767, able to see borderRadius corner change the border radius control also tested with different values e.g.

const view_a = Ti.UI.createView({
	backgroundColor: 'red',
	width: 100,
	height: 50,
	top: 100,
	borderRadius: '20 20px 20 30'
});
const view_b = Ti.UI.createView({
	backgroundColor: 'blue',
	width: 100,
	height: 50,
	top: 150,
	borderRadius: [ '20', '30px', '40dp', 20 ]
});

Test Environment

MacOS Big Sur: 11.0 Beta
Xcode: 12.0 Beta 
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.0.0""
iphone 8 Sim (14.0 Beta)

@sgtcoolguy
Copy link
Contributor

manually merged into master

@sgtcoolguy sgtcoolguy closed this Jul 7, 2020
@Max87ZA
Copy link

Max87ZA commented Jul 24, 2020

Hi guys, I installed Ti.SDK 9.1.0.v20200723064106 today to test it and found a bug - I have views(bar chart) which each bar has borderRadius: [ '8', '0', '8', "0" ], so top left and bottom right corners are rounded. Problem is, that height of the each bar is dynamically generated(based on value from API) and animated and if height is small(let's say 60% of parent), both corners are rounded. But if height is bigger, bottom right corner loose its shape(see attached screenshot, all bars are generated in for loop with same code and there are differences in corner radius). Can you pls look at it and fix it?
Tested on iPhone 11 Pro simulator, iOS13.6
Thank you
Simulator Screen Shot - iPhone 11 Pro - 2020-07-24 at 19 29 18

@brentonhouse
Copy link
Contributor

@Max87ZA - Can you post the code used to generate this (or a sample app)?

@Max87ZA
Copy link

Max87ZA commented Jul 24, 2020

@Max87ZA - Can you post the code used to generate this (or a sample app)?

Hi Brenton, I also wrote to JIRA ticket https://jira.appcelerator.org/browse/TIMOB-27305, working on standalone app

Edit: @brentonhouse here it is. In app/lib folder there is chart.js where is the code to generate that chart.
Dummy.zip

@brentonhouse
Copy link
Contributor

Thanks @Max87ZA!

@ssaddique
Copy link
Contributor

ssaddique commented Aug 6, 2020

Fix verified on build 9.1.0.v20200804082025.

Test environment

OS Ver:         10.15.3
Xcode Ver:      Xcode 11.6
Appc NPM:       5.0.0
Appc CLI:       8.0.0
Node Ver:       10.17.0
Java Ver:       1.8.0_162
Simulator:      iPhone 5s (11.4), iPhone 8 (12.4), iPhone 11 Pro (13.6)
Device:         iPhone 6 (12.1.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants