fix(renderer): 未インストールのアンインストールを「完了」と言わない - #2481
Open
hal-shu-sato wants to merge 2 commits into
Open
Conversation
未インストールのパッケージを選んでアンインストールを押せてしまい、しかも main 側は成功を返す。パッケージ版で実測すると「アンインストール完了」と 出る — 何も消していないのに完了と報告している。#2456(一括インストールが 失敗を無視して「インストール完了」と出す)と同じ種類。 ボタンを無効化するのではなく説明を出す。このボタン群は「押したら理由を 言う」方式で揃っており(選択なし・インストール先未設定も同じ形)、無効化に すると理由を言う場所が無くなるため。 弾くのは notInstalled だけ。手動インストール済みは記録に無いだけで ファイルは在るので、消す操作に意味がある。
アンインストール後にもう一度押して、完了ではなく理由が出ることを見る。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
実際にアプリを操作して見つけたものです。
何が起きているか
未インストールのパッケージを選んでアンインストールを押せてしまい、しかも「アンインストール完了」と出ます。 何も消していないのに完了と報告しています。
パッケージ版で実測しました(ボタンの文言を 4 秒間ポーリング)。
main 側は成功を返すので、renderer はそれをそのまま「完了」として表示します。#2456(一括インストールが失敗を無視して「インストール完了」と出す)と同じ種類の問題です。
なぜ無効化ではなく文言なのか
このボタン群は**「押したら理由を言う」方式で揃っています。**
無効化に倒すと、この 2 つと一貫しなくなるうえ、理由を言う場所が無くなります(押せないボタンは何も説明しません)。同じ形で 1 つ足します。
弾くのは
notInstalledだけです手動インストール済みは「記録に無いだけでファイルは在る」状態なので、消す操作に意味があります。
otherInstalled(他バージョンが導入済み)も同様です。ここを一緒に弾くと、手動導入したものを apm から片付けられなくなります。検証
e2e/install.spec.tsの末尾に足しました。アンインストール後にもう一度押して、完了ではなく理由が出ることを見ます。Expected: "インストールされていません。"/Received: "アンインストール"で落ちる(3 秒で idle に戻るため)yarn lint/yarn lint:ts/yarn test(325 件)緑。yarn package→yarn test:e2e(7 件)緑。