Skip to content

Issue #39: Add size prop to Crosshair component#45

Merged
imharrisonking merged 11 commits intoproductionfrom
39-add-size-prop-to-crosshair-component
Mar 7, 2026
Merged

Issue #39: Add size prop to Crosshair component#45
imharrisonking merged 11 commits intoproductionfrom
39-add-size-prop-to-crosshair-component

Conversation

@imharrisonking
Copy link
Contributor

Summary

This PR implements changes for issue #39: Add size prop to Crosshair component

Branch: 39-add-size-prop-to-crosshair-component

Changes Made

  • Added optional size prop to Crosshair component with 'sm', 'md', 'lg' options
  • Default behavior unchanged (20x21px with -10.5px offset) - backwards compatible
  • Uses cva (class-variance-authority) for variant handling, consistent with other UI components
  • Dynamically calculates viewBox and paths based on size configuration

Size configurations:

Size Dimensions Position Offset
sm 14×15px -7.5px
default 20×21px -10.5px (current)
md 28×29px -15px
lg 36×37px -19px

Testing

  • ✅ Typecheck passes
  • ✅ All existing tests pass
  • ✅ Implementation verified against acceptance criteria

Checklist

  • Code follows project coding standards
  • Type definitions are complete
  • Backwards compatible (no breaking changes)

Related Issue

Closes #39

- Add optional size prop with 'sm', 'md', 'lg' options
- Default behavior unchanged (20x21px with -10.5px offset)
- Use cva (class-variance-authority) for variant handling
- Dynamically calculate viewBox and paths based on size config

Sizes:
- sm: 14x15px, offset -7.5px
- md: 28x29px, offset -15px
- lg: 36x37px, offset -19px
@imharrisonking imharrisonking added the polish UI/UX improvements label Feb 26, 2026
@imharrisonking imharrisonking linked an issue Feb 26, 2026 that may be closed by this pull request
5 tasks
- Add pre-deploy SST unlock to clear stale locks from cancelled runs
- Add post-deploy unlock with if: always() for cleanup on failure/cancel
- Filter afk.sh issues to exclude those with open PRs waiting for review
- Prevents CI lock errors when rapid commits trigger workflow cancellations
@imharrisonking
Copy link
Contributor Author

The deployment to the pr stage is failing: Run npx sst unlock --stage pr-45
✕ cloudflare: Cloudflare API not initialized. Please provide CLOUDFLARE_API_TOKEN or CLOUDFLARE_API_KEY and CLOUDFLARE_EMAIL environment variables or in the provider section of the project configuration file.

These tokens should be available through the GitHub dev environment. How come this command fails yet the other npx sst commands work? Can you double check our .github/workflows file to make sure this is correctly setup for the new stage unlock step.

Both sst unlock steps were missing CLOUDFLARE_API_TOKEN and
CLOUDFLARE_DEFAULT_ACCOUNT_ID environment variables, causing
the unlock command to fail with 'Cloudflare API not initialized' error.

This fix ensures unlock can properly authenticate with Cloudflare
to clear stale locks before/after deployment.
Resolved conflicts:
- .github/workflows/pr-preview-deploy.yml: Keep both SST unlock step and database migrations
- specs/progress.txt: Use production branch progress state
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

Quality Checks Failed

Check Status
TypeScript Failed
Linting Failed
Tests Failed

Please fix the issues above before merging.

The lightningcss-darwin-arm64 package was incorrectly added as a
top-level devDependency, causing npm ci to fail on Linux CI runners
with EBADPLATFORM error.

This package is a platform-specific native binary that should only
exist as an optionalDependency of lightningcss itself. npm will
automatically install the correct platform-specific version based
on the current OS and architecture.

Changes:
- Removed lightningcss-darwin-arm64 from devDependencies
- Regenerated package-lock.json to properly mark platform-specific
  packages as optional

This ensures the build works on:
- macOS ARM64 (Apple Silicon)
- macOS x64 (Intel Macs)
- Linux x64 (CI runners)
- Any other supported platforms
The build was failing with:
  "managedNonce" is not exported by "@noble/ciphers/esm/utils.js"

Root cause: Two versions of @noble/ciphers were installed:
- v1.3.0 (from eciesjs) - does NOT export managedNonce
- v2.1.1 (from better-auth) - DOES export managedNonce

The bundler was resolving to v1.3.0 at the root level, causing
the import error when building.

Fix: Added @noble/ciphers to overrides in package.json to force
v2.1.1 across all packages, ensuring the managedNonce export is
always available.
After merging with production, several type mismatches appeared:

1. OTPType - better-auth now supports 'change-email' OTP type
   - Updated OTPType in packages/backend/src/auth/email.tsx
   - Updated VerifyEmailProps in notifications/emails/VerifyEmail.tsx
   - Updated FormattedType class in notifications/utils/text.tsx
   - Added handling for change-email in sendVerificationOTP

2. Button component - restore isLoading, icon, isError props
   - Production's Button didn't have these props that were on the feature branch
   - Restored isLoading and icon from original feature branch
   - Added isError prop to support new onboarding component from production
   - All components using these props now type-check correctly
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

Preview Environment

Property Value
Stage pr-45
Web URL https://pr-45.dev.structa.so
API URL https://api.pr-45.dev.structa.so

Quality checks passed
Deployment successful

This environment will be automatically cleaned up when the PR is closed or merged.

@imharrisonking imharrisonking merged commit 620bf06 into production Mar 7, 2026
4 checks passed
@imharrisonking imharrisonking deleted the 39-add-size-prop-to-crosshair-component branch March 11, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

polish UI/UX improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add size prop to Crosshair component

1 participant