Word navigation not working with screen reader

From @robgallo
Depending on which edit control is being used, the problem is either in UIAutomations’s Text pattern implementation or IAccessible2’s IAccessibleText implementation. Either way, the text returned for the word at the carat position is incorrect.
Here are the basic rules:
The text of words returned by the accessibility API must match keyboard word navigation (ctrl+leftArrow and ctrl+rightArrow) exactly.
The behavior of ctrl+leftArrow and ctrl+rightArrow must be symmetrical (i.e., the word breaks must not change regardless which command is used).
The placement of the carat should never be on white space, except at the end of a line
Word navigation should stop at all punctuation marks
Here is a line from a file I’m working in. I started at the beginning of the line and I placed vertical bars (|) where the ctrl+rightArrow stops.
import| {| NamedSFC| }| from| '../../|common|/react|/named|-sfc|';|
based on this, the words returned by the accessibility API should be:
“import”
“ {”
“ NamedSFC”
“ }”
“ from”
“ '../../”
“common”
“/react”
“/named”
“-sfc”
“';”
If this doesn’t look right to you, good. The places where the keyboard stops, and thus what is considered a word, make no sense. And as a coder myself, I find these word breaks not useful because I am often placed on space characters. That would be a problem even if I weren’t using an access technology.
I would arrange the words in the line this way:
“import “
“{ “
“NamedSFC “
“} “
“from “
“'”
“..”
“/”
“..”
“/”
“common”
“/”
“react”
“/”
“named”
“-“
“sfc”
“'”
“;”
Visual studio breaks up the line this way, which is also acceptable:
“import “
{ “
NamedSFC “
“} “
“from “
“'../../”
“common”
“/”
“react”
“/”
“named”
“-“
“sfc”
“’;”
Furthermore, the behavior of ctrl+leftArrow and ctrl+rightArrow in VSCode is not symmetrical. For example, here are the word breaks starting from the left and moving right:
from| ‘../../|common
Here are the line breaks for the fragment starting at the end and moving to the left.
from |‘../../|common
Notice the positioning of the line break between “from” and “’” has changed. That is disorienting.

@robgallo thanks a lot for providing feedback.
I just tried this and could not reproduce the exact behavior you are seeing.
Do you have "editor.accessibilitySupport": "on" turned on in your settings?
What I am seeing is that ctrl + left and ctrl + right are symetrical. They do not navigate
Please note that you can configure between two word navigation behaviors, we have
cursorWordAccessibilityRight and cursorWordRight. You can navigate between what to use by simple disabling keybinding assigned to them in the File > Preferences > Keyboard Shortcuts menu.
When we detect that a screen reader is used on Windows we automatically switch to an "accessible" way of navigating words. The reason we do that is becuase NVDA expects that words get navigated in a way Chrome navigates them (because VS Code is detected as a Chrome app). So when we detect the Screen Reader cursorWordAccessibilityRight takes precendece over the regular cursorWordRight.
We first have to check if any of those navigation commands work for you.
Since the cursorWordAccessibilityRight works for all our NVDA users, however it might not be good for JAWS.
Thus I would like if you experiment with both. And if none work we can look into introducing a different one. I would just have to check if we can detect what screen reader is attached to distinguish between Jaws and NVDA.
Same what I just said for cursorWordAccessibilityRight also holds for following commands:

cursorWordAccessibilityLeft -  cursorWordLeft
cursorWordAccessibilityLeftSelect -  cursorWordLeftSelect
cursorWordAccessibilityRightSelect -  cursorWordRightSelect

Once you try this out let us know and we can works on a PR that will improve this.
Thanks!
fyi @neuronne @derekriemer

@isidorn
I'd like to challenge your assertion that, "...the cursorWordAccessibilityRight works for all our NVDA users..." The text editing in VSCode does not behave like any other editor I have used on Windows. If there is a screen reader user out there who finds this behavior satisfactory, I'd like for them to please chime in to this conversation so I can understand what they expect from the next and prior word commands.
NVDA and JAWS work identically in the code I tested; so there does not appear to be much difference between the screen readers.
editor.accessibilitySupport was set to auto, And I can tell that the screen reader is being detected by VSCode. Even still, I change the setting to "on". No change.
I also disabled editor.accessibilitySupport to see if the default navigation worked better, but I found them to be basically the same.
"...but navigate the only way that NVDA properly reads the whole line..."
What is the relevance of the line here?
VSCode does seem to be providing the expected text at word boundaries from IAccessibleText.textAtOffset based on cursor navigation most of the time. The problem is that the cursor boundaries themselves are largely unexpected. As I mentioned in my original message, the cursor needs to stop at each punctuation mark when moving by character. Check out Visual Studio to see what it does.
Here are two specific suggestions to get started:

When the cursor stops on white space, the textAtOffset() function should return only white space.
You can see this problem by moving the cursor to the end of any line. NVDA will announce the previous word boundary, not the white space.

When navigating by word, two consecutive white space characters should always be skipped, even if the two characters are different.
You can see this problem if you move to the end of a line of text which is followed by a blank line, then more text. The cursor will land on the blank line, and that should never happen.

Lastly, my original message is part of this conversation, but as an image. Any other screen reader user who wants to read it, can't.

@RobGallo first of all sorry for the slow reponse and thanks for your reply.

Disabling editor.accessibilitySupport should change how word navigation behaves.. Are you not seeing any difference at all, or simple both do not work for you?
"Relevance of the line": I mistyped, what I tried to say is the only way for NVDA to properly read each word on the line when navigating word by word.
We are not implementing the textAtOffset() function, since VS Code is built on top of Electron which is built on top of Chromium we can not control this.
We can fine tune the cursor navigation. However this is very user dependent, what you are saying I think does not make sense for 100% of our users. What we would have to do is introduce a third cursor navigation style. If that navigation style works good for NVDA then we can consider replacing the accessibility navigation commands with that. Here's a code pointer in case you might be interested in providing a PR https://github.com/microsoft/vscode/blob/33e78e0978b032d6cddef69bcc650a1d488d7297/src/vs/editor/contrib/wordOperations/wordOperations.ts#L193

I appologize for the image in the orginal message, I made the mistake of Copying from Outlook who pastes it as the image. I have fixed the original message to be test.

In my experience it was reading more than it should. when I would navigate word by word I would hear parts of next line when being at the end of the previous line, if I remember correctly.

Neither cursor mode worked for me.
Isidor, more than half the problem is in TextAtOffset. It may be in Chromium, but if we can’t fix it, the experience is just going to continue to be poor.
You said, “this is very user dependent, what you are saying I think does not make sense for 100% of our users.” Visual Studio has had the keyboard behavior I described for 20 years. Most Windows applications have this keyboard behavior. Given these two facts, I don’t think you can successfully make an argument that what I’ve described is not more effective than the current behavior.

I am having similar issues. Going to start here.  Word navigation with C++ will be i.e. foo->. Navigating over a function will repeat the whole function back as a word multiple times, i.e. foo() { and seems to sometimes not be moving through it.  Sometimes move by word includes the next line.  Sometimes selecting when moving by word selects parts of the next line.
The net result is I spend a lot of time second guessing word navigation and making sure it did what I want it to have done.  Additionally this issue explains why configuring word separators doesn't take effect, I believe (which was the first thing I tried).
Will try the above suggestions.

Firstly I'm on NVDA. Should have said.
I tried the above on the line
void MemoryLookaheadStream::reset() {

and it's actually kind of hard to tell what's going on.  Selection announcement is always accurate in the sense that it's not reporting things that aren't selected, but definitely acts surprising.  Disabling the accessibility versions of selection fixes selection to be roughly what I'd expect, and still lets NVDA announce correctly.
Disabling the accessible versions of word navigation however doesn't fix word navigation.  It fixes word navigation to do what it should but the announcement of the current word is massively incorrect.
Even with the accessible version of word navigation, the following code snippet is broken:
	this->recording = false;
}

as "false;\n}" is reported as a word 3 times as opposed to as separate entities.
Perhaps someone knows if/how hard it'd be to get the NVDA side of things playing nice here, because I'm not sure that this can be fixed in VSCode itself either, and it'd be really amazing to have this working.  There's small ergonomics issues beyond this but even with this bug VSCode is enough of a good value proposition that I'm using it.

@camlorn first of all thanks a lot for your feedback and sorry fo the slow response.
We can fine tune the word navigation in VS Code however we want. However that will probalby not fix the overall issue. The problem is how NVDA expectes word navgiation is done in Chrome.
I am open to changing the word navigatino in whatever way we think is best
@leonardder this is actually the biggest NVDA - VS Code issue which we would love to fix the most.
@jvesouza @ajborka are you happy with Word Navigation using Orca? Can you give it a spin and provide feedback so we try to get to a concensus here.

Strange enough, I"m unable to reproduce this with a11y mode on. It looks like things have improved lately, is this true?
The following example:
int cheese = 3; // Comment
Reads the following, as expected to where the cursor is positioned:

int
cheese =
3; //
Comment

@isidorn , word navigation in the editor works according to the standard Linux conventions. So, looks like everything is good to go here.

The Linux conventions do not work well at all for screen reader users, which after all, is the point of the bug.
The text as given above is not an acceptable experience for blind and low vision users. I reiterate: the punctuation is not part of the word; The cursor should only land on white space at the end of a word when the white space is a line break.
One way you can tell the spoken text with navigation is poor (and there is more than one way) is by deleting a word using ctrl + delete. While I haven’t made an exhaustive study of the behavior, I know for certain there are cases where the text deleted by ctrl + delete and word navigation is different. That is by definition astonishing. Those word boundaries should be exactly the same.
The bug cannot be resolved without a change to the IAccessibleText support in Chromium. It may not be the responsibility of the VS Code team to fix it. But without that change, editing support for screen reader users is poor.
From: Andy Borka<EMAIL_ADDRESS>Sent: Thursday, March 12, 2020 8:32 AM
To: microsoft/vscode<EMAIL_ADDRESS>Cc: Rob Gallo<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [microsoft/vscode] Word navigation not working with screen reader (#90578)
@isidornhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fisidorn&data=02|01|rob.gallo%40microsoft.com|d3a58c8e6e8e4ba09dc708d7c6815293|72f988bf86f141af91ab2d7cd011db47|1|0|637196131041959559&sdata=ZFChLUX09ogI82P4rSFH1U8o6vX6tXhecl8WYd4qOm8%3D&reserved=0 , word navigation in the editor works according to the standard Linux conventions. So, looks like everything is good to go here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode%2Fissues%2F90578%23issuecomment-598160001&data=02|01|rob.gallo%40microsoft.com|d3a58c8e6e8e4ba09dc708d7c6815293|72f988bf86f141af91ab2d7cd011db47|1|0|637196131041969554&sdata=5H1UeEo%2F9tZ98hTTX%2B3xkpUwxBgu%2FnpkXFIua2hliKY%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKIVSS6GSROXIIE6QCDL7JTRHDI27ANCNFSM4KUOLNJA&data=02|01|rob.gallo%40microsoft.com|d3a58c8e6e8e4ba09dc708d7c6815293|72f988bf86f141af91ab2d7cd011db47|1|0|637196131041979551&sdata=NACf7KxYhyRJ98jPL8G9GAPZgZmu7C2xjineJOwZTfE%3D&reserved=0.

@isidorn , @RobGallo , If I take the following text:
int x=1
Try to navigate it by word, I end up with the following results: Starting at the beginning of the line, and pressing ctrl+right arrow, Orca speaks the word it crosses: 'int'. When checking cursor position, it is located after the last character in the word 'int'. Further presses of ctrl+right arrow results in 'x=1' being spoken as a single word where the curser is placed after the number 1. Testing Orca in other environments such as Libre Office Writer, Pluma, Mate terminal, and others, navigation by word works as expected: Orca speaks the word and places the curser at the beginning of the word. Your answer seems correct then, that it is a Chromium/Chrome bug that Google needs to fix. Maybe @joanmarie can help since she has connections to the Chromium developers.

I know some of the following is known, but I think it's useful to explain this long form for anyone who isn't following some of this, so apologies to anyone who's already on the same page:
@leonardder's example is going to work.  But try it on int foo() and I think it's noticeable for everyone.
I am in agreement with everyone else: the issue is almost certainly not a VSCode problem.  The described Chrome issue would explain it, since from the screen reader perspective the algorithm is "ask the text control for the current word", and the text control (1) comes from Chromium and (2) has an entirely different idea of word.
Even if this is declared fixed as-is, it doesn't respect custom word separators.  It would be ideal if it was possible to have those be respected, because sometimes words are too big for lack of a better way of putting it, where the last step of getting your cursor to the part of the line of code you want to edit either means way overshooting or way undershooting and arrowing (if I recalled, for instance, I tried adding _ to my word separators).  I know there's also navigation by word part, which might be useful, and though I haven't tried it I am almost sure that it probably leads to this bug.
I think it's possible for there to be a minimal definition of fixed that is something to the effect of we understand the behavior, but VSCode provides a lot of customization here and just what a meaningful word is changes language to language and person to person.  I, for example, consider it ideal if foo() is actually foo ( ) or foo( ) because it's a special case of an empty argument list and between the parens is a very useful stopping point.
Unfortunately I think this ends at screen reader scripting perhaps with VSCode-side annotations on the DOM element via custom attributes to expose the settings, which on the whole I'd be personally fine with, because otherwise we'd need something new in Aria or one of the upcoming accessible object model specs.  Unfortunately I don't know enough about NVDA to do the add-on (not to mention all the others) and it's possible we don't have access to custom HTML attributes anyway, so I will leave further discussion along those lines to others.

So in the case of Orca, there are multiple things taking place, one of which I will definitely fix in Orca, and two of which will potentially need to be addressed in Chromium.
Taking the "int x=1" case:

It is Orca that is combining "x=1" into a single word. I will fix that in Orca.

When I get the words via AtkText/AtspiText, Chromium says these are the words:

"int "
"x="
"1"

The fix I will make in Orca to stop the combining of "x=1" into a single word will be "always trust the word reported by Chromium". Thus Orca will treat "x=" as a single word -- in Browse mode. If that is bad, then let's file a bug against Chromium and explain why it is bad and fix it there.

Here's what happens when I load the following test case data:text/html,<div contenteditable>int x=1</div> (i.e. in Chromium's omnibox/location bar) and press Ctrl+Right. I move:

After the "t" but before the space in "int"
Between the "x" and the "="
After the "1"

This is potentially relevant to VSCode -- assuming VSCode does not provide its own caret navigation (does it?).
When Orca users are using VSCode, they should be in Focus mode. In Focus mode, Orca does NOT control the caret. It turns that over to the web app and browser and then tries to present something sane in response to the accessibility events it gets (here, object:text-caret-moved). In other words, if VSCode does not control what happens when Ctrl+Right is used, the Orca user (and I assume all users) will move to the positions I stated above.

@joanmarie yes VS Code provides its own caret navigation. In short we have a highly customised word navigation based on user feedback and we have a second word navigation which we switch to when we detect a Screen Reader to be more aligned with what screen readers expectes from Chrome.
We can customise this other word navigation in any way we want to make the screen reader experience good.
I just designed this other caret navigation to behave as close as possible to what Chrome does in input boxes. Also there were some community PRs that tried to improve this.

@isidorn
just out of curiosity, does the claim that VSCode provides its own caret apply also when we are editing?
Thanks.

@jvesouza our carret navigation is applied in all editors we use in VS Code. So yes also in the main editor where you are doing editing.
If that does not answer your question can you be more precise?

Hello all,
since this is the first time I interact with the VS code team, I would like to thank you for your great efforts to provide such an accessible advanced code editor! Personally, this has transformed the way I code, and made it significantly more easier and enjoyable. And I think this also seems to be the case with other blind devs, so, in short, thanks for this very important work you did and still doing.
I very much agree that word navigation is one of the most significant few accessibility issues when using code. So, for me, giving it a top priority is a good idea.
I think also that this problem is caused by the way Chromium implements word navigation, I tested with Narrator, and it also has the same exact issue that NVDA has for me when navigating by word in the code editor.
Here is the issue I am facing in steps to reproduce format:

Open VS code and run NVDA.
Type the following lines in to the code editor:
int x = 1;
// This is a comment
Place the cursor at the beginning of the first line and navigate by word til the cursor reaches the start of the word "this".

Expected behavior:
NVDA reads the words as it does in other text editors.
Actual behavior:
NVDA reads the following:
int
x =
1;//
1;//
This
Note that NVDA reads the beginning of the second line when the cursor is still present in the first one.
Narrator also has the exact same issue, which leads to the conclusion that this is a Chromium bug and not an NVDA one. I am not sure you can modify the behavior of the text and cursor management accessibility API, but I think that this also needs to be done in Chromium, because chrome has other accessibility issues with text inputs, so this needs to be addressed there IMO.
Note also that other issues are present with word navigation as others pointed out, and I think they need to be addressed also, but this one seems to be the most one affecting the experience negatively? Not sure others agree in fact.
I have another example for the same issue with HTML code which is more real, but presenting it is more complex, so I chose that one. However, the HTML issue is more severe from my side.

One more observation: I tested the issue with Google Chrome and message body of the compose email in gmail. The same exact issue can be reproduced, although cursor placement is different a bit there as this got customized here.

Thanks for all the deatils. I can also reproduce this behavior with Chrome and a web page that just has a textarea element. Thus I have created this issue on the Chromium side
https://bugs.chromium.org/p/chromium/issues/detail?id=1063815
Feel free to comment there if I did not caputre something properly.

I'm jumping in here because I've also noticed the oddities in word navigation and meant to speak up about it.
Forgive my ignorance here, but if VSCode implements its own navigation, does it matter what Chromium does? Or is the point that the cursor moves by the word boundaries defined in VSCode, but the word given to the screen reader to speak is incorrect?
As an aside, @isidorn said:

we have a second word navigation which we switch to when we detect a Screen Reader

Does this override word boundary settings? I tried to customize the boundaries, in an attempt to get NVDA to speak words correctly, but found it made no difference to navigation. However, I didn't test this much at the time.

The issue is essentially

Navigation has boundaries and the accessibility API (IAccessible2 in this case) has boundaries. Those two sets of boundaries need to agree.
The boundaries returned for both must be improved for them to be useful. Word boundaries should include all punctuation except underscores IMO.

From: Alex Hall<EMAIL_ADDRESS>Sent: Tuesday, March 31, 2020 5:29 PM
To: microsoft/vscode<EMAIL_ADDRESS>Cc: Rob Gallo<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [microsoft/vscode] Word navigation not working with screen reader (#90578)
I'm jumping in here because I've also noticed the oddities in word navigation and meant to speak up about it.
Forgive my ignorance here, but if VSCode implements its own navigation, does it matter what Chromium does? Or is the point that the cursor moves by the word boundaries defined in VSCode, but the word given to the screen reader to speak is incorrect?
As an aside, @isidornhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fisidorn&data=02|01|rob.gallo%40microsoft.com|02c154285c5f47f7997908d7d5ba96c9|72f988bf86f141af91ab2d7cd011db47|1|0|637212869680277457&sdata=Xju6qxkaPn7JkR%2FFsQmEMaGD9NkrreQ8JN2Q%2BH8XLVo%3D&reserved=0 said:
we have a second word navigation which we switch to when we detect a Screen Reader
Does this override word boundary settings? I tried to customize the boundaries, in an attempt to get NVDA to speak words correctly, but found it made no difference to navigation. However, I didn't test this much at the time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode%2Fissues%2F90578%23issuecomment-606886695&data=02|01|rob.gallo%40microsoft.com|02c154285c5f47f7997908d7d5ba96c9|72f988bf86f141af91ab2d7cd011db47|1|0|637212869680277457&sdata=mzkf8VtNEAuleAsdQGLR%2BeZEGBujx068K8W5VnSv6RM%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKIVSS36BENLUI6WO7PWJ4LRKJODLANCNFSM4KUOLNJA&data=02|01|rob.gallo%40microsoft.com|02c154285c5f47f7997908d7d5ba96c9|72f988bf86f141af91ab2d7cd011db47|1|0|637212869680287452&sdata=GHwmde%2FsbLAc6WqJ45QNQ%2FU1eZecBzLL19GkfGq8RsY%3D&reserved=0.

Thanks for your efforts @isidorn!
I also reported the following issue on the Chromium side:
https://bugs.chromium.org/p/chromium/issues/detail?id=1066736
If someone has more observations about things not working correctly because of Chromium, let me know please, and I'll be happy to report there also.

The chromium bug referenced by @mohammad-suliman was marked as duplicate and the original issue is now fixed in Chromium 83 or newer. What is the current result now? What remains to be done here?

Thanks for the update, we have our exploration builds based on chromium 83, I will give a shot at backporting the fix to chromium 80 which is our current insiders version.

@deepak1556 great! Maybe we should first check if the exploration build behaves as expacted regarding this issue.
Would some of the users would like to try it out and give feedback? Here are the links to exploration builds:

https://az764295.vo.msecnd.net/exploration/11a6eed191de586f764270db328f9b57ef34c1de/VSCodeSetup-x64-1.47.0-exploration.exe
https://az764295.vo.msecnd.net/exploration/11a6eed191de586f764270db328f9b57ef34c1de/VSCodeUserSetup-x64-1.47.0-exploration.exe
https://az764295.vo.msecnd.net/exploration/11a6eed191de586f764270db328f9b57ef34c1de/VSCode-darwin-exploration.zip
https://az764295.vo.msecnd.net/exploration/11a6eed191de586f764270db328f9b57ef34c1de/code-exploration-1593069439.tar.gz
https://az764295.vo.msecnd.net/exploration/11a6eed191de586f764270db328f9b57ef34c1de/code-exploration_1.47.0-1593069115_amd64.deb

@deepak1556 , @isidorn : I will have to check this out, especially in linux/Ubuntu. Will get back with my results a little later.

This iss an improvement; I'm not getting text outside word navigation boundaries. However, the word navigation itself still needs improvement. Take the following line for example:
|private |initData = (): |void => {|
I have placed '|' chars where the current word breaks are. Here's where the word breaks would be most effective:
|private |initData |= |(|)|: |void |=> |{|
Word breaks should be at almost every single punctuation mark. If the word breaks were just at traditional word-breaking characters which would be matched in a regex, that would be sufficient.
Here's when this issue is resolved (IMO):

When the word navigation in VS Code matches the word navigation in the text editor of Visual Studio

forwards and backwards within a line and across line boundaries
For all the standard punctuation marks

When NVDA or JAWS announces every non-whitespace part of a line and never re-reads any part of the content as you navigate.

Thanks for the example. Did you test with the last NVDA alpha version? There were some improvements implemented recently which relate to word By word  navigation.
Von meinem iPhone gesendet

Am 25.06.2020 um 23:28 schrieb Rob Gallo<EMAIL_ADDRESS>
This iss an improvement; I'm not getting text outside word navigation boundaries. However, the word navigation itself still needs improvement. Take the following line for example:
|private |initData = (): |void => {|
I have placed '|' chars where the current word breaks are. Here's where the word breaks would be most effective:
|private |initData |= |(|)|: |void |=> |{|
Word breaks should be at almost every single punctuation mark. If the word breaks were just at traditional word-breaking characters which would be matched in a regex, that would be sufficient.
Here's when this issue is resolved (IMO):
When the word navigation in VS Code matches the word navigation in the text editor of Visual Studio
forwards and backwards within a line and across line boundaries
For all the standard punctuation marks
When NVDA or JAWS announces every non-whitespace part of a line and never re-reads any part of the content as you navigate.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

I tested with JAWS, but the two are very similar in terms of reading word boundaries. The underlying accessibility data comes from the same place: Chrome’s IAccessible2 implementation.
From: Adriani90<EMAIL_ADDRESS>Sent: Thursday, June 25, 2020 5:34 PM
To: microsoft/vscode<EMAIL_ADDRESS>Cc: Rob Gallo<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [microsoft/vscode] Word navigation not working with screen reader (#90578)
Thanks for the example. Did you test with the last NVDA alpha version? There were some improvements implemented recently which relate to word By word navigation.
Von meinem iPhone gesendet

Am 25.06.2020 um 23:28 schrieb Rob Gallo<EMAIL_ADDRESS>
This iss an improvement; I'm not getting text outside word navigation boundaries. However, the word navigation itself still needs improvement. Take the following line for example:
|private |initData = (): |void => {|
I have placed '|' chars where the current word breaks are. Here's where the word breaks would be most effective:
|private |initData |= |(|)|: |void |=> |{|
Word breaks should be at almost every single punctuation mark. If the word breaks were just at traditional word-breaking characters which would be matched in a regex, that would be sufficient.
Here's when this issue is resolved (IMO):
When the word navigation in VS Code matches the word navigation in the text editor of Visual Studio
forwards and backwards within a line and across line boundaries
For all the standard punctuation marks
When NVDA or JAWS announces every non-whitespace part of a line and never re-reads any part of the content as you navigate.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode%2Fissues%2F90578%23issuecomment-649829141&data=02|01|rob.gallo%40microsoft.com|03a557c13fc94731e63208d8194f7264|72f988bf86f141af91ab2d7cd011db47|1|0|637287176298215045&sdata=SRu%2FJ09WrwPuT5PiO43SFUv9lXWcBZ51fI3Mq6g36Jw%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKIVSS6LMJSWGCSIKMVVNUDRYO7DXANCNFSM4KUOLNJA&data=02|01|rob.gallo%40microsoft.com|03a557c13fc94731e63208d8194f7264|72f988bf86f141af91ab2d7cd011db47|1|0|637287176298225000&sdata=RW85IdbfeypLJHiAo3HQVpaEDd8mSW8j3R8AZLOzxtI%3D&reserved=0.

@RobGallo thanks a lot for trying it out!
@ajborka let us know how it works on linux with Orca for you, thanks!
Since there are improvements let's first look into back porting this if possible @deepak1556
Once we do that I can see if further things can be tuned on the vscode side to further improve this further.

Tested with orca and code exploration using the following line:
import { NamedSFC } from '../../common/react/named-sfc';
I got the following:
'import { '
'import { '
'NamedSFC } '
'NamedSFC } '
'from '../../'
'common/'
'common/'
'react/'
'named-'
'sfc';'
Using the same line I tested it by selecting text instead of simply browsing by word. That is: I pressed ctrl + shift + right.
I got the following:
'import'
'{'
'NamedSFC'
'}'
'from'
' apostrophe  dot  dot  slash  dot  dot  slash '
'common'
' slash react'
' slash named'
' dash sfc'
' apostrophe  semicolon '

Testing this out resulted in more problems than it is worth. Choosing something from autocomplete lists renders the editor unusable for some strange reason. Then again, my Ubuntu vm is having some personality problems at the minute. Will have to sort it out before doing anything else on the Ubuntu side. Otherwise, I am working in Windows 10.
From: Isidor Nikolic<EMAIL_ADDRESS>Sent: Friday, June 26, 2020 4:31 AM
To: microsoft/vscode<EMAIL_ADDRESS>Cc: Andy Borka<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [microsoft/vscode] Word navigation not working with screen reader (#90578)
@RobGallo https://github.com/RobGallo  thanks a lot for trying it out!
@ajborka https://github.com/ajborka  let us know how it works on linux with Orca for you, thanks!
Since there are improvements let's first look into back porting this if possible @deepak1556 https://github.com/deepak1556
Once we do that I can see if further things can be tuned on the vscode side to further improve this further.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/90578#issuecomment-650056559 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACN663STXI3HHVGNBOOTRNTRYRMDLANCNFSM4KUOLNJA .

It's worth flagging that I believe this is configurable for sighted users.  I have no idea at all how you'd ever get it to be configurable for us without extensions to HTML but it might be in scope to consider that part of this issue.
It looks like testing is in hand, but if not I can test as well with around a week turnaround time.

While I was really hoping for this to be addressed in Chromium (et al.), I just committed a change to Orca master that hopefully improves this situation. Those of you able to test with Orca master, please let me know what you find. Thanks!!

@joanmarie thanks a lot. I also posted on our gitter channel if people can try it out.

While I was really hoping for this to be addressed in Chromium (et al.), I just committed a change to Orca master that hopefully improves this situation. Those of you able to test with Orca master, please let me know what you find. Thanks!!

ok on orca master. if i use line:
import { NamedSFC } from '../../common/react/named-sfc';

i get the following:

import
{
NamedSFC
}
from
'../../
common
/react
/named
sfc
';

this seems correct to me.

Using the following line:
exec P_a_b_c.exe
Using ctrl+RightArrow I get the following:

exec
p_a_b
.exe

If I go to the end of the line and use ctrl+LeftArrow I get the following:

exe
p_a_b_c.
exec

@jvesouza: I'm seeing something slightly different

This problem has recently gottne severely worse. Now as I move by word, the cursor skips over punctuation, and jaws and nvda only speak the word, no longer the word + the punctuation. The latter was a big problem, but the new behavior is intolerable. This needs to be fixed yesterday.

@jvesouza @marcozehe do you also experience word navigation getting worse?
@RobGallo I assume you are using vscode insiders? Do you know on when exactly it got worse?

I don't think I noticed any difference recently, no. Neither with NVDA on Windows, nor VoiceOver on the Mac.

I am running Visual Studio Code Version 1.53.2. The problem happens with both NVDA and JAWS.

I totally agree with @RobGallo !!! I can reproduce the exact problematic mentioned behavior with NVDA latest (2020.4) and VS Code latest also (Version: 1.53.2). This is an urgent problem that needs to be fixed. If there is something on my side that I can do to overcome this please let me know. Also, if there is anything I can do to help to get this fixed also let me know, I am willing to help with what I can do.

I can likewise confirm this behavior as of approx. 2 weeks ago.  VSCode 1.53.2, NVDA 2020.4, Windows 10.  For example:
cdef _checked(x):

Is "cdef", "_checked", "x", "):".  The "(" goes missing.  It's much worse with C++ code.  For instance.
It's inconsistent about what's skipped.  For example:
float o = gen.generateFloat();

Is "float", "o =", "gen", "generateFloat", "();".
And it also gets weirder.  For example:
return (1.0 + 1.0f) * 0.5f;

Is "return", "1.0 +", "1.0 +", "1.0f", "1.0f", "0.5f", "0.5f", ";".  Which is like twice the number of numbers in the expression (clearly this is somewhat of the old behavior in that it's stopping at the dots but saying the whole number, but nonetheless it is what it is).
I still use VSCode because frankly all the other things it offers make up for this, but it's definitely worse and has graduated from annoying but I can get used to it to major headache.  The old behavior was at least consistant-ish and did read all the characters on the line.

Thanks all for the feedback.
I have tried out older VS Code versions and this behaviour broke in the latest VS Code stable update where we adopted Electron 11, thus picking up a new Chrome version.
VS Code does a customised word navigation when screen reader is detected to sort of behave like Chrome in order to respect chrome word boundaries - since those are read out by nvda.
I am currently looking into a fix that updates our customised word navigation. I should have something later today.
If you would like to help in the future, I would recommend two things:

Use VS Code insiders https://code.visualstudio.com/insiders/ since this change was out in VS Code insiders for 3+ months and nobody raised the issue until now. Our most active community members use mac and linux and this issue appears only on Windows
Join our accessibility gitter channel for potential discussions and raising of issues https://gitter.im/Microsoft/vscode-a11y

@ahicks92 those examples are very useful, thanks for providing them.

Google chrome + google search also does not work here, here's the issue I created for that https://bugs.chromium.org/p/chromium/issues/detail?id=1180807
@joanmarie might you know somebody at Google to ping for this issue?
For VS Code I will push an improvement to the current state of things in a couple of hours, but ideal behaviour we will only have once Chrome fixes that issue. And we hopefully cherry pick the fix.

Thanks @isidorn for the great efforts, that's much appreciated!
I think that Chrome and Chromium has several issues regarding word navigation with a screen reader. The issue has severely got worse recently, but the original reported issue is still not fixed, which affects productivity badly. I hope someone from Google is listening to this...
maybe opening a ticket on NVDA repo will help? I see that there are active people from Google there.

To show your support, I suggest everybody who is affected by this log into that MonoRail with their Gmail account, and check the Star box to upvote the issue. The more votes, the easier they can see who this is affecting, and how many. Might help with prioritization. Also, you will then receive notifications of changes via e-mail and know when it is fixed, and in which Chrome version.

@mohammad-suliman makes sense, I have created this NVDA issue since they might be able to do a better workaround than us https://github.com/nvaccess/nvda/issues/12091
@MarcoZehe yeah, upvotes are welcome :)

Google chrome + google search also does not work here, here's the issue I created for that https://bugs.chromium.org/p/chromium/issues/detail?id=1180807
@joanmarie @deepak1556 might you know somebody at Google to ping for this issue?

As I just commented on the bug, it seems like it might already be fixed. Did you try in Canary?
That said, in Linux (not just in Chromium) there are a number of edge cases (mostly related to punctuation / special symbols), where the native caret navigation does not jibe with the accessible text implementation.
Dominic Mazzoni (of Google) told me that for the browser (and arguably Gtk and ....) to always give the correct word at offset, taking into account the previous position, direction of navigation, etc., can be quite tricky and also introduce localization issues (he mentioned some example in Chinese if memory serves me). He suggested that I change Orca to keep track of the previous caret location. Then, when the caret-moved accessibility event is emitted, Orca could get the text in between the old offset and the new offset and speak it. It turns out that's not all that hard to do (at least it wasn't in Orca). So.... Maybe the thing to do IS get the NVDA developers to do the same thing. :woman_shrugging:

@joanmarie thanks for great advice. Canary just crashes on my Win VM so I can not check, but I trust if you say that it works for you. I will comment on the issue, would be cool if we could get the exact commit of the fix so we potentially cherry-pick it @deepak1556
Yeah that advice from Dominic Mazzoni makes good sense, I will comment on the NVDA issue so hopefully they take it into consideration.

I did a bisect. Looks like you want this fix: https://chromium-review.googlesource.com/c/chromium/src/+/2666008 ?

@joanmarie Awesome!
@deepak1556 TL;DR: word navigation in latest chrome is misbehaving. Is it possible to cherry pick https://chromium-review.googlesource.com/c/chromium/src/+/2666008 on top of our Electron version?

Ok, I have pushed an improvement in word navigation that we basically let Chrome handle word navigation, so we will be aligned with what NVDA expects.
So the behaviour in Insiders from tomorrow will be better than it is today, however it will be perfect once we cherry pick the commit that @joanmarie found. Hopefully we can do this this week, we'll see.
Because of my change you can still use the following commands if you have set custom keybindings for them but from now on they are deprecated and we will probably remove them in the future:
cursorWordAccessibilityLeft, cursorWordAccessibilityLeftSelect, cursorWordAccessibilityRight, cursorWordAccessibilityRightSelect
Thanks all for help, nice community effort :)

Thanks for narrowing down the issue, I will look at backporting the change today.

Lovely, thanks.

Fix has been backported https://domoreexp.visualstudio.com/Teamspace/_git/electron-build/pullrequest/316782 , will update here once the fix has been consumed by vscode.

GitHubTags:#A11y_VSCode;#A11ySev1;#A11yTCS;#A11yMAS;#DesktopApp;#WCAG1.3.1;#Win10;#Visual Studio Code;#NVDA;#JAWS; #CAITestPass_May2020;#FTP;#STP;

GitHubTags:#A11y_VSCode;#A11ySev1;#A11yTCS;#A11yMAS;#DesktopApp;#WCAG1.3.1;#Win10;#Visual Studio Code;#NVDA;#JAWS; #CAITestPass_May2020;#FTP;#STP;

GitHubTags:#A11y_VSCode;#A11ySev1;#A11yTCS;#A11yMAS;#DesktopApp;#WCAG1.3.1;#Win10;#Visual Studio Code;#NVDA;#JAWS; #CAITestPass_May2020;#FTP;#STP;

@deepak1556 thanks for meging in the fix.
I just tried this and works very nicely for me. I tried all the examples that @ahicks92 provided and they all work much better now. The only corner case I found I have captured with this new Chromium issue. And this time I made sure I can repro with latest Chrome Canary https://bugs.chromium.org/p/chromium/issues/detail?id=1181643 fyi @joanmarie
@RobGallo @ahicks92 @mohammad-suliman if you have time it would be great if you can get latest vscode insiders and provide feedback if this is working as expected now https://code.visualstudio.com/insiders/
Thanks

I should probably go over to the NVDA issue, but the one thing that would be super nice to have is working customization of word separators.  Word navigation is extra useful if you can customize to the programming language since dialing in a specific character while having to move by character is quite painful.  I mention this because it sounds like @joanmarie's proposed fix for NVDA would actually solve this issue as well.
@isidorn I should be doing nontrivial C++ things with VSCode again this weekend, can try it then.  Can't adopt VSCode at work yet because I haven't had time to make a line number bell and we have style requirements that need one, so I can't get you fast turnaround times.

@ahicks92 vscode provides the option to customize word navigation however for that to work with NVDA, NVDA has to fix this issue https://github.com/nvaccess/nvda/issues/12091
Please comment there. Thanks

@isidorn  How does one customize word navigation please?

@RobGallo you can change the following setting
"editor.wordSeparators"
That is a list of separators that basically define a word.
However until NVDA fixes that issue we ignore this list of separators on Windows when a screen reader is detected and we fall back to Chrome native word navigation. This setting is respected on other platforms for example macOS with VoiceOver or Linux with Orca.
Also there are mutliple commands to navigate words, you can try mutliple of them and try to find the right one. Just go to Preferences > keyboard shortcuts and type "cursorWord" - you can then find a list of keybindings for these various commands or you can assign your own keybinding.
Also there are probably lots of extensions that add cursor navigation - however I did not explore tthis at all. I just noticed there is an extension called "subword navigation"

I'm happy to look into this further, but pointed out the following in https://github.com/nvaccess/nvda/issues/12091#issuecomment-785234320

As a workaround, I'm still not sure how to do this, as NVDA's word navigation reads the current word you're at, not the word you passed over. Therefore, the difference in caret position before and after the cursor movement doesn't make sense to how NVDA behaves.

Also note that the behavior of ctrl+leftArrow and ctrl+rightArrow isn't symmetrical in Chrome.

@leonardder great, for the NVDA fix let's continue the discussion in the NVDA issue. Thanks!

I should point out that it is not NVDA or JAWS or any other screen reader where problems lie or where fixes should be made. The problem, the actual, fundamental problem, is in Chrome.
The problem we're discussing occurs when the word boundaries for keyboard navigation and text retrieval through IAccessibleText are not consistent. In other words, if the number of characters jumped when moving by word with the keyboard does not equal the number of characters returned when retrieving text at the word boundary through IAccessibleText, a screen reader user will receive either more or fewer characters than are visually represented by a word on screen.
The problem has two parts:

Keyboard navigation of text by boundary type, specifically word
The IAccessibleText interface, part of the IAccessible2 suite of interfaces, supported by Chrome

IAccessibleText supports retrieving text from an edit field by a specified boundary type, e.g., character, word, line, paragraph, etc. So when a screen reader reads the word at the cursor, this is how it is done:

The screen reader asks for the current offset of the cursor.
The screen reader asks for the text in the word boundary of that offset.

When navigating by word, the following occurs:

The screen reader captures the word navigation keystroke (ctrl+rightArrow or ctrl+leftArrow on Windows).
The screen reader most often and ideally passes the keystroke through to the underlying application.
The application moves the cursor.
The application sends an event indicating the cursor has moved.
Based on the cursor moved event combined with the stored knowledge of what keystroke generated the event, the screen reader then requests the word at the cursor as described above.

You will notice in the above description that the application is entirely responsible for both moving the cursor by word and determining what text is within the word boundary when requested through the IAccessibleText interface.  Ergo, the problem needs to be fixed in the application, in this case Chrome. Modifying NVDA and/or VSCode may cover over the problem, but it isn't an actual fix.

The insiders build helps, but I've got other weird examples now:
char *dest = (char *)out;

Skips the ( when reading by word from left to right, but not when reading from right to left.  And:
auto ret = stream->read(count, dest);

Reads -> twice when going from left to right, rather than reading read.  When going from right to left, it's fine.
This is the following insiders version:
Version: 1.54.0-insider (user setup)
Commit: e590188f17162393f50feec19263398e6fe02d13
Date: 2021-02-26T20:39:10.253Z (19 hrs ago)
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19042

@ahicks92 thanks for sharing those example. Both examples are already covered with this issue I have created last week https://bugs.chromium.org/p/chromium/issues/detail?id=1181643
So please comment on it so we get some movement by the Google engineers. Hopefully they can fix it on their side and once they do we would just cherry-pick the fix onto vs code.
Thanks!


Improving error reporting and adding account to charge_ext

Adding account to charge source, as explained from the stripe docs below:
A payment source to be charged. This can be the ID of a card (i.e., credit or debit card), a bank account, a source, a token, or a connected account. For certain sources—namely, cards, bank accounts, and attached sources—you must also pass the ID of the associated customer.
https://stripe.com/docs/api/charges/create#create_charge-source
Additionally adding the Hyper/Surf error message to the ClientError.
PS.
Any ideas on adding Defaults to the library? Happy to do this if we come up with a good pattern. Currently something like below is not very pleasing to the eye:
create_checkout_session.payment_intent_data =
    Box::new(Some(stripe::CreateCheckoutSessionPaymentIntentData {
        application_fee_amount: Box::new(Some(params.application_fee_amount)),
        transfer_data: Box::new(Some(
            stripe::CreateCheckoutSessionPaymentIntentDataTransferData {
                amount: Box::new(None),
                destination: params.connected_account_id,
            },
        )),
        capture_method: Box::new(None),
        description: Box::new(None),
        metadata: HashMap::new(),
        receipt_email: Box::new(None),
        shipping: Box::new(None),
        on_behalf_of: Box::new(None),
        statement_descriptor: Box::new(None),
        statement_descriptor_suffix: Box::new(None),
        setup_future_usage: Box::new(None),
        transfer_group: Box::new(None),
  }));

No you're right. I'm currently trying to wrap my head around the best way of doing this. Right now due to macros we generate an obscene amount of code, and deriving default would make that worse. Running CI will merge and open a discussion.

Thanks for the contribution!


Connecting to HDFS through a proxy?

Does pyarrow support connecting to HDFS through a proxy?

It does if libhdfs does. Do you know?

I never used libhdfs before and I don't know whether it supports proxy. However, I do know that it's fairly easily to set proxy for JVM. libhdfs is implemented in C but the doc mentions JNI which makes me feel like that it's called via JVM. Do you know whether pyarrow invokes libhdfs via JVM?

Yes it does

Sounds like the conversation is over.  If this is still an issue please open a JIRA or contact dev@ mailing list.


New release

🎯 Goal
Describe why we are making this change
🛠 Implementation details
Provide a description of the implementation
🎨 UI Changes
Add relevant screenshots
Make sure to test with both Angular and React (with both MessageList and VirtualizedMessageList components) SDKs

:tada: This PR is included in version 3.10.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Pair Bluetooth Classic with more than 20 devices (IDFGH-9368)

Is your feature request related to a problem?
I have a project in which I want to share an information twice or more aday via Bluetooth Classic with about 50 Android devices that use "Simple Bluetooth Terminal" android App (Every device holder opens the App in proximity of the ESP32 board to get the information). My concern is that ESP32 Bt classic pairing is limited to 20 devices only.
Describe the solution you'd like.
I think it would be useful to allow user to deal with the pairing process, or at least set this limit at his convinience.
Describe alternatives you've considered.
In the mean time, I am just using it as it is so that at every new pairing obove the limit new devices overwrite old ones, but doubt wether this would harm the ESP32 microcontroller or is it safe for a long term run.
Additional context.
No response

Hi @samir213 ,
You can try to increase the value.
Thanks

@samir213 On the latest branch you can modify the number of allowed pairs through menuconfig.

Thanks for reporting and we will close this issue. Feel free to reopen with more updates, thanks.


feature: caltrops

caltrop bags can be picked up, carried and dropped
when dropping a caltrop bag, it breaks open and scatters caltrops
when stepping on square with caltrops, caltrops cause foot damage
only one set of caltrops can be placed on a square

[ ] on item drop trigger
[ ] destroy item effect
[ ] create item effect

Should trap bags be stackable?


Reddit: Play mp4 and mp3 in parallel

Hi!
Reddit provides video and audio separately from each other.
How to play video and audio from different sources simultaneously?
Post: https://www.reddit.com/r/PUBGMobile/comments/cwesxm/ever_need_a_designated_driver/
Video Link: https://v.redd.it/kax8na6nr3j31/DASH_1080?source=fallback
Audio Link: https://v.redd.it/kax8na6nr3j31/audio

I tried to do so. But, sometimes after clicking on the play button, the audio lags behind the video by a few milliseconds.
<video class="video" width="100%" preload="metadata" controls>
  <source src="https://v.redd.it/kax8na6nr3j31/DASH_1080" type="video/mp4">
</video>

<audio class="audio" width="100%" preload="metadata" controls>
  <source src="https://v.redd.it/kax8na6nr3j31/audio" type="audio/mp3">
</audio>

jQuery('.video').mediaelementplayer({
	pauseOtherPlayers: false,
  success: function(video_media) {
  	// Load mediaplayer for audio.
    jQuery('.audio').mediaelementplayer({
    	pauseOtherPlayers: false,
      success: function(audio_media) {
      	video_media.addEventListener('play', function(e) {
          audio_media.play();
        });

        video_media.addEventListener('pause', function(e) {
          audio_media.pause();
        });

        video_media.addEventListener('seeked', function(e) {
          audio_media.setCurrentTime(video_media.getCurrentTime());
        });
      },
    });
  }
});

Demo: https://jsfiddle.net/axtpsk3o/1/
Does anyone have another solution?

To me, the short answer is: no, you can't play simultaneously audio and video sources without first mixing them.
https://en.wikipedia.org/wiki/Audio-to-video_synchronization


Wrap long stat highlight lines

A first functioning attempt at wrapping long lines.
Might require still some fine-tuning for better recognition of the right spot to wrap.
Fixes #50
Before:

After:

Also needs tests still

Needs documentation and changelog in docs updates


Find BigDecimal implementation

https://sine.codeplex.com/

BigRational in Math.NET:
http://numerics.mathdotnet.com/
Why exactly do you need BigDecimal? For AmountValue?

Yeah, with the rounding modes would be nice

When do you need rounding? Just when converting to/from string or after each operation?

Yeah, for arithemtic etc. The AmountValue is a hack for serialisation until
something better comes along
On 18 Dec 2015 21:07, "Matej Rizman"<EMAIL_ADDRESS>wrote:

When do you need rounding? Just when converting to/from string or after
each operation?
—
Reply to this email directly or view it on GitHub
https://github.com/ripple/ripple-dot-net/issues/9#issuecomment-165785478
.


Daemon images search refactoring

Add Unit test to daemon.SearchRegistryForImages…
… and refactor a little bit some daemon on the way 🐙.

Move SearchRegistryForImages to a new file (daemon/search.go) as daemon.go is getting pretty big.
registry.Service is now an interface (allowing us to decouple it a little bit and thus unit test easily).
Add some unit test for SearchRegistryForImages.
Use UniqueExactMatch for search filters
And use empty restore id for now in client.ContainerStart.

/cc @thaJeztah @runcom @calavera @stevvooe @aaronlehmann
/cc @boucher @crosbymichael for checkpoint stuff.
🐸

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "daemon-images-search-refactoring" git@github.com:vdemeester/docker.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

Are there changes to the checkpoint stuff, or is it just pulling in the commit from engine-api?

Are there changes to the checkpoint stuff, or is it just pulling in the commit from engine-api?

I gather that it's related to upstream changes in engine-api, but I also found this confusing. I think we need to do a better job of keeping engine in sync with engine-api and not syncing up in unrelated PRs.

@boucher @aaronlehmann yeah it's just the client signature that has been merged in engine-api before the changes I wanted to vendor :angel:.
@aaronlehmann do you suggest to do a PR only for vendoring ? (I thought about it but… :sweat_smile: )

@aaronlehmann do you suggest to do a PR only for vendoring ? (I thought about it but… 😅 )

I wouldn't bother right now, but I think it's a good idea in general. Ideally the person who makes breaking changes to engine-api would open PRs for docker, swarm, etc. to keep those projects up to date.

@aaronlehmann yeah I do agree, we need more practice on this :angel:

LGTM

Do we know about this flakey test?
10:13:11 ----------------------------------------------------------------------
10:13:11 FAIL: docker_cli_wait_test.go:57: DockerSuite.TestWaitNonBlockedExitRandom
10:13:11
10:13:11 docker_cli_wait_test.go:62:
10:13:11     c.Assert(err, checker.IsNil) //Container should have stopped by now
10:13:11 ... value *errors.errorString = &errors.errorString{s:"condition \"\"true\" == \"false\"\" not true in time"} ("condition \"\"true\" == \"false\"\" not true in time")
10:13:11
10:13:18
10:13:18 ----------------------------------------------------------------------

@cpuguy83 don't think I've seen it

LGTM, all green. We can look at https://github.com/docker/docker/pull/22861#discussion_r64369846 in a follow up (it was like this before, so 👍 )


Remote kernel with jupyterhub

I don't see any documentation or other issues talking about using jupyter kernels with jupyterhub. I'm testing out a JupyterHub installation on a server I have access to; when I forward port 8000 to my computer, I can open up a jupyter notebook at localhost:8000, but when I try to have Hydrogen connect to port 8000, it doesn't accept my token.
Is this why the cookie option exists? How do I find the cookie from Jupyterhub?
@nikitakit you added the remote connection, right?

If your JupyterHub installation is set up to accept tokens, token authentication should be the best way forward.
The cookie option is for the case where JupyterHub has some custom authenticator (e.g. LDAP) that's outside your control; it allows you to connect despite being a gigantic kludge. You can pull out the cookie by logging it to JupyterHub in your browser, opening the browser debug console, and running document.cookie. The cookie string can then be pasted into hydrogen (note that the string delimiters shown in the js console are not part of the cookie)

@kylebarron did you get this sorted out? I'm just beginning to experiment with the goal of a similar kind of deployment. I haven't been able to connect in and launch a new kernel with either the VS Code Jupyter plugin using token auth or with Atom + Hydrogen. Any thoughts on how to approach debugging the failure to get a working connection would be much appreciated.

Created an issue on the jupyterhub project, but not sure whether it's really a JH issue, a Hydrogen issue, or something in between. I realized I needed to point to a different url when using jupyterhub... e.g. if for a stand alone jupyter server, you point it at base_url/, with jupyterhub you won't hit the proper api endpoint unless pointed at base_url/user/user_name (where the notebook root is after authenticating with PAM). I can authenticate to the server with a token, select a new session (and see the existence of other ones if the kernels are already up), and see the list of available kernels. Clicking on a kernel does start the kernel on the server, which I can see from the JupyterHub logs. However, Hydrogen doesn't seem to realize the kernel is up and running, as the "select kernel" dialog remains presented after kernel start - if I cancel out, pull the connect to remote kernel dialog up again and reauthenticate, I can see the existence of the session for the kernel that I just started, but clicking on the name in the dialog doesn't connect to it. So I guess when running behind jupyterhub, the url paths for the api clearly aren't the same as with the stand alone server - I can't quite figure out what's mismatched, though, as the fact that I can get some dialogs at all means it's talking to the notebook server API, it just can't reach the kernel. Any ideas about where I need to look? Thanks!

I haven't tried since my first post, sorry.

FWIW, I think this could be related to a change in JupyterLab services, but not 100% sure...


feat(docs): add mongo-sink usage on io docs

Motivation
Add mongo-sink step-by-step usage docs.
Modifications
Add mongo-sink step-by-step usage docs.
Verifying this change

[x] Make sure that the change passes the CI checks.

(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (10MB)
Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes

Dependencies (does it add or upgrade a dependency): (no)
The public API: (no)
The schema: (no)
The default values of configurations: (no)
The wire protocol: (no)
The rest endpoints: (no)
The admin cli options: (no)
Anything that affects deployment: (no)

Documentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?

[ ] doc-required
(If you need help on updating docs, create a doc issue)

[ ] no-need-doc
(Please explain why)

[x] doc
(If this PR contains doc changes)

Closed as stale and conflict. Please rebase and resubmit the patch if it's still relevant.


Support for React 18

Does this library works with react 18 @justinmahar?

Hey, thanks for the heads up on React 18. It should! I will push out a patch tonight that takes care of this.

All set. Give it a shot and close if it's fixed for you.

All is good! Thanks for the quick support 👍


The "upload file" card is a bit too generic, can it be changes to upload an "expression matrix"

Since we have several different types of files that can be uploaded

Just changing file upload to gene expression matrix will be problematic.
I'm working on turning the upload component into a "factory helper" then all of these different file types will just appear at the start, reusing a similar upload interface & API helpers

Perfect!


Notification icon needed

Currently notifications show a pale circle. We need a proper icon.

On iOS this automatically shows the app icon, could you post a screenshot of how this notification looks like?

We could use this to generate them:
https://romannurik.github.io/AndroidAssetStudio/icons-notification.html
Do you have the icon in svg?

Only got those present in the iOS app's asset folder, blue 'n black, but should be feasible to convert them I'd guess. https://github.com/LocativeHQ/ios-app/tree/master/Assets/Icons
Maybe I and @tbasse can come up with something better in the future.

Well would not hurt to have vector icon + full logo in svg somewhere? Square and long versions.

Yeah definitely :+1: don't have anything like that though

So we then wait for @tbasse to come up with the svg's?
I can take it from there

I'm not sure if he's available or too busy right now, but I think this can wait a bit, right? Otherwise I could see if I can find an old vector one or, in the worst case, vectorize the existing one...

nah, not urgent

Here you have some screensots
Notification when screen locked

Notifications when unlocked and swiped down

Wow awesome, so cool to see it actually in action. Really good work @francisdb and @chrisdolge can't wait to have this submitted to the play store 🎉 thx a bunch already! @tbasse is also working hard on some new designs on iOS, we'll ping you as soon as we've got something to show. maybe we should create a design repo for this

@kimar @tbasse 3 months later...
Another request for vector icon + full logo in svg somewhere?

@francisdb I've just vectorized the App Store logo (which is the same as the iOS App icon) and created a new repo for all the assets here: https://github.com/LocativeHQ/assets/tree/master/icons/vectorized
Hope this helps. I'd also be open for modifications to the icon and CD in general.

@kimar thanks! What's CD?

@francisdb CD = corporate design

@francisdb did you use the icons orovides for the notifications? I'm asking because I'm checking what we might need to submit to the Play Store

not yet, sorry, need some time to apply this

No worries, just askin', you can update this issue in case you're working on it, otherwise I might also take a look into this, if I find some time.

@jasperdevrient could you also update the icon to use:
https://github.com/LocativeHQ/assets/tree/master/icons/vectorized ?
app main icon is blurry, same with notification icons

Ok I will fix this

The geofence list also has blurry icons

@francisdb It used the same image, I have added more versions to handle screens with a bigger DPI.

@jasperdevrient way better 👍

@jasperdevrient Looks like I found some other icon issues
Lock screen (too small icons)

Notification icons (icon not visible, just shows square)

Notification dropdown (shows 2 icons, small one is not needed)


iOS 10 : XCode 8 : preferredStatusBarStyle

Hi, I have just run my project in XCod8 and give me error as show in the below image.

Reason behind the error :
In iOS 10 preferredStatusBarStyle is implemented as property in UIViewController.
-Source Apple:

@property(nonatomic, readonly) UIStatusBarStyle preferredStatusBarStyle NS_AVAILABLE_IOS(7_0) __TVOS_PROHIBITED; // Defaults to UIStatusBarStyleDefault

dupe of https://github.com/cezarywojcik/CWStatusBarNotification/issues/95


Stock aggregate

[x] #1 PR has to be merged before this pull request

Order class shouldnt accept an id, check if it is correct or needs refactor


Error: toNetInput - Problem with canvas.loadImage() + faceapi.detectAllFaces()

Hey!
My name is Gabriel and I'm using face-api.js to apply FaceRecognition on my final essay, on my way to graduate.
With the objective of trying the face-api and understand how it works, I created the following test.js:
import faceapi from "face-api.js";

import * as canvas from 'canvas';
const { Canvas, Image, ImageData } = canvas;
faceapi.env.monkeyPatch({ Canvas, Image, ImageData });

const faceDetectionNet = faceapi.nets.ssdMobilenetv1;
const minConfidence = 0.5;
const faceDetectionOptions = new faceapi.SsdMobilenetv1Options({ minConfidence });

async function runRecognition() {
    await faceDetectionNet.loadFromDisk('./weights');
    await faceapi.nets.faceLandmark68Net.loadFromDisk('./weights');
    await faceapi.nets.faceRecognitionNet.loadFromDisk('./weights');

    const REFERENCE_IMAGE = './bbt1.jpg';
    const QUERY_IMAGE = './bbt2.jpg';

    const referenceImage = await canvas.default.loadImage(REFERENCE_IMAGE);
    const queryImage = await canvas.default.loadImage(QUERY_IMAGE);

    const detections_ref = await faceapi.detectAllFaces(referenceImage, faceDetectionOptions)
        .withFaceLandmarks()
        .withFaceDescriptors();

    const detections_query = await faceapi.detectAllFaces(queryImage, faceDetectionOptions)
        .withFaceLandmarks()
        .withFaceDescriptors();

    const faceMatcher = new faceapi.FaceMatcher(detections_ref);

    detections_query.forEach(fd => {
        const bestMatch = faceMatcher.findBestMatch(fd.descriptor);
        console.log(bestMatch.toString());
    });
}

runRecognition();

But I wasn't able to make it work, right now, I'm getting the following error:
"UnhandledPromiseRejectionWarning: Error: toNetInput - expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id
at C:\Users\gabri\Desktop\TCC\face-api-teste\node_modules\face-api.js\build\commonjs\dom\toNetInput.js:38:35"
Does anyone have any idea of what the problem is?
Thanks for the help 😄

what is the result and type of const referenceImage = await canvas.default.loadImage(REFERENCE_IMAGE); ?
if you're not drawing on canvas in nodejs, you don't actually need 3rd party libraries and monkey patches just to load image and use it in face-api - you can use native tfjs-node methods directly, take a look at https://github.com/vladmandic/face-api/blob/master/example/node.js, specifically 'image()' method.

Thanks for the tip, I'll try it as in your example as soon as I can, and then I comment here if it worked.
About the result of const referenceImage = await canvas.default.loadImage(REFERENCE_IMAGE);, I logged the object and it printed:
[Image:1366x768 ./bbt1.jpg complete]

that doesn't look like Image type, that looks like something canvas internal.
face-api perfoms check:   input instanceof Image || input instanceof Canvas || input instanceof Video and if that fails, you get your error expected media to be of type ...
took a quick look at canvas and their example shows how to create canvas and then load image into it and not how to use canvas.default to create image type directly.
const referenceImage = await canvas.loadImage(REFERENCE_IMAGE);
const myCanvas = canvas.createCanvas(200, 200)
const ctx = myCanvas.getContext('2d')
ctx.drawImage(image, 0, 0, 200, 200)

and now you have myCanvas that you can pass to face-api.
but like i said, you don't need canvas at all.

I'm sorry for taking too long to get back here with news!
But thanks a lot @vladmandic, you saved me and my group! hahaha
You were right, I refactored my code to something more alike your example, and it worked nice and smooth!
I'll set this issue as solved, but only for purpose of sharing knowledge, could you please explain to me when would I need or not need canvas?
Thanks again!

@Gabe-Soares
if you want to draw results on top of an image (and then you'd probably also want to save that image to disk) - then you need a canvas.
but if you're just displaying results as text, no need for canvas as everything can be done without it.

Hello @Gabe-Soares , im having de same issue, could you share what did you do? thanks a lot!

Hi @juancruzsosagab, were you able to make any progress with this problem?
I am stuck on the same thing.

@juancruzsosagab @eze-villegas this issue was successfully resolved which you can see if you read through it. and posting "me too" on an issue that was closed 1.5 years ago does not help. if you have a problem, document it and open a new issue.

An old error description, maybe it will help someone.
I process many images in a directory and the error occurs when the image contains an animated GIF
Environment:
    face-api with NodeJS

Code:
    const options = new faceapi.SsdMobilenetv1Options({ minConfidence: 0.09, maxResults: 10 });
    const buffer = fs.readFileSync(fullpath);
    const decodeT = faceapi.tf.node.decodeImage(buffer, 3);
    const expandT = faceapi.tf.expandDims(decodeT, 0);
    const results = await faceapi.detectAllFaces(expandT, options) <= ERROR with animated GIF

Error:
    toNetInput - expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id
    at /home/osboxes/dev/apps/server/node_modules/@vladmandic/face-api/dist/face-api.node.js:7:25421


Check COMID match for 3 gages

I found 3 gages that may be matched to an incorrect COMID. Below I've listed the gage ID, proposed new COMID, and the current COMID from nhdplusTools::get_nldi_feature. All these proposed edits are based on looking at maps of the gage locations and NHDplusV2 network flowlines.
COMID = case_when(GAGE_ID == '09331950' ~ '4894919', #curr COMID "4894001"
                                 GAGE_ID == '12392895' ~ '24115829', #curr COMID "24115835"
                                 GAGE_ID == '04219767' ~ '15561021', #curr COMID "15559985"

Thanks for calling these out @jds485.
For https://waterdata.usgs.gov/monitoring-location/09331950/#period=P1Y&showMedian=true NWIS has a drainage area of 13.6 sqmi but the comid it appears to be right on top of has a drainage area of 127 square miles. Something doesn't add up. The comid that it is on in reference gages is actually much too small but closer (1 square mile). Any idea if that NWIS drainage area could be off by a factor of 10 or so?
https://waterdata.usgs.gov/monitoring-location/12392895/#period=P1Y&showMedian=true is the same case. (13.5sqmi NWIS vs 30sqmi NHDPlus)
As is https://waterdata.usgs.gov/monitoring-location/04219767/#parameterCode=00065&period=P7D&showMedian=false (71 sqmi vs 1255 sqmi)
In these cases, I can switch it to your suggestion by just filtering out cases where the NWIS drainage area much too small to make sense with any near by NHDPlusV2 flowline. The question is -- are these maybe instances where NHDPlusV2 just doesn't have a flowline for the drainage in question? Would it be better to have no network association in these cases that are highly uncertain?

Any idea if that NWIS drainage area could be off by a factor of 10 or so?
I am not sure - I do not know these gages well enough to say.

The question is -- are these maybe instances where NHDPlusV2 just doesn't have a flowline for the drainage in question?
I also wonder if the gage locations (lat, long) are correct. I'd be happy to ask the WSCs for more info and can send them a link to this issue. Let me know if you'd like for me to do that.

Would it be better to have no network association in these cases that are highly uncertain?
Maybe a new dataset column indicating that the reference network flowline drainage area and the NWIS listed drainage area are in disagreement (different by some factor), and then users can decide if they want to use the gage in their studies. I'm not sure if that new column would be in NWIS, in the NLDI or both places. I have found that QAQC by looking at drainage areas and drainage area ratios (to evaluate gage nestedness) is effective for identifying cases like these.

In this case, a check with the science center is probably in order. We just don't have evidence to say what's right and wrong.
I've come back to this issue of gage/network association quality many times and still haven't found a generalization that I'm happy with. At the end of the day, we have a set of match evidence (nearness, name, drainage area, etc.), and some strength or weakness metric that is scoped to the line of evidence.
Since many gages don't have a drainage area or the stream a gage is on/near doesn't have a name, the match / match strength field is very often NULL for everything except nearness.
Taking the drainage area metric on its face -- I would argue that when we have drainage area mismatch with any reasonably near by flowline of greater than some threshold we would just throw out that evidence as seemingly a blunder (in the gage area or the hydrography data). That could lead to an arrangement where we have one column per match criteria that is NULL if the criteria did not apply and some numerical or categorical value scoped to the criteria in question.
In the case of drainage area, each gage/network association represents a hydrologic location along the hydrographic network. IF we were to add a drainage area match quality metric, I would want to do it as the normalized difference (expressed as a %) between the hydrographic estimate of drainage area and the stated estimate of drainage area of the gage.
100 * (A_hydrography - A_gage) / A_hydrography = (percent_diff_A_hydro-gage)
Given that gages are along flowlines (some distance upstream of a confluence) and flowline drainage area estimates apply at the flowline outlet, we would generally expect that hydrography drainage area estimate to be very slightly larger than the gage. So we would expect percent_diff_A_hydro-gage to be a small positive number corresponding to the partial catchment downstream of the gage location.
Does this track? I've been wanting to crack this nut for a long long time and am ready to do a bit more on reference gages in the next few months. Maybe I can work something like this in.

Yes, that sounds good to me. I think you will find some negative percent differences based on my recent experience comparing NWIS drainage areas and network drainage areas for about 4500 gage sites. The TOT_BASIN_AREA is and NHDPlusV2 estimate from Mike Wieczorek's ScienceBase data release.

There are some NWIS areas that are larger than their NHD-based flowline outlet area estimates. Some of those sites are affected by flow alterations and diversions, so maybe one data source considered the area of the watershed diverting flows as well. And sometimes the NWIS contributing drainage area is a closer match to the NHDPlusV2-based drainage area. I dropped all those from my work because I did not know what to use. A percent difference metric could help to quickly identify sites like these

OK -- I'm working through this and #26 now. One point of potential complexity is that I have some prior network associations in the mix that I evaluate based on drainage area. Right now, I just throw out pre-existing associations if the drainage area difference is more than 50% different than the stated gage drainage area.
Should I do any record keeping around this filtering of problematic drainage area? I use this greater than 0.5:
abs(all_gages$nhdpv2_totdasqkm - all_gages$drainage_area_sqkm) / all_gages$drainage_area_sqkm

For example:
https://waterdata.usgs.gov/monitoring-location/08363100
Gage drainage area is 0.4 sqmi / 1 sqkm and SWIM has it on the Rio Grande. In reality there is no flowline for this gage in NHDPlusV2 and we've just fallen back on what's close in all cases.

another e.g. https://waterdata.usgs.gov/monitoring-location/05517600
The NHDPlusV2 gages layer has that on a 3.5 sqkm flowline but NWIS has it as a 0.7 sqkm drainage area.
I'll just remove these as clear unrealistic associations and move on to the next step (automated search for the best match) but figured I'd jot down the question to see what you think.

Right now, I just throw out pre-existing associations if the drainage area difference is more than 50% different than the stated gage drainage area. Should I do any record keeping around this filtering of problematic drainage area? I use this greater than 0.5.

This is a good filter to keep, but it will also remove associations for gages that are located in the upper portions of their flowlines. The threshold for the gages I worked with was as high as 4 (5 sq. mi. watershed with a gage in the upper 1 sq. mi) but all the gages I looked at had a COMID associated with it, so I might not be understanding how you apply this filter...maybe your comment about automated search for the best match is why they have associated flowlines?).

In reality there is no flowline for this gage in NHDPlusV2 and we've just fallen back on what's close in all cases.

Does this mean that you would assign this gage to the nearest NHDPlusV2 flowline, even though in this case the gage is not measuring the flow on that flowline? That would explain why I found a lot of drainage area ratios that were enormous and then when I looked at the gage page I saw that the gage was on a tributary of a mapped NHDPlusV2 flowline (so I dropped the gage from my analysis). I would appreciate a column indicating matches like this so that users can inspect sites for their studies as needed.

maybe your comment about automated search for the best match is why they have associated flowlines?

Yes. I double check for automated associations later in the workflow so many of these will come back.

even though in this case the gage is not measuring the flow on that flowline?

Yes -- that's the case. Since the NLDI is focused on discovery, I've been overly generous in the associations. I should probably stop that practice.

I think I've settled on this criteria for now.
  bad_da <- all_gages[!is.na(da_diff) & # has an estimate

                        ((all_gages$drainage_area_sqkm <= 100 &
                            # use unnormalized because differences so quantized
                            # due to catchment resolution.
                            # when da_diff is negative, use within 25%
                            (da_diff > 10 | (da_diff < 0 & abs_norm_diff_da > 0.25))) |

                           # is tens of catchments and within 10%
                          (all_gages$drainage_area_sqkm > 100 &
                             abs_norm_diff_da > (0.1)) |

                           # is hundreds of catchments and within 5%
                           (all_gages$drainage_area_sqkm > 500 &
                             abs_norm_diff_da > (da_diff_thresh / 0.05))), ]

ref_gages will now have:

The new fields include:

nhdpv2_totdasqkm which corresponds to the linked comid
nhdpv2_link_source which gives a url for what project or dataset created the link
gage_totdasqkm which gives the gage provider's estimate of drainage area.
dasqkm_diff which is the absolute difference between the gage and nhdpv2 drainage area.

Looks good! I'd recommend rounding the drainage areas to the precision of the original source (maybe nearest 0.3 km^2 because I think 0.1 mi^2 is the reported precision on NWIS)

for these cases where the gage is on a flowline smaller than is included in the network we are linking to

Are you able to snap to the high-res network and NHDPlusV2 network simultaneously to catch cases like this? I know the high res network is not available everywhere, but seems like this could be useful where it is available

In the future, yes -- right now, no. In cases like we are looking at above -- there isn't a high res flowline either. Seems like the NWIS drainage area might be off by an order of magnitude.

@jds485 would you be able to do a code review for #39 for me?

Sure, I can do that


[346]:...Refactor of datetime and duration test to use assertOK

PR for #346
Refactored:

[x] Datetime InRange and InList method test to use assertOk
[x] Duration InRange and InList method test to use assertOk

@gavv PR ready for review

Coverage: 95.505%. Remained the same when pulling c37c00e29e0293cd8946f8fc36d28030427b0734 on Darrellbor:346-refactor_datetime_to_use_chain_assertok into 1bd520a64629195f78a96c8dad5fd30256e82820 on gavv:master.

Thanks!


fix: add ActivityType.CUSTOM to list of valid activities for bots

Pull Request Type

[ ] Feature addition
[x] Bugfix
[ ] Documentation update
[ ] Code refactor
[ ] Tests improvement
[ ] CI/CD pipeline enhancement
[ ] Other: [Replace with a description]

Description
ActivityType.CUSTOM was missing from the "valid activity check" done when changing presences. This didn't stop the bot from changing the presence, but it did produce an annoying warning. This PR adds it to the check, fixing that warning.
Changes
See description and/or diff.
Related Issues

Test Scenarios
bot = Client(
    ...,
    activity=Activity.create("test", type=ActivityType.CUSTOM, state="Woo, a custom status!"),
)

Python Compatibility

[ ] I've ensured my code works on Python 3.10.x
[x] I've ensured my code works on Python 3.11.x

Checklist

[x] I've run the pre-commit code linter over all edited files
[x] I've tested my changes on supported Python versions
[ ] I've added tests for my code, if applicable
[ ] I've updated / added  documentation, where applicable

Might have to open another pull request though, it's related to this...should we change the function documentation for change_presence to accept custom as-well?

That's a separate PR, but yeah, it's a good idea.


Update iconify extension

Description

Copy SVG File Action: This allows users to copy SVG files directly to the clipboard for use anywhere.
Monochromatic Icon Color Preference: This setting changes the  currentColor to a specified color.

Screencast

Copy SVG File

Finished Copy SVG File

Monochromatic Icon Color

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

@pernielsentikaer
Thanks for the reply.
The Monochromatic Icon Color setting modifies currentColor values within SVG elements. If the Monochromatic Icon Color is set to white,  actions Copy SVG File and Copy SVG String will be updated to reflect this change.

@sxn Please take a look at this PR when you get a chance, thanks!


tools: Make populate_db generate messages like a real realm

Finish the remaining items as described in the issue: add attachment files in messages, links in topics and non-BMP characters in user names.
Fix issue #14991

Fixes:

Screenshots and screen captures:

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

I want to pull into my main first.


Configure Azure Pipelines

This pipeline configuration builds the application and produces a build for the Release configuration.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: mecvillarina sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Fatal error when clearing APCu cache on cli

How to reproduce

Enable and configure apcu
Verify that apc is not running on CLI (apc.enable_cli=0) as will be default on many installations
Stash\Driver\Apc->clear();

Stash will throw the following error:
APC must be enabled to use APCuIterator, thrown from here
I guess this is because the extension/php lib is technically loaded, but not enabled for the current process. Therefore, Stash\Driver\Apc->isAvailable() won't complain since it merely checks for the existence of apc* functions.

Is using ini_get('apc.enable_cli') suitable enough to check this?

It looks like this is a change in behavior from the APC/APCu side of things- originally if it wasn't enabled the functions wouldn't exist, now they exist but throw an error.
This is probably the appropriate response though- it is an error to try and use this functions when they aren't enabled. If we were to suppress the error on the Stash side of things people would end up with stale caches without realizing it. Failing loudly is probably the best thing to do here.

Failing loudly is probably the best thing to do here.

I disagree, mostly because of the "here" detail. If it should fail loudly, it should do so earlier Apc->isAvailable() exists for this reason and a
if ( PHP_SAPI === 'cli' && ! ini_get( 'apc.enable_cli' ) ) {
   return false;
}

as suggested by @alexbowers might be enough to steer around this problem (don't quote me on this, it'd just be my quick workaround) .
Wouldn't you expect Apc->isAvailable() to tell you that the driver (and caching backend) is ready to use? In this case, it passes this check, and still blows up later. Keep in mind that it is only throwing an error if Apc->clear() is called with a $key parameter. All other methods will work as expected (albeit assumedly silently failing on the apcu_* functions). So if you rarely use group invalidation (which I think is what is supposed to happen here), you would not even realize there is a problem.
You could say that APCuIterator is the only one brave enough to go ahead and complain here, while the apcu_* functions just sit there twisting their thumbs. In any case, it seems to me like Apc->isAvailable() should return false if you're on cli and apcu is not enabled on cli.

This seems like an appropriate fix.
Are you able to PR it @Biont ?


x11: Do not use uninitialized timestamps.

Fixes #76922

Thanks! And congrats for your first merged Godot contribution :tada:


Add CloudFoundry service bindings

Description
Similar to the approach in #1081, but for CloudFoundry instead of K8s. The first commits cleanup the K8s implementation, the last one adds the CF parts and moves some parts for sharing.
Quality checklist

[x] Your code complies with our Coding Style.
[x] You've updated unit and/or integration tests for your change, where applicable.
[ ] You've updated documentation for your change, where applicable.
If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
[ ] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
[ ] You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

/azp run Steeltoe.All

Update: In addition, this PR:

Runs post-processors by default (used to be opt-in)
Changes the post-processor output keys from "steeltoe:postgresql:..." to "steeltoe:service-bindings:postgresql:..."
Fixed: Make configuration key comparisons case-insensitive in tests


fixed package.json syntax

+1, please merge this PR :)

seems like it can be closed (0baf1cdf428bc510aaee8e200f9a4a76a8f67210)

Yea, he could have merged this PR... i will close it.


When a reactive consumer throws an exception, the consumer stops reading messages

Describe the issue
Consider a reactive consumer which for some unexpected reason any operator on the reactive chain throws an unexpected exception.
When it happens the consumer stops reading the following messages and throws the following exception:
ERROR 22728 --- [           main] o.s.integration.handler.LoggingHandler   : org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel 'application.consumer-in-0'.; nested exception is org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribers, failedMessage=GenericMessage [payload=org.jordi.springcloudstream.model.Person@10cb050, headers={id=7177a568-bcf9-8d73-82e9-713addda2c41, contentType=application/json, timestamp=1664288183033}], failedMessage=GenericMessage [payload=org.jordi.springcloudstream.model.Person@10cb050, headers={id=7177a568-bcf9-8d73-82e9-713addda2c41, contentType=application/json, timestamp=1664288183033}]
	at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:76)
	at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:317)

Furthermore, at least with kafka, the offset advances and the message will not be read any more.
To Reproduce
Steps to reproduce the behavior:
Consider the following reactive consumer:
public class ReactivePersonConsumer implements Function<Flux<Person>, Mono<Void>> {

@Autowired
  private Trasnformer transformer;

  @Override
  public Mono<Void> apply(final Flux<Person> flux) {
    return flux.map(this.transformer::transform)
        .then();
  }
}

If transformer::transform throws any exception. The consumer stops reading the following messages.
In order to check the behaviour, you can run the following test:

@SpringBootTest(properties = "spring.cloud.function.definition=consumer")
class ReactiveTest {

  @Autowired
  private InputDestination input;

  @SpyBean
  private Trasnformer transformer;

  @Test
  void exceptionInReactiveConsumerStopsConsumption() {

    Mockito.doThrow(new IllegalArgumentException("oh oh!"))
        .when(this.transformer).transform(Mockito.any());

    // First attempt
    this.input.send(MessageBuilder.withPayload(new Person("Doe")).build(), "consumer-in-0");

    // Although the consumer throws an exception, the assertion does not fail because it has been called
    Mockito.verify(this.transformer).transform(Mockito.any());

    Mockito.reset(this.transformer);

    // Second attempt
    this.input.send(MessageBuilder.withPayload(new Person("Doe")).build(), "consumer-in-0");

    // Fails!! MessageDispatchingException: Dispatcher has no subscribers
    Mockito.verify(this.transformer).transform(Mockito.any());

  }

  @SpringBootApplication
  @Import(TestChannelBinderConfiguration.class)
  static class SampleConfiguration {

  }
}

I have attached a project with the test.
The behavior also can be observed running the project (which uses the kafka binder) and sending a couple of request to http://localhost:8080/send, which sends a message to the failing consumer.
Version of the framework
Spring Boot version: 2.7.4
Spring cloud version: 2021.0.4
Expected behavior
The expected behavior would be that the following messages received after the failed message, will be read with normality.
Additional context
It seems that this behavior is due to that the terminal signal produced at the reactor chain is propagated to the upstream, that is the flux where the message from the binder are injected.
I guess that one way to solve the issue would be not propagating the terminal sign to the upstream. For example, in the consumer shown above, one possible solution would be something like:
return flux
        .flatMap(p -> Flux.just(p)
            .map(this.transformer::transform)
            .onErrorContinue((t, o) -> {
              //Treat the exception here
            }))

        .then();

But from my point of view, I think that would be the best that Spring Cloud Stream would avoid the terminal signal propagation to the original flux.
spring-cloud-stream.zip

Yes, that is exactly what is expected from user and is a known concern.
I agree, it would be best for SCSt to handle it, but unfortunately we have absolutely no view into reactive implementation of such function.
There is a fundamental difference between reactive and imperative function.
Imperative function is a message handler that is invoked by the framework on each message it receives. So for N messages there will be N invocations and because of that we can wrap and add additional functionality such as error handling, retries etc.
Reactive function is initialization function. It is invoked only once to get a reference to a Flux/Mono provided by the user to be connected with the one provided by the framework. After that we have absolutely no visibility nor control. In other words in theory you can disconnect the entire SCSt framework from the process as at that time it plays no role at all.
So, i'll close it as there is nothing to do.
In the event you do have some ideas/suggestions please submit a PR so we can review


chore: release main

:robot: I have created a release beep boop
accesskit_atspi_common: 0.1.1
0.1.1 (2024-02-24)
Bug Fixes

Add missing README (#357) (e8cf48e)

accesskit_c: 0.7.3
Dependencies

The following workspace dependencies were updated

dependencies

accesskit_unix bumped from 0.7.2 to 0.7.3

accesskit_python: 0.1.4
Dependencies

The following workspace dependencies were updated

dependencies

accesskit_unix bumped from 0.7.2 to 0.7.3

accesskit_unix: 0.7.3
Dependencies

The following workspace dependencies were updated

dependencies

accesskit_atspi_common bumped from 0.1.0 to 0.1.1

accesskit_winit: 0.18.3
Dependencies

The following workspace dependencies were updated

dependencies

accesskit_unix bumped from 0.7.2 to 0.7.3

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/AccessKit/accesskit/releases/tag/accesskit_atspi_common-v0.1.1 :sunflower:

:robot: Release is at https://github.com/AccessKit/accesskit/releases/tag/accesskit_unix-v0.7.3 :sunflower:

:robot: Release is at https://github.com/AccessKit/accesskit/releases/tag/accesskit_c-v0.7.3 :sunflower:

:robot: Release is at https://github.com/AccessKit/accesskit/releases/tag/accesskit_winit-v0.18.3 :sunflower:

:robot: Release is at https://github.com/AccessKit/accesskit/releases/tag/accesskit_python-v0.1.4 :sunflower: