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

Public get text action #2069

Merged
merged 29 commits into from
Dec 19, 2023
Merged

Public get text action #2069

merged 29 commits into from
Dec 19, 2023

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Nov 29, 2023

Fixes #452

Checklist

@AndreasArvidsson AndreasArvidsson changed the title Made public get text action Public get text action Nov 29, 2023
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

we should prob have api test for this, no?

@pokey
Copy link
Member

pokey commented Nov 30, 2023

Yes but I mean the talon-side api introduced by this PR. We have tests for our other talon-side APIs

@AndreasArvidsson
Copy link
Member Author

True. Test added.

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

Last minor comments

docs/user/customization.md Outdated Show resolved Hide resolved
cursorless-talon/src/actions/get_text.py Outdated Show resolved Hide resolved
cursorless-talon/src/actions/get_text.py Outdated Show resolved Hide resolved
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

made some changes:

  • Stopped using the public api for our internal impl. I'm not in love with coupling those
  • Switched no_decorations to silent. Double-negatives confuse me, so I prefer to avoid them if possible
  • I made all args to our function explicit. If we have the decorations flag reversed between talon api and cursorless api, the only way to make heads or tails I think is to just be super explicit and pass them every time

Feel free to merge if you're happy

@AndreasArvidsson
Copy link
Member Author

I'm not in love with the argument silent. It's much less descriptive than no_decorations.

@pokey
Copy link
Member

pokey commented Dec 19, 2023

I'm not in love with the argument silent. It's much less descriptive than no_decorations.

I agree. But I also really don't like double negatives (ie no_decorations = False). Any better ideas? Chatgpt suggests

  • omit_decorations
  • hide_decorations
  • suppress_decorations

cc/ @josharian

@AndreasArvidsson
Copy link
Member Author

I'm not in love with the argument silent. It's much less descriptive than no_decorations.

I agree. But I also really don't like double negatives (ie no_decorations = False). Any better ideas? Chatgpt suggests

* `omit_decorations`

* `hide_decorations`

* `suppress_decorations`

cc/ @josharian

hide_decorations sounds reasonable

@pokey
Copy link
Member

pokey commented Dec 19, 2023

Ok made some final tweaks and confirmed talon tests work locally. I'll give you a chance for a quick look in case I did anything dumb; merge if happy

@pokey pokey enabled auto-merge December 19, 2023 14:49
@pokey pokey added this pull request to the merge queue Dec 19, 2023
Merged via the queue into main with commit 7341d0f Dec 19, 2023
14 checks passed
@pokey pokey deleted the get_text_action branch December 19, 2023 15:04
cursorless-bot pushed a commit that referenced this pull request Dec 19, 2023
Fixes #452

## Checklist

- [x] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [x] I have updated the
[docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and
[cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
- [x] I have not broken the cheatsheet

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Pokey Rule <[email protected]>
thetomcraig-aya pushed a commit to thetomcraig/cursorless that referenced this pull request Mar 27, 2024
Fixes cursorless-dev#452

## Checklist

- [x] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [x] I have updated the
[docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and
[cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
- [x] I have not broken the cheatsheet

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Pokey Rule <[email protected]>
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.

Add get_text action to public cursorless api
2 participants