-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to React 17 * Update network diagram canvas to use `componentDidUpdate` instead of `componentWillReceiveProps` The latter has been deprecated and will stop working in React 18 * Update network diagram entity viewer to avoid `componentWillReceiveProps` The `EntityViewer` component displays a list of fields for the following entity properties: 1. Feature properties (no matter whether the property has a value or not) 2. Properties with at least one value 3. Properties manually added by the user using the "Add a property" select The previous implementation kept a list of all visible properties (1-3) in the component state. It used the `componentWillReceiveProps` hook to reset this list when a user selected a different entity. The new implementation keeps only the selected properties (3) in the component state. Featured and non-empty properties (1+2) can be derived from the `entity` property at render time. In order to reset the list of selected properties when the user selects a different entity, we use the entity ID as a key. When the entity ID changes, React instantiates a new component (with fresh state) rather than reusing the component rendered for the previous entity. * Compute schema properties at render time The previous implementation computed this once when the component is instantiated, this type of state is a common source of bugs. The new implementation computes the list at render time which has a small, but negligible overhead, and is simpler. * Replace `react-truncate` with a CSS-only implementation … as `react-truncate` hasn’t been updated for a long time and is incompatible with React 17+.
- Loading branch information
1 parent
36a885b
commit 3c154e3
Showing
9 changed files
with
167 additions
and
19,984 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.Summary__truncate { | ||
display: -webkit-box; | ||
-webkit-line-clamp: 2; | ||
-webkit-box-orient: vertical; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters