Web UI: ContextMenu args dialog carries the previous file's arguments into the next launch

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript
領域
frontend

調査の方向性

src/profiles/web/src/components/ContextMenu.tsxを読み、特にモーダルを開く経路、メニューを閉じる経路、引用された行付近のEnterハンドラーを確認してください。あるファイルの引数を入力してキャンセルし、別のファイルのダイアログを開いて再現します。指定された経路で引数をクリアし、2回目の起動で最初のファイルの入力が再利用されないことを確認してください。

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

説明

bug frontend

Problem

argsValue is a single state that is never reset (src/profiles/web/src/components/ContextMenu.tsx:64-65):

const [showArgsModal, setShowArgsModal] = useState(false);
const [argsValue, setArgsValue] = useState("");

The open path (ContextMenu.tsx:195, onClick={() => { setShowArgsModal(true); }}) and the menu close path never clear it. Type --verbose for file A, cancel, then "Launch with arguments…" on file B: the input still shows --verbose, and Enter (ContextMenu.tsx:444) launches B with A's arguments.

Suggested fix

setArgsValue("") in the item's onClick before setShowArgsModal(true), and in the menu's close path.

主要言語
Python
スター
1
フォーク
1
平均マージ
4時間 46分
マージ済み PR(30日)
55

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

falbany/ProFiles のほかの issue

falbany/ProFiles の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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