Closed nvlang closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Please upload report for BASE (
main@d2690cc
). Learn more about missing BASE report.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I think ?
for when the question is pending and ✔
for when it's done could make sense? And maybe making the question mark blue and the checkmark green? I had left it alone since it seemed like it'd be a matter of personal preference, but I'd be glad to try to add whatever default you'd prefer.
Also, I wholeheartedly agree about giving status
specific allowed strings — if I recall correctly, I had seen 'pending'
, 'loading'
, and 'done'
being used, but also 'idle'
in a unit test somewhere. I assume the first three should suffice, or would it make sense to include more statuses in your opinion?
Prefix, yeah blue/green question mark/check mark sounds good to me.
I think we can go with 3 status. I prefer idle
to pending
; so I'd normalize this way. (maybe you'll find a valid 4th one when running typecheck, so low risk of missing one.)
@SBoudrias I guess changing the default prefix means that we should also update the screenshots in the READMEs — however, I'm not sure what the setup / workflow there is (theme, font, etc.).
Thanks for the work you've put on that PR!
I went ahead a made a few adjustments before merging (just an FYI):
@inquirer/figures
for the tick; since I don't think there was a fallback on windows.prefix
from a function to a record.About the screenshots, they were first introduced in #625... Feel free to regenerate screenshot and document a reproducible process in the CONTRIBUTING.md doc! (not sure if the same will work out of the box today 😬 - it's from 2018)
This PR includes 5 commits:
.DS_Store
to.gitignore
for better DX on macOSstatus
tousePrefix
(instead ofisLoading
). Also updates references toisLoading
in README. This allows for behavior like the one described in #1537 to be implemented by the user.status
tostyle.message
function as a second argument. This allows for behavior like the one described in https://github.com/SBoudrias/Inquirer.js/issues/1537#issuecomment-2336762834 to be implemented by the user.Theme
type (via localDefaultTheme
type). This should improve IntelliSense.status
property passed tousePrefix
works as expected.What's missing is a unit test for the changes to
style.message
. However, I couldn't immediately find unit tests forstyle.message
to use as a template, and I didn't want to write one from scratch, since I'm not familiar with the setup. I tested the newstyle.message
functionality locally viacorepack yarn demo
, and there it seemed to work fine.Closes #1537.