2047 Commits

Author SHA1 Message Date
Guy Pursey
bf52e76a39 GitGraph: Moved branch curve check to within reroute check fn
Based on review by @nirname. I had originally been trying
to minimise number of new arguments being passed to
rerouting check but as the branch curve check is not used
elsewhere and is part of the same rerouting check it makes
sense for them to be together.

Position information now passed to rerouting fn instead.
2023-10-31 17:24:13 +00:00
Guy Pursey
31a8e040fa GitGraph: corrected minor typo in comment. 2023-10-31 17:24:13 +00:00
Guy Pursey
0555368e1c GitGraph: added branch checking to rerouting
Hypothesised that working out which branch needed checking for
overlapping commits might be missing, so added that as a
nested ternary and passed result as new argument to rerouting
check.

If commits are found on the branch which will be getting the
curve (whichever branch is lower or more to the right of main
than the other, for now), then the arrow will be rerouted.

I may refactor in a follow-up commit and I think there's scope
to simplify the logic but this is a test for now.
2023-10-31 17:24:13 +00:00
Guy Pursey
3e18e76d31 GitGraph: removed check of branch with main from arrow reroute fn
Checking if branch was same as main turned out to be redundant
for now, since there don't seem to be any cases where routing
curves into main.

This fixes issue found in review by @nirname and avoids a
situation where branching from the same commit results in
unnecessary rerouting.
2023-10-31 17:24:13 +00:00
Guy Pursey
7c87df7cf6 GitGraph: rename overlap check to shouldRerouteArrow
The function also now does an additional check to see
if source branch in overlap check is on main.

As we're no longer purely checking for an overlap and
the only use of this function is to reroute the arrows
to avoid running over commits, this more literal name
should be clearer.
2023-10-31 17:24:13 +00:00
Guy Pursey
dba7197fc6 GitGraph: simplified overlapping check fn 2023-10-31 17:24:13 +00:00
Guy Pursey
461a293d71 GitGraph: refactored overlapping fn for efficiency/performance
On previous rewrite, I had created new functions within the
overlapping functions but these were being recreated on each
iteration of Object.some(). I moved them outside this for
clarity and so they're not recreated each iteration.
2023-10-31 17:24:13 +00:00
Guy Pursey
9f8457d249 GitGraph: Rewrote overlap fn to make main branch exception to rule. 2023-10-31 17:24:13 +00:00
Guy Pursey
8c43d2273f GitGraph: added destination branch check into overlapping fn. 2023-10-31 17:24:13 +00:00
Guy Pursey
9469f759a9 GitGraph: Moved overlapping commit arrow colour inside conditional 2023-10-31 17:24:13 +00:00
Guy Pursey
4787bb07df GitGraph: corrected object method in hasOverlappingCommits 2023-10-31 17:24:13 +00:00
Guy Pursey
33050e1812 GitGraph: Update variable names in drawArrow fn 2023-10-31 17:24:13 +00:00
Guy Pursey
6dc8e58b47 GitGraph: Refactor hasOverlappingCommits function
Changed argument names from commit1 and commit2 to
commitA and commitB respectively to prevent confusion
with seq number values.

Replaced Array filter method with array some method
so that as soon as one overlap is found, function is
finished.

Used Object.entries instead of Object.keys to reduce
number of variables needed and make function easier
to read.
2023-10-31 17:24:13 +00:00
Guy Pursey
d9daf19055 GitGraph: Correct commit variable in overlap check.
Originally, the function was checking if any commits were on the
same branch as `commit2`, the destination commit.

However, in order to avoid a conflict, we should only need to
check whether any commits are on the same branch as `commit 1`.

Updated and moved commenting as well.
2023-10-31 17:24:13 +00:00
Guy Pursey
f42cec282a GitGraph: Add check for direction of merge arrow to determine colour. 2023-10-31 17:24:13 +00:00
Sidharth Vinod
77667b94d3
Merge pull request #4975 from mermaid-js/add-docusaurus
Docs: add Docusaurus to "Integrations - Community" page
2023-10-31 06:42:09 +00:00
renovate[bot]
e8a04faa36
chore(deps): update all patch dependencies 2023-10-31 06:13:41 +00:00
Alex Titarenko
e98aa55577 docs: upate the list of tools with native support of mermaid 2023-10-27 18:58:30 -07:00
Knut Sveidqvist
29942c04dc Updated mermaid version 2023-10-25 11:07:12 +02:00
Knut Sveidqvist
fc28c1da63 Limiting the number of edges that are allowed in the flowchart 2023-10-25 11:06:37 +02:00
steph
bc247b1d46 add docusaurus to community integrations 2023-10-22 14:18:41 -07:00
Remco Haszing
ab9b9abdf9
Replace rehype-mermaidjs with rehype-mermaid
The package was renamed.
2023-10-20 16:55:01 +02:00
Knut Sveidqvist
d32c18a43c Merge branch 'master' into develop 2023-10-20 14:33:07 +02:00
Knut Sveidqvist
b70959daa7 Version 10.5.1 2023-10-20 14:30:52 +02:00
Per Brolin
aaf0b474d4 Increased version to 10.5.1 2023-10-20 14:18:07 +02:00
Knut Sveidqvist
61bc293a95 #4967 Reverting optimimization that breaks subgraphs 2023-10-20 11:12:56 +02:00
renovate[bot]
e4350f80fe
chore(deps): update all patch dependencies 2023-10-16 19:52:01 +00:00
Sidharth Vinod
7eac75c15c
Merge pull request #4928 from mribeirodantas/fix-minor-typos
fix(typos): Fix minor typos in the source code
2023-10-16 14:00:27 +00:00
Alois Klink
d04f4c27fc
Merge pull request #4889 from dreathed/bug/4345_bundle_current_config_consitently_in_one_file
making consitent config imports from diagramAPI
2023-10-15 22:54:10 +00:00
Marcel Ribeiro-Dantas
9080f1f354
Revert typo fix 2023-10-12 01:33:25 -03:00
Marcel Ribeiro-Dantas
4b8441a1a0
Prettify table 2023-10-12 01:27:08 -03:00
Marcel Ribeiro-Dantas
00b38c55e9
Merge branch 'develop' into fix-minor-typos 2023-10-11 16:43:47 -03:00
Marcel Ribeiro-Dantas
ab2345093e
Revert error typo fix 2023-10-11 16:41:04 -03:00
Sidharth Vinod
d1b386b5c9
Revert PH changes (#4903) 2023-10-11 11:32:24 +05:30
Mr.Hope
444e81ae8a
fix(class): avoid duplicate definition of fill 2023-10-09 11:08:46 +08:00
Hans Blankenhaus
497ffde9fe undo changes for commonDb to avoid circular imports 2023-10-08 18:22:27 +02:00
Hans Blankenhaus
01203d884c fix classDB 2023-10-08 15:32:40 +02:00
Hans Blankenhaus
846fb3f8f8 making consitent config imports from diagramAPI 2023-10-08 14:17:45 +02:00
Marcel Ribeiro-Dantas
30b3e6213f
fix(typos): Fix minor typos in the source code
Signed-off-by: Marcel Ribeiro-Dantas <mribeirodantas@seqera.io>
2023-10-07 22:16:11 -03:00
Nikolay Rozhkov
f346c3f511
Merge branch 'develop' into patch-1 2023-10-06 12:42:56 +03:00
Nikolay Rozhkov
3a0ce43252
Merge branch 'develop' into feature/4269_add_xychart 2023-10-05 14:44:55 +03:00
Guy Pursey
97487acbc3 Updated GitGraph doc amendment based on feedback in PR. 2023-10-05 12:13:12 +01:00
Guy Pursey
395ee5ef06 Update notes on orientation in GitGraph documentation
Attempt to make the documentation around left-right and top-down orientation clearer than it currently is, addressing issue #4885.
2023-10-04 15:37:50 +01:00
Sidharth Vinod
1d9ce74f64
Merge branch 'master' into develop
* master:
  Update docs
  Fix lint issue
  Fix release version
  Fix TopBar
  Add MC to integrations
  Add TopBar
  Docs: Add Product Hunt info (#4900)
2023-10-04 14:36:31 +05:30
Sidharth Vinod
345d0d0bd2
Fix lint issue 2023-10-04 14:26:03 +05:30
Sidharth Vinod
f49e8c5784
Fix release version 2023-10-04 14:19:19 +05:30
Sidharth Vinod
a6bb1ea28c
Fix TopBar 2023-10-04 14:09:34 +05:30
Sidharth Vinod
cda7a61526
Add MC to integrations 2023-10-04 14:07:08 +05:30
Sidharth Vinod
d17c752229
Add TopBar 2023-10-04 14:06:43 +05:30
Steph
459f5a58a3
Docs: Add Product Hunt info (#4900)
* update card and announcements page

* update integrations link and add product hunt badge

* Revert navbar link change

---------

Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
2023-10-04 07:32:30 +00:00