Skip to content

Commit 8eadd12

Browse files
authored
feat: release-ready flutter_border_beam (#1)
Ports the border-beam React library (v1.4.0) to Flutter and readies the package for its first pub.dev release. - Value-object API: BeamStyle, BeamShape, BeamTiming, BeamPlayback, all-nullable so omitted fields inherit - Five variants, eleven palettes, superellipse and arbitrary contours, partial segments - BeamSync, BorderBeamController, driven progress/follow, BeamDecoration and the three interaction wrappers - Tests 161 -> 1197, including seven golden families and a spec-parity check against vendored upstream - CI, OIDC release publishing, Pages deploy of the playground, community docs Renames the package border_beam -> flutter_border_beam and moves it to SimplifyJobs.
2 parents 21b75c7 + 292bb4e commit 8eadd12

223 files changed

Lines changed: 38432 additions & 1728 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Code owners are requested for review automatically on every PR.
2+
# A GitHub team (e.g. @SimplifyJobs/mobile) can replace the individual owner
3+
# once one exists — teams survive people changing roles.
4+
5+
* @rehmatsg
6+
7+
/.github/ @rehmatsg
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Bug report
2+
description: Something renders, animates, or behaves incorrectly.
3+
title: "[bug]: "
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for the report. If you can reproduce it in the
10+
[live playground](https://simplifyjobs.github.io/flutter_border_beam/),
11+
paste the share link — it carries the exact configuration and saves
12+
everyone a round trip.
13+
14+
Security issues do **not** belong here — see
15+
[SECURITY.md](https://github.com/SimplifyJobs/flutter_border_beam/blob/main/SECURITY.md).
16+
17+
- type: textarea
18+
id: description
19+
attributes:
20+
label: What happened
21+
description: A short description of the bug.
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: repro
27+
attributes:
28+
label: Minimal reproduction
29+
description: >-
30+
The smallest widget tree that shows the problem — ideally one that
31+
drops straight into a fresh `flutter create` app. A playground share
32+
link works too.
33+
render: dart
34+
placeholder: |
35+
BorderBeam.rotate(
36+
colors: BeamColors.ocean,
37+
child: const SizedBox(width: 240, height: 120),
38+
)
39+
validations:
40+
required: true
41+
42+
- type: textarea
43+
id: expected
44+
attributes:
45+
label: Expected behavior
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
id: actual
51+
attributes:
52+
label: Actual behavior
53+
validations:
54+
required: true
55+
56+
- type: input
57+
id: variant
58+
attributes:
59+
label: Variant(s) and palette
60+
description: Which `BeamVariant` and which `BeamColors` (or custom colors).
61+
placeholder: "rotate + line; BeamColors.colorful"
62+
validations:
63+
required: true
64+
65+
- type: textarea
66+
id: flutter-version
67+
attributes:
68+
label: "`flutter --version` output"
69+
description: Paste the whole thing — the Dart version and channel matter.
70+
render: shell
71+
validations:
72+
required: true
73+
74+
- type: input
75+
id: package-version
76+
attributes:
77+
label: flutter_border_beam version
78+
placeholder: "0.1.0"
79+
validations:
80+
required: true
81+
82+
- type: input
83+
id: platform
84+
attributes:
85+
label: Device / OS
86+
description: >-
87+
Include the web renderer (canvaskit or skwasm) and the browser if this
88+
is on web; include the simulator/emulator vs. physical device
89+
otherwise.
90+
placeholder: "iPhone 16 simulator, iOS 26.0 / Chrome 141 on macOS, canvaskit"
91+
validations:
92+
required: true
93+
94+
- type: textarea
95+
id: media
96+
attributes:
97+
label: Screenshot or video
98+
description: >-
99+
Strongly encouraged — this package is a visual one, and a five-second
100+
screen recording usually says more than a paragraph. Drag files in.
101+
validations:
102+
required: false
103+
104+
- type: textarea
105+
id: context
106+
attributes:
107+
label: Anything else
108+
description: Logs, a stack trace, what you already tried.
109+
validations:
110+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question or idea
4+
url: https://github.com/SimplifyJobs/flutter_border_beam/discussions
5+
about: Ask how to do something, or float an idea before it becomes a proposal.
6+
- name: Live playground
7+
url: https://simplifyjobs.github.io/flutter_border_beam/
8+
about: Try variants and palettes in the browser, then share the exact configuration.
9+
- name: Security vulnerability
10+
url: https://github.com/SimplifyJobs/flutter_border_beam/security/advisories/new
11+
about: Report privately. Never in a public issue.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Feature request
2+
description: Propose a new variant, option, palette, or API.
3+
title: "[feat]: "
4+
labels: [enhancement]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
This package is a port of the
10+
[border-beam](https://github.com/Jakubantalik/border-beam) React
11+
library. Features that exist upstream are the easiest sell — say so if
12+
yours does, and link the source. Flutter-only additions are welcome
13+
too; they just need to stay out of the parity tables.
14+
15+
- type: textarea
16+
id: problem
17+
attributes:
18+
label: The problem
19+
description: >-
20+
What are you trying to build, and where does the package get in the
21+
way? Describe the situation, not the solution.
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: api
27+
attributes:
28+
label: Proposed API
29+
description: >-
30+
A sketch of the call site as you would want to write it. Rough is
31+
fine — the shape is what matters.
32+
render: dart
33+
placeholder: |
34+
BorderBeam.rotate(
35+
style: const BeamStyle(tailLength: 0.4),
36+
child: ...,
37+
)
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: alternatives
43+
attributes:
44+
label: Alternatives considered
45+
description: >-
46+
What can you do today instead, and why is it not enough? Include any
47+
workaround you are currently shipping.
48+
validations:
49+
required: true
50+
51+
- type: dropdown
52+
id: rendering-defaults
53+
attributes:
54+
label: Does this change rendering defaults?
55+
description: >-
56+
Would an existing `BorderBeam` with no new arguments look or animate
57+
differently? That makes it a breaking visual change, which needs a
58+
much stronger case and regenerated goldens.
59+
options:
60+
- "No — purely additive, defaults unchanged"
61+
- "Yes — existing beams would render differently"
62+
- "Not sure"
63+
validations:
64+
required: true
65+
66+
- type: textarea
67+
id: context
68+
attributes:
69+
label: Anything else
70+
description: >-
71+
References, a link to the React implementation, screenshots or a
72+
mockup of the effect.
73+
validations:
74+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## Summary
2+
3+
<!--
4+
What changed and why, in a short paragraph. Link the issue it closes
5+
(`Closes #12`). If this changes what a beam looks like, say so here — that is
6+
the first thing a reviewer needs to know.
7+
-->
8+
9+
## Changes
10+
11+
<!--
12+
Bullets, each opening with a bold lead-in naming the area:
13+
14+
- **Painting** (`lib/src/painting/`) — …
15+
- **Docs** — …
16+
-->
17+
18+
-
19+
20+
## Testing
21+
22+
<!--
23+
What you actually ran, and what it said. Do not claim a check you skipped —
24+
"goldens not run (no macOS)" is a fine and useful answer.
25+
-->
26+
27+
- [ ] `dart format .` — clean
28+
- [ ] `flutter analyze --fatal-infos` — zero issues (package and `example/`)
29+
- [ ] `flutter test` — green (`--exclude-tags golden` if you are not on macOS)
30+
31+
**Goldens** — none regenerated / regenerated:
32+
33+
<!--
34+
If you regenerated any: list which scenes, and why the pixels legitimately
35+
moved (a new blur radius, a corrected gradient stop, a Flutter pin bump).
36+
Goldens are macOS-only and pinned to Flutter 3.44.2; regenerate only your own
37+
new scenes, with `--plain-name`.
38+
-->
39+
40+
**saveLayer budget** — unchanged / changed:
41+
42+
<!--
43+
If `test/painting/save_layer_budget_test.dart`'s table changed: which variants,
44+
the new counts, and what the added layer composites that no existing layer
45+
could. Both the test and CLAUDE.md's table have to move together.
46+
-->
47+
48+
## Checklist
49+
50+
- [ ] No values in `lib/src/constants/` were tweaked (they are verbatim
51+
transcriptions of the React source); Flutter-only additions live in a
52+
clearly headed file
53+
- [ ] New public API has doc comments (`public_member_api_docs` is enforced)
54+
- [ ] Docs and comments describe current behavior — no change-history prose
55+
- [ ] `CHANGELOG.md` updated
56+
- [ ] README updated if this changes what a user reaches for first

.github/dependabot.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Weekly dependency updates, grouped so each ecosystem lands as a single PR
2+
# rather than one PR per bump.
3+
version: 2
4+
5+
updates:
6+
# GitHub Actions used by ci.yaml and release.yaml.
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: weekly
11+
labels:
12+
- dependencies
13+
commit-message:
14+
prefix: ci
15+
groups:
16+
github-actions:
17+
patterns:
18+
- "*"
19+
20+
# Dart/Flutter dependencies for the package and the example gallery.
21+
- package-ecosystem: pub
22+
directories:
23+
- /
24+
- /example
25+
schedule:
26+
interval: weekly
27+
labels:
28+
- dependencies
29+
commit-message:
30+
prefix: chore
31+
groups:
32+
pub:
33+
patterns:
34+
- "*"

.github/labels.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# The repository's label set, kept in version control so it is reviewable.
2+
#
3+
# Nothing syncs this automatically yet — applying it means either creating the
4+
# labels by hand or wiring a sync action (e.g. crazy-max/ghaction-github-labeler)
5+
# that reads this file. Until then, treat it as the source of truth a human
6+
# reconciles against.
7+
#
8+
# `dependencies` is the one label that is already load-bearing: dependabot.yml
9+
# applies it to every update PR it opens.
10+
11+
- name: bug
12+
color: d73a4a
13+
description: Something renders, animates, or behaves incorrectly.
14+
15+
- name: enhancement
16+
color: a2eeef
17+
description: A new variant, option, palette, or API.
18+
19+
- name: documentation
20+
color: 0075ca
21+
description: README, doc comments, or the guides in this repo.
22+
23+
- name: rendering
24+
color: 8a63d2
25+
description: Painting, geometry, gradients, goldens — anything about the pixels.
26+
27+
- name: performance
28+
color: fbca04
29+
description: Frame cost, saveLayer budget, repaint churn, memory.
30+
31+
- name: good first issue
32+
color: 7057ff
33+
description: Self-contained and well-scoped — a good place to start.
34+
35+
- name: help wanted
36+
color: 008672
37+
description: Maintainers would welcome a contributor picking this up.
38+
39+
- name: dependencies
40+
color: 0366d6
41+
description: Dependency and GitHub Actions updates (applied by dependabot).

0 commit comments

Comments
 (0)