Get rid of cards on branches page

080e0c2b19c07646b20e35381ddf9795675a7244

Tucker McKnight <tmcknight@instructure.com> | Wed Feb 04 2026

Get rid of cards on branches page

I think the page will get too long if every branch has a card. People
may have a lot of branches eventually.
js_templates/branches.ts:13
Before
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

42
43
44
45
46
  const branchesFullyMerged = data.branches.filter(branch => branch.ahead === 0)

  const branchCards = (branches) => {
    return m('div', {class: "d-flex flex-wrap"}, branches.map((branch) => {
      return branch.repoName === data.branchInfo.repoName
        ? m('div', {class: "card bezel-gray m-2 flex-grow-1", style: "flex-basis: 20rem; max-width: 20rem;"}, [
            m('div', {class: "card-header"}, [
              m('a', {
                class: "card-title",
                href: `${data.reposPath}/${slugify(branch.repoName)}/branches/${slugify(branch.branchName)}/branches`
              }, branch.branchName),
              branch.branchName === data.branchInfo.branchName
                ? m('div', {class: "badge rounded-pill bg-secondary mx-1"}, 'current') : null,
              branch.branchName === data.reposConfig.repos[branch.repoName].defaultBranch
                ? m('div', {class: "badge rounded-pill bg-info text-dark mx-1"}, 'default') : null,
            ]),
            m('div', {class: "card-body"}, [
              m('p', branch.description || ''),
              m('p', [
                `${branch.ahead} commits ahead, ${branch.behind} commits behind `,
                m('span', {class: "font-monospace"}, branch.compareTo)
              ])
            ]),
            m('div', {class: "card-footer"},
              m('a', {
                class: "m-1 btn btn-outline-primary shadow-none",
                href: `${data.reposPath}/${slugify(branch.repoName)}/branches/${slugify(branch.branchName)}/branches`
              }, 'Switch to branch')
            )
          ])
⁣
        : null
      })
    )
  }

  return render([
After
12
13
14
15
16
17

18

19
20
21
22
23
24

25

26
27
28

29




30

31
32
33

34
35
36
  const branchesFullyMerged = data.branches.filter(branch => branch.ahead === 0)

  const branchCards = (branches) => {
    return m('ul', branches.map((branch) => {
      return branch.repoName === data.branchInfo.repoName ?
        m('li', [
⁣
          m('a', {
⁣
            href: `${data.reposPath}/${slugify(branch.repoName)}/branches/${slugify(branch.branchName)}/branches`
          }, branch.branchName),
          branch.branchName === data.branchInfo.branchName
            ? m('div', {class: "badge rounded-pill bg-secondary mx-1"}, 'current') : null,
          branch.branchName === data.reposConfig.repos[branch.repoName].defaultBranch
            ? m('div', {class: "badge rounded-pill bg-info text-dark mx-1"}, 'default') : null,
⁣
          m('ul', [
⁣
            m('li', [
              `${branch.ahead} commits ahead, ${branch.behind} commits behind `,
              m('span', {class: 'font-monospace'}, branch.compareTo)
⁣
            ]),
⁣
⁣
⁣
⁣
            branch.description ? m('li', branch.description) : null
⁣
          ]),
        ])
      : null
⁣
    }))
  }

  return render([