Skip to content

Add dice provider to the urlbar - #386

Closed
masudataiki wants to merge 1 commit into
mozilla-firefox:mainfrom
doss-eeic:urlbar-quick-answer
Closed

masudataiki wants to merge 1 commit into
mozilla-firefox:mainfrom
doss-eeic:urlbar-quick-answer

Conversation

@masudataiki

@masudataiki masudataiki commented Oct 13, 2026 •

Copy link
Copy Markdown

概要

アドレスバーに dice と入力すると、候補一覧にサイコロの目(1〜6)を表示する機能を追加しました。
既存の電卓機能(UrlbarProviderCalculator)を手本にした、新しい「即答」プロバイダです。

変更したファイル

ファイル 内容
browser/components/urlbar/UrlbarProviderDice.sys.mjs 新規作成。サイコロ機能の本体
browser/components/urlbar/UrlbarProvidersManager.sys.mjs プロバイダ一覧に UrlbarProviderDice を登録
browser/components/urlbar/moz.build ビルド対象に新しいファイルを追加

動作確認の手順

前提

  • Firefox を一度ビルドできる環境があること(./mach build が通ること)

1. ブランチを取得する

git fetch origin
git switch urlbar-quick-answer

2. ビルドして起動する

新しいファイルを moz.build に追加したため、./mach build faster ではなく通常のビルドが必要です。

./mach build
./mach run -purgecaches

-purgecaches は、古いスクリプトのキャッシュを使わないようにするためのオプションです。

3. 確認する項目

# 操作 期待される結果
1 アドレスバーに dice と入力する 候補一覧に「Dice: 3」のような行が出る(数字は1〜6)
2 一度消して、もう一度 dice と入力する 数字が変わることがある(毎回ランダム)
3 Dice や DICE と入力する 1 と同じように表示される
4 dic や dice2 と入力する サイコロの行は出ない
5 サイコロの行を選択して Enter を押す 出た目の数字がクリップボードにコピーされる(どこかに貼り付けて確認)
6 2+3 と入力する 既存の電卓(= 5)がこれまでどおり動く

うまく動かないとき

  • Ctrl+Shift+J で「ブラウザーコンソール」を開き、赤いエラーが出ていないか確認してください。
  • 出ていたら、そのエラー文をこの PR にコメントしてください。

確認してくれた人へ

確認が済んだら、項目の番号ごとに OK / NG をこの PR にコメントしてもらえると助かります。


Lando: link

⚠️ This pull request has 3 warnings.
🚫 This pull request has 2 blockers.

@firefoxci-taskcluster

Copy link
Copy Markdown
No Taskcluster jobs started for this pull request

The allowPullRequests configuration for this repository (in .taskcluster.yml on the default branch) does not allow starting tasks for this pull request.

@lando-web
lando-web Bot requested review from a team October 13, 2026 06:36
@github-actions

Copy link
Copy Markdown
Contributor

(Automated Close) Please do not file pull requests here, see https://firefox-source-docs.mozilla.org/contributing/how_to_submit_a_patch.html

@lando-web

lando-web Bot commented Oct 13, 2026

Copy link
Copy Markdown

Warning

The following requested teams have no members: urlbar-reviewers

@github-actions github-actions Bot closed this Oct 13, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant