Skip to content
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 "Toggle comment" key command #321

Merged
merged 96 commits into from
Feb 23, 2024
Merged

Add "Toggle comment" key command #321

merged 96 commits into from
Feb 23, 2024

Conversation

felixhabib
Copy link
Contributor

@felixhabib felixhabib commented Feb 13, 2024

Solving issue #295.

Adds keybinding Cmd + / (or, on Windows, Ctrl + /) to toggle comment syntax for the currently selected code.

NB: the additional cypress tests make GitHub actions take a fair bit longer, but will look to fix that in a follow-up PR.

Copy link

changeset-bot bot commented Feb 13, 2024

🦋 Changeset detected

Latest commit: b35c80e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
playroom Minor

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

@felixhabib felixhabib changed the title Add comment command Add "Toggle comment" key command Feb 20, 2024
@felixhabib felixhabib marked this pull request as ready for review February 20, 2024 03:13
@felixhabib felixhabib requested a review from a team as a code owner February 20, 2024 03:13
@felixhabib felixhabib marked this pull request as draft February 20, 2024 04:30
@felixhabib felixhabib marked this pull request as ready for review February 20, 2024 05:38
@felixhabib felixhabib marked this pull request as draft February 21, 2024 02:37
Copy link
Contributor

@askoufis askoufis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a high-level pass, will do a more detailed one when it's not in draft 😂

package.json Outdated Show resolved Hide resolved
.changeset/tender-spiders-compete.md Outdated Show resolved Hide resolved
felixhabib and others added 5 commits February 21, 2024 14:41
This reverts commit ce107c3.

# Conflicts:
#	package.json
Co-authored-by: Adam Skoufis <askoufis@users.noreply.github.com>
@felixhabib felixhabib marked this pull request as ready for review February 21, 2024 07:02
cypress/e2e/keymaps.cy.js Outdated Show resolved Hide resolved
Comment on lines +539 to +540
// Todo - (1/2) Solve issue where Ubuntu does not select to the start of line
// Todo - (2/2) with one trigger of the keybinding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this been addressed? Is this an ubuntu issue, or a broader linux issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hasn't been addressed. I'm not 100% sure who the culprit is but by default on the Ubuntu tests, the backwards selection goes up to the opening "//" (not including), whereas macOS selection goes to the very start of the line.

src/Playroom/CodeEditor/keymaps/comment.ts Outdated Show resolved Hide resolved
@felixhabib felixhabib merged commit c99cc30 into master Feb 23, 2024
6 checks passed
@felixhabib felixhabib deleted the comment-command branch February 23, 2024 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants