AutomationPeer editor extension #332

Open
sloutsky wants to merge 1 commit from sloutsky/automationpeer-editor-extension into master
sloutsky commented 2021-12-27 02:55:24 -06:00 (Migrated from github.com)

Add extension to text editor that allows to inject automation peer that represents IntelliSense suggestion list and the currently selected suggestion - to allow screen narrators to read the suggestion.

Add extension to text editor that allows to inject automation peer that represents IntelliSense suggestion list and the currently selected suggestion - to allow screen narrators to read the suggestion.
siegfriedpammer commented 2021-12-27 06:50:27 -06:00 (Migrated from github.com)

Thank you very much for your pull request! The changes are looking good, just a few remarks:

  1. Can you please clean up the commits? 3 of the 4 commits in this pull request are not related to the actual change.
  2. Can you please rename/remove all references to "IntelliSense"... AvalonEdit uses the word "CodeCompletion", we want to prevent any confusion.

If you don't have time to apply these changes, I can do that for you once we merge this.

I will have to take a closer look and test how Narrator behaves now.

Thank you very much for your pull request! The changes are looking good, just a few remarks: 1) Can you please clean up the commits? 3 of the 4 commits in this pull request are not related to the actual change. 2) Can you please rename/remove all references to "IntelliSense"... AvalonEdit uses the word "CodeCompletion", we want to prevent any confusion. If you don't have time to apply these changes, I can do that for you once we merge this. I will have to take a closer look and test how Narrator behaves now.
sloutsky commented 2021-12-27 07:50:58 -06:00 (Migrated from github.com)

I have renamed the property. Now I need to figure how to get rid of the "bad commits"

I have renamed the property. Now I need to figure how to get rid of the "bad commits"
siegfriedpammer commented 2021-12-27 08:41:18 -06:00 (Migrated from github.com)

I normally use the gitk UI tool for this as it's more convenient and you don't have to remember commit hashes. Also the command-line instructions might not use the minimal amount of commands.

Assuming you are on the correct branch:

use git log to find the commit hashes of all the commits you want to keep.

If you want to merge the "Renaming property name" commit and the first commit into one, you can use steps in 4, otherwise just skip those.

  1. git reset --hard origin/master resets everything to the original state (this is a destructive action for all code that is not committed!)
  2. git pull --rebase https://github.com/icsharpcode/AvalonEdit.git master gets the latest code from our repo (if your origin/master already has the latest revision, you can omit this)
  3. git cherry-pick <commit-hash> for every commit you want to add
  4. If you want to merge two commits you can do (assuming HEAD points to commit-hash1 now):
  • git cherry-pick <commit-hash2>
  • git reset --mixed <commit-hash1>
  • git commit --amend
  1. git push --force to reset the pull request branch and remove the unwanted commits.

Hope this helps!

I normally use the `gitk` UI tool for this as it's more convenient and you don't have to remember commit hashes. Also the command-line instructions might not use the minimal amount of commands. Assuming you are on the correct branch: use `git log` to find the commit hashes of all the commits you want to keep. If you want to merge the "Renaming property name" commit and the first commit into one, you can use steps in 4, otherwise just skip those. 1) `git reset --hard origin/master` resets everything to the original state (this is a destructive action for all code that is not committed!) 2) `git pull --rebase https://github.com/icsharpcode/AvalonEdit.git master` gets the latest code from our repo (if your origin/master already has the latest revision, you can omit this) 3) `git cherry-pick <commit-hash>` for every commit you want to add 4) If you want to merge two commits you can do (assuming `HEAD` points to `commit-hash1` now): - `git cherry-pick <commit-hash2>` - `git reset --mixed <commit-hash1>` - `git commit --amend` 5) `git push --force` to reset the pull request branch and remove the unwanted commits. Hope this helps!
siegfriedpammer commented 2021-12-27 08:58:12 -06:00 (Migrated from github.com)

Looks like this didn't work out as expected. If you want, I can just clean it up manually before merge.

Looks like this didn't work out as expected. If you want, I can just clean it up manually before merge.
sloutsky commented 2021-12-27 08:59:07 -06:00 (Migrated from github.com)

Yep, indeed - it looks I've messed this up. If you can handle this upon merge - this would be great!

Yep, indeed - it looks I've messed this up. If you can handle this upon merge - this would be great!
siegfriedpammer commented 2021-12-28 15:04:34 -06:00 (Migrated from github.com)

Hmmm, it seems, this change currently does not provide a out-of-the-box solution for users of AvalonEdit. I would have expected Narrator to properly work out-of-the-box with how we currently use/instantiate the CompletionWindow in the sample application:

github.com/icsharpcode/AvalonEdit@395ef81668/ICSharpCode.AvalonEdit.Sample/Window1.xaml.cs (L124-L154)

Seems like I will have to dig around to get this to work properly like in VS. Thanks anyway for the starting point.

Hmmm, it seems, this change currently does not provide a out-of-the-box solution for users of AvalonEdit. I would have expected Narrator to properly work out-of-the-box with how we currently use/instantiate the `CompletionWindow` in the sample application: https://github.com/icsharpcode/AvalonEdit/blob/395ef8166870e2c6e1f63a7d97ac22e5e646e790/ICSharpCode.AvalonEdit.Sample/Window1.xaml.cs#L124-L154 Seems like I will have to dig around to get this to work properly like in VS. Thanks anyway for the starting point.
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'sloutsky/automationpeer-editor-extension:sloutsky/automationpeer-editor-extension'
git switch 'sloutsky/automationpeer-editor-extension'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'master'
git merge --no-ff 'sloutsky/automationpeer-editor-extension'
git switch 'sloutsky/automationpeer-editor-extension'
git rebase 'master'
git switch 'master'
git merge --ff-only 'sloutsky/automationpeer-editor-extension'
git switch 'sloutsky/automationpeer-editor-extension'
git rebase 'master'
git switch 'master'
git merge --no-ff 'sloutsky/automationpeer-editor-extension'
git switch 'master'
git merge --squash 'sloutsky/automationpeer-editor-extension'
git switch 'master'
git merge --ff-only 'sloutsky/automationpeer-editor-extension'
git switch 'master'
git merge 'sloutsky/automationpeer-editor-extension'
git push origin 'master'
Sign in to join this conversation.
No description provided.