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

Enter selected text into Scribe #485

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

Jag-Marcel
Copy link
Member

@Jag-Marcel Jag-Marcel commented Aug 3, 2024

Contributor checklist


Description

These are changes to the behaviour of the Scribe key when text in the text field is selected. Currently, it only shows you annotations for the selected word (i.e. "N" for neuter words). Here, I changed it so the selected Scribe command's action is executed on the highlighted text.

Before

Screenshot 2024-08-03 at 12 48 26

After (after pressing "Plural" in the command bar)

image

We also considered an option where the text would simply be entered into the command bar's text field, but decided against it:
Screenshot 2024-08-03 at 13 04 27

Related issues

Copy link

github-actions bot commented Aug 3, 2024

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and iOS rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

  • The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution

    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local Scribe-iOS repo
  • The linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis andrewtavis self-requested a review August 3, 2024 14:17
@andrewtavis
Copy link
Member

A few things to consider here, @Jag-Marcel:

  • What happens if the word isn't the last one in the proxy?
    • Do we replace the word where the other one is
  • We also need to make sure that we're not including a space at the end of such commands that might cause an inadvertent double space for the user
    • Maybe we can check to see if there is a space after the word already so that we only add a space if there isn't one already 🤔

This is amazing! Thank you! 🚀

@andrewtavis
Copy link
Member

Talking about it in the sync: The general thinking is that the command should be directly ran :)

@andrewtavis
Copy link
Member

This is ready for a file review at this point, right @Jag-Marcel? :)

@Jag-Marcel
Copy link
Member Author

Jag-Marcel commented Aug 11, 2024

This is ready for a file review at this point, right @Jag-Marcel? :)

Not yet, I still haven't changed the behaviour with the commands

Commands are now executed on the highlighted text immediately instead of being entered into the command bar's text field for the command.
i.e. it now shows "Not in Wikidata" and "Already plural" messages as it's supposed to
@Jag-Marcel
Copy link
Member Author

Ready to review now, @andrewtavis! I also edited the description of the PR to match.

@andrewtavis
Copy link
Member

Fantastic, @Jag-Marcel! Will get to this soon :) Working on getting emojis for the English keyboard via implementing it in Scribe-Data, and then the translations :)

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

Really amazing work here, @Jag-Marcel! 😊 Thanks so much for putting so much care into this issue! Really has turned out wonderfully, and using it even in testing was really fun :D

@andrewtavis andrewtavis merged commit f9b1c9f into scribe-org:main Aug 12, 2024
1 check passed
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.

2 participants