New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Braille doesn't refresh when downloading update #6862
Comments
Isn't this a more generic issue (i.e. I recall braille not being updated
on progress bars as well, but I could be wrong in that).
|
That is true, see #3258. But this is a scenario where it actually matters and can be reproduced. |
This is discussed in the last few comments of #3258. I'm going to close that issue in favour of this one, since #3258 is quite confusing now. First, if a progress bar updates, braille does get updated if that progress bar is the current focus/review object (depending on tethering). Regarding the update dialog, here are the relevant comments from #3258:
It's worth noting that we can't just recalculate part of dialog text at present; it's all or nothing. That said, I guess it's reasonable to hope that there might be some text associated with the progress bar in a dialog. If a progress bar changes and has a dialog as a parent (or maybe we could check a small number of ancestors), I guess we could update the dialog's braille region, though we'd probably want to limit it to every 10% or every 5 seconds or something like that. |
For the delay we could use whatever the spoken progress bar messages use. |
Unless I'm reading this wrong, braille is already updated whenever a progress bar changes value, see So should we introduce periodic updates for progress bars and then update the whole buffer if that object has a dialog as ancestor? Or do we update on every value change as is done now? |
You're correct: it does update for progress bars. However, in this case,
there is no region for the progress bar at all, since you're not focused on
it/reviewing it, nor is it an ancestor of the focus. So, that update is
essentially a no-op.
You don't need (or want) to update the whole buffer if there's a dialog
ancestor. Just update braille for the dialog. That will cause dialog text
to be re-calculated.
Calculating dialog text is very expensive (it has to crawl the whole
dialog), so updating it too often would be a performance problem, hence the
suggestion to rate limit it. Some progress bars fire a huge number of value
changes.
|
One final question: should I traverse the ancestors using |
On second thought, the most logical solution seems to work up from the progress bar until its parent dialog is found, then request an update for that. Working up from the focus could lead to an unrelated dialog being update if a progress bar somewhere else on the screen fires. Or does that make no sense? Is it expensive to fetch parents? My code currently doesn't have a stop criterion, so it goes all the way to desktop. That's probably not a good idea. Will open a PR for the real reviewin'. :) |
This is a specific case of braille not refreshing when the foreground dialog refreshes. Usually these dialogs have static text or a progress bar that can't be focused but that is updated at intervals.
In the case of downloading NVDA updates, braille keeps showing "Remaining: 0:00:00". Same for the time left.
The text was updated successfully, but these errors were encountered: