Skip to content

Commit

Permalink
Allow branch labels from second tree
Browse files Browse the repository at this point in the history
Branch labels were already rendered correctly on the RHS tree if the key
was present in the LHS tree, so all that's required is to add label keys
which are only observed in the RHS tree to appear in the sidebar branch
label selector.

Closes #1780
  • Loading branch information
jameshadfield committed Jun 17, 2024
1 parent 5d29e97 commit 7685fb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/controls/choose-branch-labelling.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import Toggle from "./toggle";
@connect((state) => ({
selected: state.controls.selectedBranchLabel,
showAll: state.controls.showAllBranchLabels,
available: state.tree.availableBranchLabels,
available: Array.from(
(new Set(state.tree.availableBranchLabels))
.union(new Set(state.treeToo?.availableBranchLabels ?? []))
),
canRenderBranchLabels: state.controls.canRenderBranchLabels
}))
class ChooseBranchLabelling extends React.Component {
Expand Down

0 comments on commit 7685fb2

Please sign in to comment.