Commit Graph

2119 Commits

Author SHA1 Message Date
Thomas Camlong
0189450e8c format code 2025-11-17 10:01:41 +01:00
Thomas Camlong
c7b0f3d6f9 style(errors): add trailing newline to errors.ts 2025-11-14 17:39:01 +01:00
Thomas Camlong
ee35e3d61d feat(dashboard): add experimental warning to submissions dashboard
Add ExperimentalWarning component to dashboard page to inform users
that the submissions system is in experimentation phase. Warns that
submissions won't be reviewed or processed during this phase.
2025-11-14 17:38:50 +01:00
Thomas Camlong
b8e77a46db feat(community): add experimental warning to community gallery page
Add ExperimentalWarning component to community page to inform users
that the submission system is in experimentation phase and submissions
won't be reviewed. Includes feedback button for PostHog survey targeting.
2025-11-14 17:38:44 +01:00
Thomas Camlong
d1def9c346 feat(submissions): add experimental warning and confirmation dialog to submission form
- Replace inline warning with shared ExperimentalWarning component
- Add confirmation dialog before submission to acknowledge experimental phase
- Refactor submission handler to show dialog first, then process on confirmation
- Warn users that submissions won't be reviewed during experimentation phase
2025-11-14 17:38:41 +01:00
Thomas Camlong
f4a59bfefb feat(components): add shared experimental warning component
Create reusable ExperimentalWarning component with customizable message
and feedback button. Component includes large warning styling (3x size)
with amber color scheme and PostHog-targetable .feedback-button class.
2025-11-14 17:38:34 +01:00
Thomas Camlong
f79ff32efa refactor: remove CI_MODE check from icon page generateStaticParams
- Remove local development optimization that limited icons to 5
- Now generates all icons statically regardless of environment
- Simplifies the code and ensures consistent behavior across environments
2025-11-07 08:35:42 +01:00
Thomas Camlong
74d2a81cd3 refactor: improve opengraph image generation with better fallback handling
- Add `revalidate = false` to disable revalidation for static images
- Refactor iconUrl to be null when icon not found, using placeholder only in img src
- This provides cleaner separation between data and presentation logic
2025-11-07 08:35:32 +01:00
Thomas Camlong
f769d73f73 feat: configure static generation for icon pages with development optimization
- Add `revalidate = false` and `dynamic = "force-static"` exports
- Add CI_MODE check in generateStaticParams to limit to 5 icons in local dev
- This speeds up local development builds while maintaining full static generation in CI
2025-11-07 08:35:30 +01:00
Thomas Camlong
6e4ba086a7 refactor: remove fetch revalidation from getAllIcons to rely on static generation
- Removed `next: { revalidate: 3600 }` from fetch call
- This allows static generation to control caching instead of fetch-level revalidation
2025-11-07 08:35:28 +01:00
Thomas Camlong
2af3aa13ef chore: add trailing newline to errors.ts for consistency 2025-11-07 08:35:27 +01:00
Thomas Camlong
37778a749b style(config): update global styles and TypeScript configuration
- Update global CSS with improved styling
- Enhance TypeScript configuration for better type checking
2025-11-07 08:11:26 +01:00
Thomas Camlong
ff0430e5c2 refactor(pages): update page components and metadata
- Update home page, submit page, and icon detail pages
- Improve opengraph image generation for icons
- Enhance page metadata and SEO
2025-11-07 08:11:22 +01:00
Thomas Camlong
4b001dc758 refactor(ui): update UI components and navigation
- Improve header, hero, and login modal components
- Update command menu functionality
- Enhance magic card component
2025-11-07 08:11:18 +01:00
Thomas Camlong
56289820f0 refactor(submissions): improve submission forms and data table
- Update icon submission forms with better validation
- Enhance advanced submission form with TanStack
- Improve submissions data table functionality
- Update submissions hook for better data management
2025-11-07 08:11:14 +01:00
Thomas Camlong
938facc889 refactor(icons): improve icon detail components
- Update icon details, actions, and editable components
- Enhance icon name combobox functionality
- Improve user interaction with icon metadata
2025-11-07 08:11:09 +01:00
Thomas Camlong
59843eac88 refactor(analytics): improve PostHog integration
- Update PostHog utilities and provider configuration
- Enhance analytics tracking setup
2025-11-07 08:11:05 +01:00
Thomas Camlong
5e19028cea refactor(api): improve API error handling and revalidation
- Update API utilities to use new ApiError class
- Improve error handling and status code management
- Enhance revalidation logic for better cache management
2025-11-07 08:11:01 +01:00
Thomas Camlong
8931ed64d8 feat(community): add individual community icon pages
- Add dynamic route for community icons at /community/[icon]
- Add opengraph image generation for community icons
- Update community page and community utilities
- Enable viewing and sharing individual community-submitted icons
2025-11-07 08:10:55 +01:00
Thomas Camlong
43a63b5aa7 feat(api): add custom ApiError class for error handling
- Create ApiError class extending Error with status code support
- Enables better error handling and status code management in API calls
2025-11-07 08:10:51 +01:00
Thomas Camlong
1cc433b6bf chore(deps): update dependencies
- Upgrade Next.js from 15.5.4 to 16.0.1
- Upgrade React from 19.1.1 to 19.2.0
- Upgrade React DOM from 19.1.1 to 19.2.0
- Upgrade PocketBase from 0.26.2 to 0.26.3
- Add cacheComponents: false to Next.js config
2025-11-07 08:10:48 +01:00
Thomas Camlong
ea9414543f fix(analytics): debounce PostHog "no icons found" event tracking
- Use debouncedQuery instead of searchQuery to prevent premature events
- Add 500ms debounce delay before sending PostHog events
- Require minimum 2 characters to avoid false positives from single character searches
- Fix bug where events fired before filtering completed
2025-11-07 08:10:43 +01:00
Thomas Camlong
8c87e66918 refactor: migrate to TanStack Form and fix IconNameCombobox integration
- Remove old advanced-icon-submission-form.tsx (replaced by TanStack version)
- Fix TanStack Form implementation:
  - Remove generic type argument and use type assertion instead
  - Fix form.Subscribe selector to return object instead of array
  - Remove unused IconCard import
- Update editable-icon-details.tsx to use new IconNameCombobox API:
  - Remove deprecated onIsExisting prop
  - Remove isExistingIcon state management
  - Simplify form submission messages

All components now use the updated IconNameCombobox with error/isInvalid props
instead of the old onIsExisting callback pattern.
2025-10-13 15:50:08 +02:00
Thomas Camlong
cd1a3fda59 feat: add comprehensive MultiSelect UI component
- Feature-rich multi-select dropdown with search and filtering
- Support for grouped options and custom icons
- Disabled option support (for required selections)
- Animations (bounce, pulse, wiggle, fade, slide)
- Responsive design with mobile/tablet/desktop configs
- Accessibility with ARIA labels and keyboard navigation
- Badge display with customizable max count
- Single-line or wrapped badge layout options
- Imperative API via ref (reset, clear, setValues, focus)
- Form integration with controlled/uncontrolled modes
- Auto-dedupe options and comprehensive error handling
2025-10-13 15:39:54 +02:00
Thomas Camlong
888d1f26ac deps: add TanStack Form and Radix UI packages
- Add @tanstack/react-form@1.23.6 for advanced form management
- Add radix-ui@1.4.3 meta-package for comprehensive UI components
- Includes form validation, state management, and component primitives
- Required dependencies: @tanstack/store, decode-formdata, devalue
2025-10-13 15:39:39 +02:00
Thomas Camlong
0fd6db891f feat: add file upload dropzone to icon submission dialog
- Add Dropzone component for direct file uploads
- Support multiple image formats (png, jpg, svg, webp)
- Show file preview after upload
- Add divider between dropzone and GitHub issue templates
- Max 5 files with 5MB size limit each
2025-10-13 15:39:25 +02:00
Thomas Camlong
7dc93ac86f style: set card background to pure white for better contrast
- Change --card from slightly off-white to pure white (oklch 1.0000)
2025-10-13 15:39:03 +02:00
Thomas Camlong
a9a97f54b5 refactor: remove icon submission form from 404 page
- Clean up 404 page by removing submission section
- Keep focus on error state and navigation back home
2025-10-13 15:38:50 +02:00
Thomas Camlong
676ee079d6 style: reduce CommandInput padding for compact appearance
- Change py-3 to py-1 for less vertical padding
- Remove h-10 fixed height for better flexibility
2025-10-13 15:38:37 +02:00
Thomas Camlong
e4fa1a4d31 chore: simplify command menu search placeholder text
- Remove "or category" from placeholder since search is name-based only
2025-10-13 15:38:24 +02:00
Thomas Camlong
baa85d4b79 feat: merge metadata.json icons with database icons for validation
- Fetch icons from both community_gallery database AND metadata.json
- Combine both sources to get complete list of existing icons
- Prevent submission of icons that exist in either source
- Ensure comprehensive validation against all known icons
2025-10-13 15:38:12 +02:00
Thomas Camlong
555898fa69 feat: integrate MultiSelect for variant selection and improve form UX
- Replace manual variant cards with MultiSelect component
- Add VARIANT_OPTIONS with FileImage/FileType icons
- Make base variant disabled (always required, cannot be removed)
- Show upload zones only for selected variants (reactive with field.state.value)
- Move remove button to top-right corner as small icon-only button
- Add icon preview section with proper object-contain styling
- Use form.Subscribe for reactive preview updates
- Validate icon names against existing icons from database
- Show clear error message when icon already exists
- Remove isExistingIcon field (updates not yet supported)
- Improve preview image display with centered flex layout
- Add variant labels below preview images
- Consolidate form into single Card component
- Fix image cropping issues with object-contain instead of object-cover
2025-10-13 15:37:59 +02:00
Thomas Camlong
7fe7d43c1a refactor: redesign icon name input with inline suggestions
- Replace popover-based combobox with direct input field
- Add inline dropdown showing existing icons (max 50 for performance)
- Implement real-time search filtering on both value and label
- Track raw input separately for instant search feedback
- Display existing icons as warnings with AlertCircle icons
- Add proper validation error display with TanStack Form integration
- Show validation errors in red below input
- Add aria-invalid and aria-describedby for accessibility
- Sync raw input with sanitized value on blur
- Prevent selecting existing icons (shows as not allowed)
2025-10-13 15:37:41 +02:00
Thomas Camlong
758c4a5bbc feat: add file preview functionality to dropzone
- Add filePreviews state to track base64 preview URLs
- Implement FileReader-based preview generation on file drop
- Add preview image display in DropzoneContent
- Update variant removal to clear associated previews
- Add preview cleanup in form reset and clear functions
- Enhance user experience with immediate visual feedback
2025-10-02 16:20:56 +02:00
Thomas Camlong
c5949aab03 feat: implement immediate PostHog user identification on auth
- Add immediate user identification after successful login/registration
- Implement PostHog event tracking for user_registered and user_logged_in
- Follow PostHog best practice of calling identify as soon as possible
- Use centralized PostHog utility functions for consistency
- Add comprehensive user properties to PostHog person profiles
2025-10-02 16:20:49 +02:00
Thomas Camlong
ef8bc885d2 feat: enhance logout with PostHog event tracking and reset
- Add PostHog event capture for user_logged_out
- Implement proper PostHog identity reset on logout
- Add user data tracking before clearing auth
- Follow PostHog best practices for logout handling
- Import and use centralized PostHog utility functions
2025-10-02 16:20:43 +02:00
Thomas Camlong
d28b495421 feat: migrate submit page to TanStack React Form
- Replace AdvancedIconSubmissionForm with AdvancedIconSubmissionFormTanStack
- Update import to use new TanStack-based form component
- Maintain all existing functionality and UI
2025-10-02 16:20:38 +02:00
Thomas Camlong
fe9f5edc9a feat: integrate PostHog authentication handler
- Add PostHogAuthHandler component to PostHogProvider
- Integrate usePostHogAuth hook for automatic user identification
- Add person_profiles: 'identified_only' configuration
- Enable automatic user identification on app load and auth changes
2025-10-02 16:20:32 +02:00
Thomas Camlong
08ff932257 feat: implement PostHog authentication hook
- Create usePostHogAuth hook for automatic user identification
- Add session-based identification tracking to prevent duplicate calls
- Implement proper cleanup of PocketBase auth listeners
- Follow PostHog best practices for identify timing
- Integrate with centralized PostHog utility functions
2025-10-02 16:20:25 +02:00
Thomas Camlong
a2fbc03bd6 feat: add PostHog utility functions for user identification
- Create centralized identifyUserInPostHog function
- Add resetPostHogIdentity function for logout handling
- Implement comprehensive person properties mapping
- Follow PostHog best practices for user identification
- Centralize PostHog logic to avoid code duplication
2025-10-02 16:20:19 +02:00
Thomas Camlong
1d0f264dda feat: implement TanStack React Form for icon submission
- Create new AdvancedIconSubmissionFormTanStack component
- Replace useState form management with useForm hook
- Add comprehensive field-level validation
- Implement type-safe form data structure
- Add real-time validation with immediate feedback
- Maintain all existing functionality (file uploads, previews, variants)
- Improve performance with optimized re-renders
2025-10-02 16:20:10 +02:00
Thomas Camlong
6cb2f39a1d feat: add @tanstack/react-form dependency
- Add @tanstack/react-form v1.11.0 to package.json
- Enables modern form state management with validation
- Supports type-safe form handling and field-level validation
2025-10-02 16:20:03 +02:00
Thomas Camlong
391a69f82e refactor(ui): update LoginModal usage 2025-10-02 15:23:56 +02:00
Thomas Camlong
e31b97f60e feat(hooks): add useExistingIconNames hook and clean up debug logs
- Add new useExistingIconNames hook for fetching community gallery icon names
- Implement proper caching with 5-minute stale time
- Remove debug console.log statements from useSubmissions hook
- Improve code organization and reusability
- Add proper error handling and retry configuration
2025-10-02 15:20:47 +02:00
Thomas Camlong
2ef6e4162c feat(ui): enhance dialog component with improved styling and optional close button
- Add showCloseButton prop to DialogContent for conditional close button display
- Improve overlay styling with better backdrop blur and opacity
- Add explicit background color to dialog content
- Reorganize imports for better code organization
- Enhance accessibility with proper data-slot attributes
- Improve visual consistency and user experience
2025-10-02 15:20:40 +02:00
Thomas Camlong
8a4c92930d refactor(debug): remove console logs from submissions data table
- Clean up debug console.log statements from getDisplayName function
- Remove logging for submission data, user data, and fallback values
- Improve code cleanliness and production readiness
- Maintain functionality while reducing console noise
2025-10-02 15:20:34 +02:00
Thomas Camlong
23e0ea54ff fix(api): correct PocketBase baseURL property name
- Fix typo from baseUrl to baseURL in submission details
- Ensure proper API endpoint construction for asset URLs
- Improve consistency with PocketBase SDK naming conventions
2025-10-02 15:20:27 +02:00
Thomas Camlong
e9e9aefb79 feat(ui): add theme-aware gradient colors to magic card
- Integrate next-themes for dynamic color switching
- Add light/dark theme specific gradient colors
- Implement state management for theme-based color updates
- Use pink gradient for dark theme and blue gradient for light theme
- Improve visual consistency across different theme modes
2025-10-02 15:20:22 +02:00
Thomas Camlong
6fc0a06fc4 feat(ui): major login modal redesign with improved UX
- Complete UI/UX overhaul with modern design and better spacing
- Add form reset functionality and improved state management
- Replace custom loading spinner with Lucide Loader2 icon
- Remove BorderBeam effects for cleaner appearance
- Improve error handling and validation flow
- Enhance accessibility with better focus management
- Update button styling and layout for better visual hierarchy
- Add loading states and improve user feedback
- Refactor form structure for better maintainability
2025-10-02 15:20:16 +02:00
Thomas Camlong
f0215627d7 refactor(ui): improve icon name combobox with custom hook and better UX
- Replace direct PocketBase calls with useExistingIconNames hook
- Add loading states and better error handling
- Improve create new icon flow with preview functionality
- Extract icon name sanitization logic into reusable function
- Enhance empty state with loading indicator
- Reorganize component structure for better maintainability
2025-10-02 15:20:11 +02:00