Skip to content
Merged

V2 #89

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
e6cc287
Almost responsive
antoniolago Dec 29, 2024
bdb613a
tst
antoniolago Jan 1, 2025
326190f
This is almost functional responsive to grid
antoniolago Jan 4, 2025
16cc5f8
Squashed commit of the following:
antoniolago Feb 2, 2025
609716f
Update index.tsx
antoniolago Feb 2, 2025
dd4dbaf
tst
antoniolago Apr 4, 2025
bebabaa
chpnt
antoniolago Oct 16, 2025
1e28661
tst
antoniolago Oct 16, 2025
1650262
fitting semicircles on parent
antoniolago Dec 2, 2025
48a32da
tst
antoniolago Dec 2, 2025
35d2a23
tst
antoniolago Dec 2, 2025
d0a1796
tst
antoniolago Dec 2, 2025
9cdd138
Update GaugeGallery.tsx
antoniolago Dec 3, 2025
af21fa9
tst
antoniolago Dec 4, 2025
ada40d0
tst
antoniolago Dec 9, 2025
985f48f
tst
antoniolago Dec 9, 2025
c179154
render fix
antoniolago Dec 9, 2025
baeecfb
tst
antoniolago Dec 9, 2025
e3a2227
tst
antoniolago Dec 9, 2025
cd17394
tst
antoniolago Dec 9, 2025
9c0c1e7
render flickr fix
antoniolago Dec 10, 2025
4d9a3c0
Update pointer.ts
antoniolago Dec 10, 2025
94aa159
Update arc.ts
antoniolago Dec 10, 2025
941921b
tst
antoniolago Dec 10, 2025
098620c
tst
antoniolago Dec 10, 2025
47e76b0
tst
antoniolago Dec 10, 2025
d067974
blob position fix
antoniolago Dec 10, 2025
7cd231c
tst
antoniolago Dec 10, 2025
4d00054
add pipeline tests
antoniolago Dec 10, 2025
3597aa0
Update SandboxToolbar.tsx
antoniolago Dec 10, 2025
8a285d5
tst
antoniolago Dec 10, 2025
ff37457
tst
antoniolago Dec 11, 2025
8542cf9
tst
antoniolago Dec 11, 2025
0f7d12f
tst
antoniolago Dec 11, 2025
a77f092
tst
antoniolago Dec 11, 2025
fc15ea3
Update SandboxToolbar.tsx
antoniolago Dec 11, 2025
5b50296
Merge branch 'main' into resize-checkpoint
antoniolago Dec 11, 2025
6119985
Update index.tsx
antoniolago Dec 11, 2025
4b6a185
range set flickr fix
antoniolago Dec 11, 2025
5c2b8e1
Update index.tsx
antoniolago Dec 11, 2025
6791eb4
Update Pointer.ts
antoniolago Dec 11, 2025
4b7098f
Offset resize fix
antoniolago Dec 11, 2025
3b3af89
tests fixs
antoniolago Dec 11, 2025
e1714f2
needle on grafana
antoniolago Dec 11, 2025
6bb7d16
Angles fixes
antoniolago Dec 11, 2025
5aeb124
test fix
antoniolago Dec 11, 2025
c35ddd0
Update App.test.js
antoniolago Dec 11, 2025
71cc007
Update publish-npm.yml
antoniolago Dec 11, 2025
823a643
Update ci.yml
antoniolago Dec 11, 2025
03534a2
Fix ticks positioning
antoniolago Dec 11, 2025
9e89a18
gallery rework
antoniolago Dec 12, 2025
3e21d4c
Update presets.tsx
antoniolago Dec 12, 2025
29280c4
Update GaugeCard.tsx
antoniolago Dec 12, 2025
ed0e728
add ends padding bypass
antoniolago Dec 12, 2025
19adc06
fix subarc padding mirroring main arc
antoniolago Dec 12, 2025
4f4f0a6
add rendering tests
antoniolago Dec 15, 2025
d46dced
Lodash to lodash-es
antoniolago Dec 15, 2025
4cc31e4
toolbar adjust
antoniolago Dec 15, 2025
a57b0ab
Fix pointer flickering
antoniolago Dec 15, 2025
d3b8937
tst
antoniolago Dec 15, 2025
66ceb64
Add multiple pointers
antoniolago Dec 18, 2025
ee2172b
move docs to jsdocs
antoniolago Dec 18, 2025
64db3fa
Update App.test.js
antoniolago Dec 18, 2025
f9088c4
Fix flickerings and add pointer behavior
antoniolago Dec 19, 2025
5df29fa
Update utils.ts
antoniolago Dec 19, 2025
3184ab3
fix double arcs
antoniolago Dec 22, 2025
dd69bef
tst
antoniolago Dec 22, 2025
f8eaaad
Update chart.ts
antoniolago Dec 22, 2025
614e1e9
fix flickering animation before time + remove debug logs
antoniolago Dec 23, 2025
3554158
Fix vanishing pointer
antoniolago Dec 23, 2025
6c0924b
Create CHANGELOG.md
antoniolago Dec 23, 2025
30bf9d0
add CHANGELOG, update API, fix compile error
antoniolago Dec 23, 2025
b3915ed
Update CHANGELOG.md
antoniolago Dec 23, 2025
4144866
enhance toolbar sizing
antoniolago Dec 23, 2025
3d4fd6a
Fix duplicating pointers
antoniolago Dec 25, 2025
23bc9cc
Update renderCount.test.ts
antoniolago Dec 25, 2025
2ba5e9c
Update performance.test.ts
antoniolago Dec 25, 2025
2ce5292
Update publish-npm.yml
antoniolago Dec 25, 2025
a42af97
Update publish-npm.yml
antoniolago Dec 25, 2025
968b104
Update publish-npm.yml
antoniolago Dec 25, 2025
85cb251
Project overhaul v2.0.0-rc (#87)
antoniolago Dec 25, 2025
49f22c3
API.md move
antoniolago Dec 25, 2025
ce1e0cb
Update README.md
antoniolago Dec 25, 2025
6801f75
Merge branch 'main' into resize-checkpoint
antoniolago Dec 26, 2025
b61a7ef
Add flicker fixes
antoniolago Dec 26, 2025
13ad084
Revert "Project overhaul v2.0.0-rc (#87)"
antoniolago Dec 26, 2025
df6e81a
fix resizing
antoniolago Dec 26, 2025
dbdb882
fix flickering
antoniolago Dec 26, 2025
7f4bd75
Fix mobile initial render
antoniolago Jan 14, 2026
281d6da
fix flickerings on resize
antoniolago Jan 14, 2026
2e43565
Remove internal props from copied content
antoniolago Jan 14, 2026
86c9ce4
Update API.md
antoniolago Jan 14, 2026
4f12f3b
bump d3 and lodash-es versions
antoniolago Jan 14, 2026
e3a997c
Update presets.tsx
antoniolago Jan 14, 2026
9fa8dde
Update GaugeCard.tsx
antoniolago Jan 15, 2026
c57efa4
Add animation on first render
antoniolago Jan 15, 2026
67fc7bb
smooth value changes + 0 pointers config
antoniolago Jan 15, 2026
4387616
tst
antoniolago Jan 15, 2026
4dc5a38
Fix value sliders
antoniolago Jan 15, 2026
622c396
add lots of tests to fix rerendering on value change
antoniolago Jan 16, 2026
7edfd0a
fix mobile error
antoniolago Jan 16, 2026
8bd2c14
Add minInnerPadding tick label
antoniolago Jan 16, 2026
8e7777f
code imports lodash -> lodash-es
antoniolago Jan 17, 2026
4e0494a
Update package.json
antoniolago Jan 17, 2026
5495d1f
Revise README with new features and usage details
antoniolago Jan 17, 2026
cda26c2
Update README.md
antoniolago Jan 17, 2026
0822253
Update changelog
antoniolago Jan 17, 2026
a4bc4b9
Update renderCount.test.ts
antoniolago Jan 17, 2026
eb3235b
Merge branch 'resize-checkpoint' of https://github.com/antoniolago/re…
antoniolago Jan 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: CI/CD Pipeline

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_dispatch:

jobs:
# Run tests on every push/PR
test:
name: Test (React ${{ matrix.react-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
react-version: ['18', '19']
include:
- react-version: '18'
react-pkg: 'react@18.3.1'
react-dom-pkg: 'react-dom@18.3.1'
react-types: '@types/react@18.3.1'
- react-version: '19'
react-pkg: 'react@19.0.0'
react-dom-pkg: 'react-dom@19.0.0'
react-types: '@types/react@19.0.0'

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Install React ${{ matrix.react-version }}
run: |
bun add -d ${{ matrix.react-pkg }} ${{ matrix.react-dom-pkg }} ${{ matrix.react-types }}

- name: Run tests
run: bun run test
env:
CI: true

# Lint check
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run ESLint
run: bun run lint
continue-on-error: true

# Build check
build:
name: Build Package
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Node.js (for npm publish)
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: bun install

- name: Build package
run: bun run build:package

- name: Build demo page
run: bun run build:demo

- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: package-dist
path: dist/
retention-days: 7

- name: Upload demo artifact
uses: actions/upload-artifact@v4
with:
name: demo-build
path: build/
retention-days: 7
111 changes: 111 additions & 0 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: PR Preview Deploy

on:
pull_request:
types: [opened, synchronize, reopened, closed]

# Allow one concurrent deployment per PR
concurrency:
group: pr-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
deploy-preview:
name: Deploy PR Preview
runs-on: ubuntu-latest
if: github.event.action != 'closed'
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Build demo for PR preview
run: bun run build:demo
env:
PUBLIC_URL: /react-gauge-component/pr-${{ github.event.pull_request.number }}
CI: false

- name: Deploy to GitHub Pages subdirectory
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
destination_dir: pr-${{ github.event.pull_request.number }}
keep_files: true

- name: Comment PR with preview URL
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const previewUrl = `https://antoniolago.github.io/react-gauge-component/pr-${prNumber}/`;

// Check if we already commented
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});

// Find existing bot comment by login name (more reliable than type)
const botComment = comments.data.find(comment =>
comment.user.login === 'github-actions[bot]' &&
comment.body.includes('PR Preview deployed')
);

const body = `🚀 **PR Preview deployed!**\n\n` +
`Preview URL: ${previewUrl}\n\n` +
`_This preview will be updated on each push to this PR._`;

if (botComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: body,
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: body,
});
}

# Cleanup preview when PR is closed
cleanup-preview:
name: Cleanup PR Preview
runs-on: ubuntu-latest
if: github.event.action == 'closed'
permissions:
contents: write

steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Remove PR preview directory
run: |
PR_DIR="pr-${{ github.event.pull_request.number }}"
if [ -d "$PR_DIR" ]; then
rm -rf "$PR_DIR"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "Remove preview for PR #${{ github.event.pull_request.number }}" || echo "Nothing to commit"
git push
fi
Loading
Loading