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
MiniApp Widget specification draft #11
base: main
Are you sure you want to change the base?
Conversation
update spec to use respec
✅ Deploy Preview for miniapp-widget ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
fix some issues in spec doc
|
||
<section id='terminology'> | ||
<h3> | ||
<span its-locale-filter-list="en" lang="en">Terminology</span> |
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 would suggest that we link to https://www.w3.org/TR/miniapp-packaging/#sec-terminology directly instead of defining the same terms here. Otherwise, we are maintaining two glossaries and synchronizing the definitions on both sides.
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.
+1. I will update the terms in Packaging if needed.
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
add the relationship with other MiniApp specs
|
||
<p its-locale-filter-list="zh-hans" lang="zh-hans">本标准的内容符合MiniApp Manifest、Packaging、Lifecycle和Addressing的标准要求,除此之外,还规定了MiniApp特有的生命周期事件,以及MiniApp widget与MiniApp或与宿主环境间进行互动交流的要求。</p> | ||
|
||
<p its-locale-filter-list="en" lang="en">This specification follows the specifications of MiniApp Manifest, Packaging, Lifecycle and Addressing. In addition, it defines the unique life cycle events of MiniApp and the requirements for the interaction between MiniApp widget and MiniApp or with the host environment.</p> |
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.
<p its-locale-filter-list="en" lang="en">This specification follows the specifications of MiniApp Manifest, Packaging, Lifecycle and Addressing. In addition, it defines the unique life cycle events of MiniApp and the requirements for the interaction between MiniApp widget and MiniApp or with the host environment.</p> | |
<p its-locale-filter-list="en" lang="en">This specification follows the specifications of MiniApp Manifest, Packaging, Lifecycle and Addressing. In addition, it defines the unique lifecycle events of MiniApp and the requirements for the interaction between MiniApp widget and MiniApp or with the host environment.</p> |
@@ -237,10 +244,10 @@ <h2> | |||
|
|||
<p its-locale-filter-list="zh-hans" lang="zh-hans">MiniApp widget 沿用 MiniApp page的<a href="https://w3c.github.io/miniapp-lifecycle/#pagestate-enum">PageState enum</a> | |||
和<a href="https://w3c.github.io/miniapp-lifecycle/#miniapp-page-lifecycle-interface-and-callbacks"> 生命周期接口及回调</a>, | |||
MiniApp widget 增加了 update 生命周期事件,具体描述在 6.4 MiniApp widget 更新过程处理。</p> | |||
MiniApp widget 增加了 update 生命周期事件,具体描述在 5.4 MiniApp widget 更新过程处理。</p> |
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.
MiniApp widget 增加了 update 生命周期事件,具体描述在 5.4 MiniApp widget 更新过程处理。</p> | |
MiniApp widget 增加了 update 生命周期事件,具体描述在[[[#update-process]]]处理。</p> |
<p its-locale-filter-list="en" lang="en">MiniApp widget follows the <a href="https://w3c.github.io/miniapp-lifecycle/#pagestate-enum">PageState enum</a> | ||
and <a href="https://w3c.github.io/miniapp-lifecycle/#miniapp-page-lifecycle-interface-and-callbacks">lifecycle | ||
interfaces and callbacks</a> of MiniApp page. The MiniApp widget adds the update lifecycle event, which is described in 6.4.</p> | ||
interfaces and callbacks</a> of MiniApp page. The MiniApp widget adds the update lifecycle event, which is described in 5.4.</p> |
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.
interfaces and callbacks</a> of MiniApp page. The MiniApp widget adds the update lifecycle event, which is described in 5.4.</p> | |
interfaces and callbacks</a> of MiniApp page. The MiniApp widget adds the update lifecycle event, which is described in [[[#update-process]]].</p> |
@@ -594,7 +601,7 @@ <h4> | |||
</h4> | |||
|
|||
<p its-locale-filter-list="zh-hans" lang="zh-hans">一些MiniApp Widget 的 UI components和API 可以通过属性和参数对文件进行访问,例如image 组件的的 src 属性:</p> | |||
<p its-locale-filter-list="en" lang="en">MiniApp Widget and MiniApp page can access files through the src attribute of the tag and the File API,Example of tag src attribute:</p> | |||
<p its-locale-filter-list="en" lang="en">UI components and API of some MiniApp widget can access files through properties and parameters, such as the src property of the image component:</p> |
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.
<p its-locale-filter-list="en" lang="en">UI components and API of some MiniApp widget can access files through properties and parameters, such as the src property of the image component:</p> | |
<p its-locale-filter-list="en" lang="en">UI components and API of some MiniApp widgets can access files through properties and parameters, such as the `src` attribute of the `image` component:</p> |
<body> | ||
<section id='abstract'> | ||
<p its-locale-filter-list="en" lang="en"> | ||
The MiniApp Widget is a special form of <a href="https://www.w3.org/TR/miniapp-packaging/#dfn-page">MiniApp Page</a>. |
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.
The MiniApp Widget is a special form of <a href="https://www.w3.org/TR/miniapp-packaging/#dfn-page">MiniApp Page</a>. | |
MiniApp Widget is a special form of <a href="https://www.w3.org/TR/miniapp-packaging/#dfn-page">MiniApp Page</a>. |
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.
Please, find some editorial suggestions.
<p its-locale-filter-list="en" lang="en">MiniApp widget is a special form of MiniApp page. Unlike pages, widgets can use only part of the screen (rather than all of | ||
it) and are used to display key information to the user and respond to simple | ||
user actions, such as displaying the weather at the user's location, tracking | ||
user's current travel status and providing next actions .</p> |
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.
Suggestion: remove blank space before the period:
next actions .</p>
|
||
<section id='terminology'> | ||
<h3> | ||
<span its-locale-filter-list="en" lang="en">Terminology</span> |
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.
+1. I will update the terms in Packaging if needed.
<p its-locale-filter-list="zh-hans" lang="zh-hans">与 MiniApp page 类似,定位 MiniApp widget 及 Widget 中的资源的过程符合 <a | ||
href="https://w3c.github.io/miniapp-addressing/">Miniapp Addressing</a> 定义的标准。</p> | ||
<p its-locale-filter-list="en" lang="en">Similar to MiniApp page, the process of locating widget and the resources in it complies with the specification defined | ||
by <a href="https://w3c.github.io/miniapp-addressing/">Miniapp Addressing</a>.</p> |
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.
Suggestion: https://www.w3.org/TR/miniapp-addressing/ instead of github.io.
|
||
<p its-locale-filter-list="zh-hans" lang="zh-hans">与 page 不同的是, MiniApp widget 并不存在 start widget。因此,指定某一个 MiniApp widget 需要显式说明 Widget 的 path,如下例所示:</p> | ||
<p its-locale-filter-list="en" lang="en">Unlike MiniApp pages, there is no start widget for a MiniApp widget. Therefore, specifying a MiniApp widget needs to | ||
specify the path of the widget explicitly, as shown in Example:</p> |
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.
Suggestion: as shown in the following example:
</h2> | ||
|
||
<p its-locale-filter-list="zh-hans" lang="zh-hans">包含 Widget 的 MiniApp 包结构符合如下要求:</p> | ||
<p its-locale-filter-list="en" lang="en">The structure of MiniApp package containing a Widget should meets the following requirements:</p> |
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.
Suggestion:
The structure of **the** MiniApp package containing a Widget **SHOULD meet** the following requirements:
|
||
<p its-locale-filter-list="zh-hans" lang="zh-hans">User agent 可以在不重新创建 Widget 环境的情况下更新 widget 的内容,这种情况常应用于 Widget 的 Host environment 与 Widget 有强交互的情况, | ||
例如,在商品搜索结果页显示一个商品 widget 时,用户点击另一个商品,该 Widget 的内容将被更新为新商品的。</p> | ||
<p its-locale-filter-list="en" lang="en">User agent can update the content of the |
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.
Suggestion: A user agent
<p its-locale-filter-list="zh-hans" lang="zh-hans">User agent 可以在不重新创建 Widget 环境的情况下更新 widget 的内容,这种情况常应用于 Widget 的 Host environment 与 Widget 有强交互的情况, | ||
例如,在商品搜索结果页显示一个商品 widget 时,用户点击另一个商品,该 Widget 的内容将被更新为新商品的。</p> | ||
<p its-locale-filter-list="en" lang="en">User agent can update the content of the | ||
widget without recreating the widget environment. This often happens where the |
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.
Suggestion: This often happens when the
<p its-locale-filter-list="en" lang="en">User agent can update the content of the | ||
widget without recreating the widget environment. This often happens where the | ||
widget host environment has strong interaction with the widget. For example, | ||
when a product widget is displayed on search resualts page, user clicks on |
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.
Suggestion: the search results page
|
||
<ul its-locale-filter-list="en" lang="en"> | ||
<li>Keeping the same login in state in widget when already logged in in MiniApp. </li> | ||
<li>Widget gets playback status and display playback control when MiniApp is playing music. </li> |
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.
Suggestion: and displays
</ul> | ||
|
||
<p its-locale-filter-list="zh-hans" lang="zh-hans">针对不同类型的文件,可以采用多种URL形式来指定。</p> | ||
<p its-locale-filter-list="en" lang="en">For different types of files, multiple URL forms cpuld be used.</p> |
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.
Suggestion: could (or MAY) be used
No description provided.