[GitHub] incubator-weex-site pull request #93: Correct extend-android-en.md several e...

2018-03-09 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-weex-site/pull/93


---


[GitHub] incubator-weex-site pull request #92: Updating document for Contributing to ...

2018-03-09 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-weex-site/pull/92


---


[GitHub] incubator-weex-site pull request #92: Updating document for Contributing to ...

2018-03-09 Thread varunsob
Github user varunsob commented on a diff in the pull request:

https://github.com/apache/incubator-weex-site/pull/92#discussion_r173430846
  
--- Diff: source/contributing.md ---
@@ -7,42 +7,52 @@ version: 2.1
 
 # How to Contribute
 
-Apache Weex is an open source project which is under active development,  
developers can participate and contribute to the Apache Weex community in a 
variety of ways. Contributing doesn't just mean contributing code, reporting 
bugs, answering questions, joining in discussions and contributing 
documentation are also welcome.
-
-## Report Bugs
+Apache Weex is an open source project that is under active development and 
we're continuously working out to simplify contributing to Weex ecosystem. 
Developers can participate and contribute to the Apache Weex community by 
reporting bugs, contributing code, answering questions, joining in discussions 
and contributing to documentation.
 
+## Bugs
 You can use Weex directly through [Get Started](./guide/index.html) 
tutorial. If you encounter any unexpected phenomena during your use, feel free 
to let us know by filing a bug report.
--- End diff --

We should change it here. 'Getting Started' makes more sense. I'll make the 
change and push again.


---


[GitHub] incubator-weex-site pull request #92: Updating document for Contributing to ...

2018-03-09 Thread Hanks10100
Github user Hanks10100 commented on a diff in the pull request:

https://github.com/apache/incubator-weex-site/pull/92#discussion_r173422067
  
--- Diff: source/contributing.md ---
@@ -7,42 +7,52 @@ version: 2.1
 
 # How to Contribute
 
-Apache Weex is an open source project which is under active development,  
developers can participate and contribute to the Apache Weex community in a 
variety of ways. Contributing doesn't just mean contributing code, reporting 
bugs, answering questions, joining in discussions and contributing 
documentation are also welcome.
-
-## Report Bugs
+Apache Weex is an open source project that is under active development and 
we're continuously working out to simplify contributing to Weex ecosystem. 
Developers can participate and contribute to the Apache Weex community by 
reporting bugs, contributing code, answering questions, joining in discussions 
and contributing to documentation.
 
+## Bugs
 You can use Weex directly through [Get Started](./guide/index.html) 
tutorial. If you encounter any unexpected phenomena during your use, feel free 
to let us know by filing a bug report.
--- End diff --

The title of that link is `Getting Started`. Should we change it here, or 
change the article title?


---


[GitHub] incubator-weex-site issue #94: Correct some wrong links

2018-03-09 Thread varunsob
Github user varunsob commented on the issue:

https://github.com/apache/incubator-weex-site/pull/94
  
@shikechen I agree completely with the changes you've done. And Yes, we 
should add another "homepage" item and use it if the visitor clicks on the 
company logo (outside android/ios icon).


---


[GitHub] incubator-weex-site pull request #94: Correct some wrong links

2018-03-09 Thread shikechen
GitHub user shikechen opened a pull request:

https://github.com/apache/incubator-weex-site/pull/94

Correct some wrong links

Correct who-is-using-weex.md some wrong links, please DO NOT add android 
apk download link as user may not want to download apk when click link.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/shikechen/incubator-weex-site patch-2

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex-site/pull/94.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #94


commit 5b77f96aae1a8d60eda79042d7e62168e1b11d8b
Author: shikechen <806335962@...>
Date:   2018-03-09T09:40:24Z

Correct some wrong links

Correct who-is-using-weex.md some wrong links, please DO NOT add android 
apk download link as user may not want to download apk when click link.




---


[jira] [Commented] (WEEX-233) More enhanced about component

2018-03-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WEEX-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16392574#comment-16392574
 ] 

ASF GitHub Bot commented on WEEX-233:
-

Github user TheKingOfGods commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/1058#discussion_r173389264
  
--- Diff: android/sdk/src/main/java/com/taobao/weex/ui/view/WXWebView.java 
---
@@ -230,7 +295,79 @@ public void onReceivedTitle(WebView view, String 
title) {
 }
 }
 
+@Override
--- End diff --

Yes, `addJavascriptInterface` is better, and it will be used when Android 
API >= 17 . But there is a 
[risk](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6636) before 17. 
So `prompt`  is used as a downgrade when Android API < 17


> More enhanced about  component
> ---
>
> Key: WEEX-233
> URL: https://issues.apache.org/jira/browse/WEEX-233
> Project: Weex
>  Issue Type: Improvement
>  Components: Android, iOS
>Reporter: TangWei
>Assignee: Adam Feng
>Priority: Major
>  Labels: features, newbie
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> ~0301 Modified version~
> ~0302 Modified version~
>  _0307 Modified version_
> Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss 
> the enhancements about component, let it take over where we can't implement 
> through weex.
> h2. Target
> {{}} is used to display web content that specified by src attribute in 
> weex page,We also can use webview module to control WebView behavior such as 
> goBack, goForward and reload.
> But it's not enough in most businesses,I think a more enhanced web component 
> should have the following:
>  * Support to send messages from Weex to a html in component.
>  * Support to send messages from a html in component to Weex.
>  * Support to render html source.
> Previously, component was an island that only rendered a remote url, but 
> enabled it to communicate through the context native to the webView. Then I'm 
> going to describe the solution that I came up with.
> h2. My solution
> h3. Code
>  * Weex iOS:
>  ** 
> [WXWebComponent.m|https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m]
>  ** 
> [WXWebComponent.h|https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.h]
>  ** 
> [WXWebViewModule.m|https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Module/WXWebViewModule.m]
>  * Weex Vue Demo:
>  ** [http://dotwe.org/vue/3576ed477d21dc020e63bf57dc414fff]
>  ** [Demo Bundle 
> JS|http://dotwe.org/raw/dist/3576ed477d21dc020e63bf57dc414fff.bundle.wx]
>  ** [Web End|http://h5.m.taobao.com/trip/wx-detection-demo/web.html]
> h3. 
> [Demo|https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif] && 
> [Theory|https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png]
> |!https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif|width=240!|!https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png|width=600!|
> h3. Details
> h4. Support to send messages from Weex to a html in component.
>  * Native:(W3c 
> [MessageEvent|https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent])
>  // Weex postMessage to web
>  * -(void)postMessage:(NSDictionary *)data
> Unknown macro: \{WXSDKInstance *instance = [WXSDKEngine topInstance]; 
> NSMutableString *bundleUrlOrigin = @""; if (instance.pageName) { NSString 
> *bundleUrl = [instance.scriptURL absoluteString]; NSURL *url = [NSURL 
> URLWithString:bundleUrl]; bundleUrlOrigin = [NSString 
> stringWithFormat:@"%@://%@%@", url.scheme, url.host, url.port ? [NSString 
> stringWithFormat:@":%@", url.port] : @""]; } NSDictionary *initDic = @\{ 
> @"type" : @"message", @"data" : data, @"origin" : bundleUrlOrigin }; NSString 
> *json = [WXUtility JSONString}
> ())", json];
>  [_jsContext evaluateScript:code];
>  }
>  * How to use:
>  // Weex
>  const webview = weex.requireModule('webview');
>  // recommend
>  this.$refs['wxc-web'].postMessage(\{ detail: "a message" });
>  //not recommend
>  //webview.postMessage(this.$refs.webview, \{detail:"a message"});
>   
>  // Web
>  window.addEventListener('message',function(e) \{ 
> console.log(e.data,e.type,e.origin); // \{ detail: "a message" }
> ,"message","*"
>  },false)
> h4. Support to send messages from a html in component to Weex.
>  * Native:(W3c 
> [MessageEvent|https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent])
>  
>   
>  //Weex catch postMessage event from web
>  _jsContext[@"postMessage"] = ^() {
>   
>  NSArray *args = [JSContext currentArguments];
>   
>  if (args && args.count < 2)
> { return; }
>   
>  

[jira] [Updated] (WEEX-233) More enhanced about component

2018-03-09 Thread TangWei (JIRA)

 [ 
https://issues.apache.org/jira/browse/WEEX-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

TangWei updated WEEX-233:
-
Component/s: Android

> More enhanced about  component
> ---
>
> Key: WEEX-233
> URL: https://issues.apache.org/jira/browse/WEEX-233
> Project: Weex
>  Issue Type: Improvement
>  Components: Android, iOS
>Reporter: TangWei
>Assignee: Adam Feng
>Priority: Major
>  Labels: features, newbie
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> ~0301 Modified version~
> ~0302 Modified version~
>  _0307 Modified version_
> Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss 
> the enhancements about component, let it take over where we can't implement 
> through weex.
> h2. Target
> {{}} is used to display web content that specified by src attribute in 
> weex page,We also can use webview module to control WebView behavior such as 
> goBack, goForward and reload.
> But it's not enough in most businesses,I think a more enhanced web component 
> should have the following:
>  * Support to send messages from Weex to a html in component.
>  * Support to send messages from a html in component to Weex.
>  * Support to render html source.
> Previously, component was an island that only rendered a remote url, but 
> enabled it to communicate through the context native to the webView. Then I'm 
> going to describe the solution that I came up with.
> h2. My solution
> h3. Code
>  * Weex iOS:
>  ** 
> [WXWebComponent.m|https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m]
>  ** 
> [WXWebComponent.h|https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.h]
>  ** 
> [WXWebViewModule.m|https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Module/WXWebViewModule.m]
>  * Weex Vue Demo:
>  ** [http://dotwe.org/vue/3576ed477d21dc020e63bf57dc414fff]
>  ** [Demo Bundle 
> JS|http://dotwe.org/raw/dist/3576ed477d21dc020e63bf57dc414fff.bundle.wx]
>  ** [Web End|http://h5.m.taobao.com/trip/wx-detection-demo/web.html]
> h3. 
> [Demo|https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif] && 
> [Theory|https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png]
> |!https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif|width=240!|!https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png|width=600!|
> h3. Details
> h4. Support to send messages from Weex to a html in component.
>  * Native:(W3c 
> [MessageEvent|https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent])
>  // Weex postMessage to web
>  * -(void)postMessage:(NSDictionary *)data
> Unknown macro: \{WXSDKInstance *instance = [WXSDKEngine topInstance]; 
> NSMutableString *bundleUrlOrigin = @""; if (instance.pageName) { NSString 
> *bundleUrl = [instance.scriptURL absoluteString]; NSURL *url = [NSURL 
> URLWithString:bundleUrl]; bundleUrlOrigin = [NSString 
> stringWithFormat:@"%@://%@%@", url.scheme, url.host, url.port ? [NSString 
> stringWithFormat:@":%@", url.port] : @""]; } NSDictionary *initDic = @\{ 
> @"type" : @"message", @"data" : data, @"origin" : bundleUrlOrigin }; NSString 
> *json = [WXUtility JSONString}
> ())", json];
>  [_jsContext evaluateScript:code];
>  }
>  * How to use:
>  // Weex
>  const webview = weex.requireModule('webview');
>  // recommend
>  this.$refs['wxc-web'].postMessage(\{ detail: "a message" });
>  //not recommend
>  //webview.postMessage(this.$refs.webview, \{detail:"a message"});
>   
>  // Web
>  window.addEventListener('message',function(e) \{ 
> console.log(e.data,e.type,e.origin); // \{ detail: "a message" }
> ,"message","*"
>  },false)
> h4. Support to send messages from a html in component to Weex.
>  * Native:(W3c 
> [MessageEvent|https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent])
>  
>   
>  //Weex catch postMessage event from web
>  _jsContext[@"postMessage"] = ^() {
>   
>  NSArray *args = [JSContext currentArguments];
>   
>  if (args && args.count < 2)
> { return; }
>   
>  NSDictionary *data = [args[0] toDictionary];
>  NSString *origin = [args[1] toString];
>   
>  if (data == nil) \{ return; }
>  
>  NSDictionary *initDic = @
> { @"type" : @"message", @"data" : data, @"origin" : origin }
> ;
>   
>  [weakSelf fireEvent:@"message" params:initDic];
>  };
>   
>  * How to use:
>  // Weex
>  
>   
>  onMessage (e) \{ console.log(e.data,e.type,e.origin); // \{ detail: "a 
> message" }
> ,"message","*"
>  },
>   
>  // Web iframe
>  window.parent.postMessage(\{ detail: "a message" }, '*');
> h4. Support to render html source.
>  * Native:
>  [_webview loadHTMLString:_source baseURL:nil];
>   
>  * How to use:
>  
> Welcome to put forward any suggestion about the 

[jira] [Commented] (WEEX-243) android more enhanced about component

2018-03-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WEEX-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16392551#comment-16392551
 ] 

ASF GitHub Bot commented on WEEX-243:
-

Github user misakuo commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/1058#discussion_r173385655
  
--- Diff: android/sdk/src/main/java/com/taobao/weex/ui/view/WXWebView.java 
---
@@ -230,7 +295,79 @@ public void onReceivedTitle(WebView view, String 
title) {
 }
 }
 
+@Override
--- End diff --

Can we use `addJavascriptInterface` or `console.log` as the communication 
channel? `window.prompt` has some known memory performance issues in the case 
of high frequency call


> android more enhanced about  component
> ---
>
> Key: WEEX-243
> URL: https://issues.apache.org/jira/browse/WEEX-243
> Project: Weex
>  Issue Type: Improvement
>  Components: Android
>Reporter: TangWei
>Assignee: zhengshihan
>Priority: Major
>
> Develop by fliggy 南麓
> More principles and apis can see here.
> [https://issues.apache.org/jira/projects/WEEX/issues/WEEX-233?filter=allopenissues]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)