Proposal: high-level message-list action API

オープン
#72 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
javascript
領域
api, frontend

調査の方向性

Start with the proposed MessageListAction API shape and the separately prepared prototype. Work through the six design questions with maintainers before defining implementation scope; done means the API boundary, lifecycle, state model, and message identifier path have an agreed direction.

索引モデルが issue の本文から書いたものです。

説明

Proposal: high-level message-list action API

Problem

Thunderbird WebExtensions can interact with messages through standard APIs and can add context-menu entries, toolbar/action buttons and message-display UI. There is currently no standard high-level entry point for an extension-owned action attached directly to each visible message row in the thread pane.

Some add-ons therefore use privileged Experiments to manipulate about:3pane DOM structures directly. That couples add-ons to Thunderbird internals and makes review and long-term compatibility difficult.

Proposed capability

Add a reusable MessageListAction Experiment draft that lets an extension:

  1. register one message-list action with a title and extension icon;
  2. provide ephemeral per-message presentation state (visible, enabled, active, optional title override);
  3. receive a WebExtension event when the user invokes the action;
  4. receive standard WebExtension message/tab objects rather than Thunderbird internals.

The implementation would own all thread-pane DOM integration. Extensions would not receive DOM nodes, gDBView, message headers, folder URIs or native message keys.

Example uses

  • follow-up / reminder extensions;
  • CRM or ticket-linking extensions;
  • bookmarking / triage tools;
  • task integrations;
  • custom message-state workflows.

Proposed shape

await browser.MessageListAction.register({
  title: "Track message",
  icons: {"16": "icons/track-16.svg", "32": "icons/track-32.svg"}
});

await browser.MessageListAction.setState(message.id, {
  active: true,
  title: "Stop tracking message"
});

browser.MessageListAction.onClicked.addListener((message, tab) => {
  // Extension business logic.
});

Additional methods proposed for discussion:

  • update(details)
  • unregister()
  • clearState(messageId)
  • clearAllStates()

Design principles

The API is deliberately high-level and narrow. It does not expose arbitrary message-list customization, custom columns, raw DOM injection, XUL, internal message keys, persistence, or application-specific concepts.

The Experiment owns lifecycle cleanup. Presentation state is ephemeral; persistent state remains the extension's responsibility.

Questions for maintainers

  1. Is a dedicated row action an acceptable stable UI primitive for the message list?
  2. Should the namespace follow an existing action API naming pattern instead of MessageListAction?
  3. Should the first draft support one action per extension or a collection of actions?
  4. Should state be push-based (setState) or requested lazily through an event/callback when rows render?
  5. Which message identifier/conversion path should the Experiment use so the public boundary remains aligned with the standard messages API?
  6. Should this be explored as a core API directly rather than maintained as a longer-lived Experiment?

Prototype

A minimal schema/sample/prototype implementation has been prepared separately. It intentionally keeps application logic outside the Experiment and can be reshaped based on this design discussion before a PR is opened.

主要言語
JavaScript
スター
33
フォーク
18
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

thunderbird/webext-experiments のほかの issue

thunderbird/webext-experiments の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。