Add a Copy button to the Diagnostics dialog

オープン 初心者向け
#2 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
html, javascript, rust, tauri

調査の方向性

ui/index.html の diagnostics-dialog のマークアップを、#diagnostics-save の隣にある .dialog-actions 内から確認し、次に ui/main.js の診断セクションにある保存クリックハンドラを確認してください。#diagnostics-text のテキストを対象に navigator.clipboard.writeText を呼び出し、成功または失敗を #diagnostics-message に書き込む #diagnostics-copy ボタンを追加します。コピーされたテキストがダイアログの内容と完全に一致し、確認またはエラーが表示され、cargo build --workspace が引き続き成功すれば完了です。

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

説明

enhancement good first issue

The Diagnostics dialog shows a report and has a Save to Documents button. When someone is filling in a bug report it is quicker to copy the text straight to the clipboard.

What to do

Add a Copy button next to Save to Documents that puts the report text on the clipboard and confirms it.

  • Markup: ui/index.html, in <dialog id="diagnostics-dialog">, inside .dialog-actions. Add a <button id="diagnostics-copy" type="button">Copy</button> next to #diagnostics-save.
  • Behaviour: ui/main.js, in the "diagnostics" section next to the #diagnostics-save click handler. Use navigator.clipboard.writeText(...) with the text already in #diagnostics-text, and write the outcome into #diagnostics-message (for example "Copied to the clipboard.").
  • If copying fails, show the reason in the same message line instead of failing silently.

No styling should be needed: buttons inside dialogs are already styled.

Done when

  • The button appears in the dialog and copies exactly the text shown.
  • A confirmation appears, and an error is shown if the clipboard is unavailable.
  • cargo build --workspace still passes (the UI is embedded in the app at build time).

How to try it

npm install, then npm run dev. Click Diagnostics at the bottom left of the window, press Copy, and paste somewhere.

主要言語
Rust
スター
7
フォーク
1
平均マージ
6時間 34分
マージ済み PR(30日)
2

環境構築

はじめの一歩

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

CodingRule/Hidely のほかの issue

CodingRule/Hidely の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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