-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLI shortcuts #9159
Add CLI shortcuts #9159
Conversation
🦋 Changeset detectedLatest commit: 2f596f9 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
What's the reasoning for the |
The Reading by character requires Reading by line is much simpler as we don't hijack the shortcuts, but it requires a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lovely addition!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want @FredKSchott to review
5657927
to
6a0a5d5
Compare
Okay I took a pass and cleaned up the formatting a bit. Unfortunately I'm not seeing the shortcuts logged automatically, the messages have to be manually triggered with I don't love that we have to parse each message to reformat them. Ideally Vite could return the resolved shortcuts (default + custom - disabled) from |
ICYMI there was also a discussion about it at #9159 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs approves the changeset!
Would suggest a PR adding these three commands here in docs: https://docs.astro.build/en/reference/cli-reference/#astro-dev
@bluwy can you give an update on where this PR is, in regards to the things that prevented it from coming out in 4.0? My fuzzy recollection is that we didn't merge it because:
Were those the other two reasons? (2) is no longer relevant, did (1) happen? |
Yeah I think no1 is the main one. Nate made some commits to the formatting recently and volunteered to take on it on standup today, so perhaps once that's settled, we can have Fred to take another look again. Once the formatting is resolved, it should be ready. |
FYI this is unblocked by me assuming that there is no change to the startup UI! Essentially, merged as an easter-egg for now. For the startup UI changes, I'd like to pair / work 1:1 with someone to design and then add some sort of help message to startup. @matthewp you can either have someone grab time with me on my calendar, or just assign me a Linear ticket, I'd be happy with either path. |
The easter egg idea was ok when it was in order to get it out before 4.0, but now we don't have that time pressure so let's do it the right way and design the UI. |
I've went ahead and cleanup the PR based on an internal discussion in team-platform. We decided to keep this as an easter egg as we want to add more helpful shortcuts, and the current list is a little short. We may also implement showing "tips" in the CLI that may reveal this feature in the future. @sarah11918 from your approval comment, since we're keeping this as an easter egg, I think we want to hold off documenting it for now. |
@bluwy Yup, approval still stands, and changeset looks great! 🫡 |
We've talked about it!
Changes
Adds CLI shortcuts as an easter egg for the dev server. (Updated image)
I didn't add for the preview server because adapters can implement they're own preview servers, and I don't want to indirectly raise the bar for adapters to also implement shortcuts because of user expectations
Testing
Tested manually (as in the screenshot)
Docs
n/a. We're merging this as an easter egg, so I don't think we should document this in the next minor blog or highlight this in the docs for example.