Conversation
025b9ce to
b6db9fe
Compare
|
I haven't looked at this in depth quite yet, but how are highlights now consistently brought to the front to fix the z-ordering issue, and does this introduce any problems with keyboard navigation? I remember digging into this before and I found that the standard Edit: Ah, #8981 was the one that may have made this work. I'm still curious about the first part, though, because I don't see |
BenHenning
left a comment
There was a problem hiding this comment.
Other than my specific concerns on focus this seems like an excellent simplification.
| @@ -332,6 +332,7 @@ export class RenderedConnection | |||
| const highlightSvg = this.findHighlightSvg(); | |||
| if (highlightSvg) { | |||
| highlightSvg.style.display = ''; | |||
| highlightSvg.parentElement?.appendChild(highlightSvg); | |||
There was a problem hiding this comment.
This might cause focus loss problems. I'm also curious why this is necessary--shouldn't the highlight SVG already be properly parented since it exists in the DOM at this stage?
Or is this the means to try and 'bring it to front'?
There was a problem hiding this comment.
Yes, this is the means to bring it to the front. Experimentally, there don't appear to be any focus issues, I think because the highlight SVG is not itself the thing that has focus; I was able to move blocks using keyboard nav and Zelos and it behaved as expected.
There was a problem hiding this comment.
Wait that's slightly confusing as well. The highlight SVG should definitely hold focus but perhaps this case isn't hit today because we can't actually navigate to the connections themselves. I wonder if focus would still behave correctly if we temporarily re-added connections to possible navigable locations.
There was a problem hiding this comment.
I don't think that makes a difference; the highlight SVG is the focusable element for the connection, but this is run in two situations: when the connection is being highlighted as a potential connection point, in which case the focused thing is the block being dragged, or in response to onNodeFocus() being called, which the focus manager invokes prior to actually focusing the element, so the DOM shuffle happens before focus gets assigned.
d2edd04 to
98f3648
Compare
|
Sorry this dropped off my radar @gonfunko. Just followed up to the comment thread. It also seems like CI is failing--might be worth taking a look in case there are any issues with the PR changes. |
|
@BenHenning No worries, I also replied in the thread just now. CI failures are across all of v13, the closure compiler dep just needs to be updated. |
The basics
The details
Resolves
Proposed Changes
This PR cleans up Zelos' display of proposed connection indicators. Previously, proposed input connections indicators had three possible appearances:
Fuzzy, when an existing block would be replaced
Normal, when a block would be connected to an empty input
Skinny, same circumstances as above but when the highlight ring happened to be z-ordered below the fill for the input slot.
Likewise, next/previous connection indicators could appear normal, or partially obscured by the insertion marker depending on the whims of z-ordering:
Now:
BlockSvg.highlightShapeForInput()has been removed, as it was internal and had no callers.Breaking Changes
REPLACEMENT_GLOW_COLOUR,REPLACEMENT_GLOW_SIZE, andreplacementGlowFilterIdhave been removed fromBlockly.zelos.ConstantProvider. References to these fields should be removed; the appearance of the connection indicator can be styled with CSS targeting.blocklyHighlightedConnectionPath.IPathObject.updateReplacing()has been added; this method is optional and the rootPathObjectdefines it by simply toggling a class, so this should not strictly be breaking, but custom renderers may wish to implement/override it.