feat(kill-process): allow killing multiple processes#9185
feat(kill-process): allow killing multiple processes#9185pernielsentikaer merged 16 commits intoraycast:mainfrom
Conversation
|
Thank you for your contribution! 🎉 🔔 @rolandleth @crazyones110 @zhenpewu @Saafo you might want to have a look. |
clearSearchBar replaced with popToRoot after closeMainWindow
ccba3a2 to
0b2a4c4
Compare
| clearSearchBar({ forceScrollToTop: true }); | ||
| showHUD(`✅ Killed ${process.processName === "-" ? `process ${process.id}` : process.processName}`); | ||
| if (!multipleKills) { | ||
| closeMainWindow(); |
There was a problem hiding this comment.
regarding close main window, personally, I think it is not needed, but other reviewers might have different thoughts.
There was a problem hiding this comment.
I don't think it's needed either, for me it already closes it, so I think it just respects Raycast's settings.
But without this change, there's nothing the PR would add, so how would this preference work? And since for me it already closes it, this bit of code wouldn't do anything for me, so for others who have the same settings as me, this preference would seem broken.
There was a problem hiding this comment.
if we all agree it is not necessary to close window, I don't think multiple kills pref is needed, as there is no any diff between single and multiple kills.
the main change for this PR is to migrate from showHUD to showToast, as showHUD will close window directly, which would be annoying while kill multiple processes.
There was a problem hiding this comment.
Oh, I didn't know that showHUD is actually what's closing the window. In that case, allowMultipleKills doesn't make sense anymore, no? With showToast it will always leave the window open and you can do multiple kills.
What would make sense would be a "Close window after kill" preference, default to true, because most of the time/people need to kill one process and that's it.
There was a problem hiding this comment.
Yep, I've changed the preference to closeWindowAfterKill, with a default to true
There was a problem hiding this comment.
@pernielsentikaer Yup, that's what we're discussing here 😄
50376a0 to
d27d53d
Compare
|
That's some good feedback, so we're switching to a toast that doesn't close the window - we could have a preference for letting the user chose to close the window (which would do as today) and let them toggle it off to leave open? |
this should not change the behavior. the original code essentially gave a default of false in the extension code, but now it's set in the actual preferences
the search text is always defined as a string, so there's no need for an `undefined` state
|
I believe I've implemented the requested changes |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Hi 👋
Looks good to me, approved 🔥
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
pretty simple. it just adds a preference to not close the main window after killing a process
Screencast
CleanShot.2023-11-09.at.14.29.33.mp4
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder