HomePhabricator

Add custom behavior to the CellTruncationProvider

Authored by prha on Aug 15 2019, 4:28 PM.

Description

Add custom behavior to the CellTruncationProvider

Summary:
The CellTruncationProvider could only show raw text in a dialog
because it only had access to generated DOM, instead of react elements. This
diff adds an event handler to the CellTruncationProvider to allow for customized
expansion behavior (when a user clicks on 'View Full Message').

This diff pushes the CellTruncationProvider down into a new <LogsRow />
component, which has branching behavior based on the event node type. The
original structured content rendering logic was extracted into a separate
component (LogsRowStructuredContent), so we can render the exact same content
in the truncated table view as well as the unabridged modal view.

CellTruncationProvider becomes a little more generic (no longer tied to the
structure of the rendered DOM) at the expense of forcing each event type to
consider the truncated view flow.

Issue: https://github.com/dagster-io/dagster/issues/1660
Related Issue: https://github.com/dagster-io/dagster/issues/1623

Test Plan:
Rendered Unstructured, Failure, Materialization events, resized window,
triggered the 'View Full Message' link.

Reviewers: #ft, bengotow

Reviewed By: bengotow

Subscribers: alangenfeld

Differential Revision: https://dagster.phacility.com/D819

Details

Committed
prhaAug 15 2019, 7:10 PM
Reviewer
bengotow
Differential Revision
D819: Add custom behavior to the CellTruncationProvider
Parents
R1:ba17c716e752: Promote some step events to INFO
Branches
Unknown
Tags
Unknown