pixiebrix-extension icon indicating copy to clipboard operation
pixiebrix-extension copied to clipboard

Bricks receive a green badge in page editor before they're done (and might turn red instead)

Open fregante opened this issue 3 years ago • 5 comments

This is particularly problematic when running long-running tasks in other tabs, which seems to pass but then throw an error.

Barebones repro

https://user-images.githubusercontent.com/1402241/172115831-c45b3829-a0a0-4c99-ae38-370f977d3a95.mov

Possible solution

Show "in progress" gray badge while bricks are in progress

Related

  • https://github.com/pixiebrix/pixiebrix-extension/pull/1587

cc @BALEHOK

fregante avatar Jun 06 '22 07:06 fregante

Show "in progress" gray badge while bricks are in progress

Would need to implement a check for a trace record with entry data, but no exit data

Related Code:

  • https://github.com/pixiebrix/pixiebrix-extension/blob/f4078e31f4927918e4c95c8ad8f18a42025794c3/src/pageEditor/tabs/editTab/editorNode/EditorNode.tsx#L85-L85

twschiller avatar Jun 06 '22 12:06 twschiller

Fixed as part of 1.7.0

twschiller avatar Jun 15 '22 03:06 twschiller

The behavior slightly changed, but the error mentioned in the title is still reproducible:

https://user-images.githubusercontent.com/1402241/182134311-dc0f5b30-635a-4035-b3ff-7dcb1f16fece.mov

The main changes are that:

  • the entry point does not turn green until the first brick finishes
  • the UI isn't updated at all unless there's a second brick (like Window Alert)

fregante avatar Aug 01 '22 11:08 fregante

Possible solution

Show "in progress" gray badge while bricks are in progress

I suppose this is tracked in:

  • https://github.com/pixiebrix/pixiebrix-extension/issues/3751

This would also be nice because there's no feedback at all in some cases. This screencast also shows the same bug happening for Sidebar Panels:

https://user-images.githubusercontent.com/1402241/182134684-bbedbf5b-3919-4fc5-88e7-77fc2a5a2d37.mov

fregante avatar Aug 01 '22 11:08 fregante

the entry point does not turn green until the first brick finishes the UI isn't updated at all unless there's a second brick (like Window Alert)

This is a limitation with our current trace schema. We don't currently create trace records for the foundation (partly because they don't have a block instance id). So the Page Editor looks for any "entry" trace record to determine if the extension started running or not

twschiller avatar Aug 03 '22 23:08 twschiller

Closing - the bug mentioned is no longer happening, and the progress indicator is added in another issue/PR: https://github.com/pixiebrix/pixiebrix-extension/pull/5138

twschiller avatar Feb 04 '23 20:02 twschiller