phoenix_storybook icon indicating copy to clipboard operation
phoenix_storybook copied to clipboard

Event log in the component playground

Open cblavier opened this issue 2 years ago • 0 comments

In the component Playground a new tab (next to the Attributes tab) should be available for all components.

This tab will print, in a <pre>...</pre> monospace font fashion:

  • all messages (handle_info & handle_event) received by the component
  • all messages (handle_info & handle_event) received by the parent LiveView (PlaygroundPreviewLive) excepted the {:new_attributes, pid, attrs} which is for internal use
  • all messages are prefixed with the recipient (component or Liveview)
  • all messages are prefixed with their kind (info or event)

If messages are received when the Logs tab is not active, a badge will appear next to the tab name with the number of unread logs. The badge is cleared as soon as the tab is opened.

cblavier avatar Aug 19 '22 11:08 cblavier