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

MiniApp Widget specification draft #11

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open

MiniApp Widget specification draft #11

wants to merge 40 commits into from

Conversation

lumanz
Copy link

@lumanz lumanz commented Jun 23, 2022

No description provided.

@netlify
Copy link

netlify bot commented Jun 24, 2022

Deploy Preview for miniapp-widget ready!

Name Link
🔨 Latest commit 98b8ff2
🔍 Latest deploy log https://app.netlify.com/sites/miniapp-widget/deploys/637ede5bfbb94c0008451e9d
😎 Deploy Preview https://deploy-preview-11--miniapp-widget.netlify.app/spec
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
lumanz and others added 10 commits June 27, 2022 11:06
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>
Copy link
Member

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.

Copy link

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.

spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
lumanz and others added 11 commits November 17, 2022 18:48
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>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<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>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<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>.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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>.

Copy link

@espinr espinr left a 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>
Copy link

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>
Copy link

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>
Copy link

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>
Copy link

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>
Copy link

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
Copy link

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
Copy link

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
Copy link

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>
Copy link

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>
Copy link

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

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

Successfully merging this pull request may close these issues.

None yet

5 participants