Skip to content

v1.9.0-beta.1: Breakdown categories (test build)

Pre-release
Pre-release

Choose a tag to compare

@Kit-p Kit-p released this 11 Sep 04:06
· 11 commits to feat/breakdown-categories since this release

Test build of the breakdown categories feature. Not a store release: install it manually as described below, and disable the store version of the extension while testing so the counts are not replaced twice.

What's new

  • Breakdown on hover. Hover over the line counts on a pull request, commit, or compare page to see a card with a proportion bar and one row per category (tests, CI/CD, infrastructure, configs, docs by default), then "Other" and "Generated". The breakdown never changes the counts themselves.
  • Custom categories. The options page has a new "Breakdown" section: add, rename, reorder (drag or arrows), recolor, and give each category its own glob patterns. Files match top to bottom, first match wins.
  • Pattern rules for both the generated list and the categories now follow .gitignore conventions: match at any depth unless anchored with /, a trailing / matches a directory, blank lines and # comments are ignored.
  • Toolbar button that opens the options page.

Fixes included

  • Public repos work without a personal access token (an empty token used to fail every request).
  • Commit pages target the overall count instead of the first file's count.
  • Compare pages work for branch names containing slashes and for cross-fork comparisons.
  • Counts use thousands separators like GitHub ("2,015").
  • Options page renders correctly in Firefox.

Install

Chrome / Edge / Brave

  1. Download and unzip github-better-line-counts-1.9.0-beta.1-chrome.zip.
  2. Open chrome://extensions, turn on Developer mode, click Load unpacked, and select the unzipped folder.

Firefox

This build is not signed by Mozilla, which limits how it can be installed:

  • Any Firefox, temporary: open about:debugging#/runtime/this-firefox, click Load Temporary Add-on…, and select github-better-line-counts-1.9.0-beta.1-firefox.xpi. The add-on is removed when Firefox quits; load it again after a restart.
  • Developer Edition, Nightly, or ESR, permanent: in about:config set xpinstall.signatures.required to false, then in about:addons use the gear menu, Install Add-on From File…, and select the .xpi.
  • Regular Firefox and Beta refuse unsigned add-ons, so only the temporary route works there.

What to test

  • Hover the counts on a few PRs, single commits, and compare pages, including repos with lockfiles or other generated files.
  • Change, reorder, add, and remove categories in the options page, save, and reload a PR to see the effect.
  • Try both light and dark GitHub themes.

Please report problems at https://github.com/Kit-p/github-better-line-counts/issues.

Built from c53bb21 on feat/breakdown-categories. The version was set to 1.9.0-beta.1 for this build only; package.json on the branch is unchanged. The Firefox build declares the add-on id github-better-line-counts-beta@kit-p.github.io.