reactflow
v11 migration and fixes for GitGraph
#1080
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
GitGraph
component relies ondagre
for calculating layout for acyclic digraphs, andreact-flow-renderer
(renamed toreactflow
for v11) for rendering the nodes and edges. The state of these graphs are managed outside of Redux using a custom React Hook calleduseGitGraph
.However, no graph is generated when selecting a branch from the
Repository Map
drop-down menu, with the root cause being a two-fold issue. TheBranch
models stored in Redux contained no commits due to a Regex pattern mismatch, and invalidNode
objects were being created when a processedEdge
contains anundefined
endpoint.This PR introduces validation checks for edges before they are added to the graph, and updates the Regex patterns for parsing
git-log
,git-rev-parse
, andgit-rev-list
output to properly capture commits.This PR resolves #988.
Changes:
This PR makes the following changes:
react-flow-renderer
v10 toreactflow
v11oid
values prior to adding edges in aGitGraph
git-log
output*
revParse
return type expanded toPromise<string | undefined>
to properly model when thegit-rev-parse
command returns{ stdout: undefined, stderr: undefined }
.git-flow
CSS class sincereactflow
Theming allows for style propsstring
instead ofDateTime
objects in the storeborder-radius
CSS attributes to scrollbars inCard
component content to fix display issues when a square scrollbar appears on a rounded corner of a card