Skip to content

税金込み価格を計算する機能を実装 - #387

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

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

Conversation

@masudataiki

@masudataiki masudataiki commented Oct 13, 2026 •

Copy link
Copy Markdown

概要

アドレスバーに tax 数 と入力すると、税込み値段(消費税10%、小数点以下切り捨て)を表示する機能を追加しました。
既存の電卓機能(UrlbarProviderCalculator)を手本にした、新しい「即答」プロバイダです。

変更したファイル

ファイル 内容
browser/components/urlbar/UrlbarProviderTax.sys.mjs 新規作成。税込み計算機能の本体
browser/components/urlbar/UrlbarProvidersManager.sys.mjs プロバイダ一覧に UrlbarProviderTax を登録
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 アドレスバーに tax 100 と入力する 候補一覧に「税込み 110円」のような行が出る
2 Tax 100 や TAX 100 と入力する 1 と同じように表示される
3 taxi や taxes と入力する 計算の行は出ない
4 計算結果の行を選択して Enter を押す 数字がクリップボードにコピーされる(どこかに貼り付けて確認)
5 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.

@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

@github-actions github-actions Bot closed this Oct 13, 2026
@lando-web
lando-web Bot requested review from a team October 13, 2026 07:19
@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