feat(ff): implement admin form editor - #110
Conversation
…dmin authentication hooks - Implemented FormFieldList component for managing form fields. - Created useAdminAuth hook for admin authentication with session storage. - Developed useForms hook to fetch and manage forms with pagination. - Added AdminFormListPage for displaying and managing forms with delete functionality. - Created FormEditorPage for creating and editing forms with field management.
…FormFieldList to use unique keys
- Added `react-globe.gl` dependency for globe visualization. - Created `GlobeBackground` component to render a globe with decorative points representing the GDG community. - Introduced `PageWithGlobe` component to wrap the home page content with the globe background. - Updated `App.tsx` to use `PageWithGlobe` for the home page layout. - Modified global styles to enhance the appearance of the globe and page content.
- Added new dependencies for 3D rendering: @react-three/drei, @react-three/fiber, @react-three/postprocessing, and three. - Replaced PageWithGlobe component with CyberGlobe and CyberCard components in App.tsx. - Created CyberGlobe component for rendering a dynamic 3D globe with various visual effects. - Created CyberCard component for displaying a styled card with entrance animation and status indicators. - Updated global styles to change background color. - Added index file to export CyberGlobe and CyberCard components for easier imports.
- Deleted PageWithGlobe, CyberCard, CyberGlobe, continentOutlines, and index files from cyber-globe component. - Introduced a new LoginCard component for the home page with a clean UI. - Updated global styles in index.css for better aesthetics and added fade-in animation. - Modified vite.config.ts for build optimizations and removed sourcemaps.
…ualization - Replaced NetworkGlobe with NetworkSphere for enhanced performance and features. - Implemented mouse interaction and dynamic connection lines between nodes. - Added 30fps animation limiter and tab visibility detection. - Improved mobile handling with fallback options. - Enhanced LoginCard design with gradient glow effects and modern aesthetics.
…rmEditorPage layout
- Deleted the NetworkBackground and NetworkSphere components to streamline the codebase. - Removed the PillButton component and its associated styles, as well as the LoginCard component. - Updated App.tsx to remove references to the deleted components and redirect the home route to the admin panel. - Cleaned up package.json by removing unnecessary dependencies related to the deleted components.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Added `role` and `aria-label` attributes to icons in DatePicker for better accessibility. - Refactored FieldEditorCard to improve code readability and maintainability, including restructuring validation fields and toggles. - Updated FieldTypeSelect component for better prop handling and accessibility. - Improved PhoneMockup component structure and added aria-hidden attributes for better accessibility. - Enhanced FormEditorPage layout and accessibility, ensuring proper labeling and structure for form fields. - Introduced biome.json for Biome configuration.
|
ci checks are failing |
|
Great progress @frozencodx — most of the previous review items are properly addressed. Two blockers remain before this pr can merge. ❌ Blockers1. Real API token committed to the repository
ADMIN_API_TOKEN: str = "9374c8c7ab72df4d04b904a0e02acb00ec74b84474514fe301d9ccc259bc8eb0"
The token is now publicly visible in the repo history. Two fixes needed:
Also rotate the token itself — since it's already public, the current value should be considered compromised. 2. CI is failing — Biome schema/version mismatch
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json"But "@biomejs/biome": "^2.3.11"The installed version doesn't satisfy the (quick fix, worth doing before merge)
export async function deleteForm(formId: string): Promise<void> {
await authenticatedRequest<void>(`/forms/${encodeURIComponent(formId)}`, {
method: "DELETE",
});
} |
…API authentication in tests
…ude DEPARTMENT type
… FormEditorPage components
|
Everything from both previous review rounds has been properly addressed. But a few things before merge this pr. |
There was a problem hiding this comment.
Why you didn't use tailwind rather than an extra css file
|
One optional note for a follow-up: |
…h improved submission handling
seberatolmez
left a comment
There was a problem hiding this comment.
you've done a great job @frozencodx . Looks fine to me, you can merge after @DogukanUrker 's approval.
What does this PR do?
Implements an admin-only form editor for the form frontend.
Admins can:
The editor includes a visual field builder and a preview mode that reuses the existing
FieldRenderercomponent to match theFormSubmissionPageUI.All create/update operations produce payloads compliant with the backend
FormCreateschema.Key Features
/admin/forms)/admin/forms/new)/admin/forms/:formId/edit)FieldRendererRelated Issue
Closes #103
Checklist