* Refactor Form Not Found Handling and Improve Error Response
- Replace the existing "Whoops" message with a NotFoundForm component for better user experience when a form is not found.
- Enhance error handling in the loadForm function to set a 404 response status when a form cannot be loaded, improving clarity for users and developers.
These changes aim to streamline the user experience and provide clearer feedback when forms are unavailable.
* Refactor Navbar and NotFoundForm Components for Improved User Experience
- Simplify the Navbar component by removing unnecessary conditional rendering for the authentication display, enhancing clarity in the layout.
- Update the NotFoundForm component to utilize a dynamic actions array for rendering navigation options, improving maintainability and flexibility.
- Adjust text styles for better readability and consistency across the NotFoundForm component.
These changes aim to streamline the user interface and enhance the overall user experience when navigating forms and handling not found scenarios.
* Update NotFoundForm Component for Improved Action Clarity
- Adjust the text and icon in the actions array of the NotFoundForm component to enhance clarity and user experience. The "Start Fresh" action has been renamed to "Create Form" and the icon has been updated from a check-circle to a rocket-launch icon, better reflecting the action's purpose.
- Minor formatting adjustments were made to the template for improved readability.
These changes aim to provide users with clearer navigation options and a more intuitive interface when encountering a not found scenario.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
Enhance CI/CD pipeline by introducing a new job to run ESLint on the client application. This ensures code quality and consistency for the frontend codebase.
* Readonly User
* Refactor FormPolicy and TemplatePolicy to centralize write operation logic
- Introduced a private method `canPerformWriteOperation` in both FormPolicy and TemplatePolicy to encapsulate the logic for determining if a user can perform write operations on the respective models.
- Updated the `update`, `delete`, `restore`, and `forceDelete` methods in FormPolicy to use the new method for improved readability and maintainability.
- Simplified the `update` and `delete` methods in TemplatePolicy to leverage the centralized write operation logic.
This refactoring enhances code clarity and reduces duplication across policy classes.
* Refactor user and workspace permissions handling
- Updated FormController to authorize form creation based on workspace context.
- Removed the `is_readonly` attribute from UserResource and integrated it into WorkspaceResource for better encapsulation.
- Refactored User model to eliminate the `getIsReadonlyAttribute` method, shifting readonly logic to the Workspace model.
- Adjusted FormPolicy and TemplatePolicy to utilize workspace readonly checks for user permissions.
- Updated various frontend components to reference workspace readonly status instead of user readonly status, enhancing clarity and consistency in permission handling.
These changes improve the management of user permissions in relation to workspaces, ensuring a more robust and maintainable authorization system.
* Fix isReadonlyUser
* fix pint
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Form Translation
* Support for other languages
* Support locale for datepicker
* Apply translation on select input
* Apply translation on select input
* Improve translation
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Form editor v2
* fix template test
* setFormDefaults when save
* fix form cleaning dark mode
* improvements on open sidebar
* UI polish
* Fix change type button
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Better Form Stats
* fix lint
* submission timer store in localstorage
* Update test case for stats
* remove extra code
* fix form stats
* on restart remove timer
* fix resetTimer function name
* Improve form timer
* Fix timer after form validation error + polish UI
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Google Fonts
* Google fonts improvement
* font button color
* Refine font selection UI and update font fetching logic
- Update FontsController to fetch Google fonts sorted by popularity.
- Enhance FontCard component with additional skeleton loaders for better UX during font loading.
- Adjust check icon positioning in FontCard to be absolute for consistent UI.
- Remove unnecessary class in GoogleFontPicker's text input.
- Add border and rounded styling to the font list container in GoogleFontPicker.
- Simplify computed property for enrichedFonts in GoogleFontPicker.
- Implement inline font style preview in FormCustomization component.
---------
Co-authored-by: Frank <csskfaves@gmail.com>
Co-authored-by: Julien Nahum <julien@nahum.net>
* fix password reset bug
* self hosted mode middleware changes on pages
* fix lint
* wip: self hosted changes
* wip: self hosted frontend changes
* wip self hosted mode changes
* typo correction
* remove commented logic
* fix env variable names
* fix lint issues
* fix minor updates
* #445 Switched from single monolithic docker image to a docker-compose
orchestrated network of services
* Automatically configures shared secret
* Working through some issues
* Use local file storage
* Moved the dockerfiles
* Fixed some issues when building from clean
* Corrected workflow
* Hopefully schedules everything correctly now
* Prep storage for worker process as well
* .env files are required
* Pinned dependency versions
* Disable self hosted in the client as well
* Removed double defaulting logic
* Using regexs is more succinct
* Added FRONT_URL environment variable
* Merge 236e4-self-hosted-mode-changes
* Improve inital user setup
* Finalized the new docker-compose setup
* Fix back-end formatting issues
---------
Co-authored-by: Frank <csskfaves@gmail.com>
Co-authored-by: Don Benjamin <don@webhammer.co.uk>
* add api enpoints for adding, removing, updating user to workspace and leaving workspace
* feat: updates client site workspace settings
* refactor and add domain setting ui in modal
* move workspace user functionality to its own component
* adds tests
* fix linting
* updates select input to FlatSelectInput
* moves workspace user role edit to seperated component
* move user adding to its own component
* adds check to usure users exist before checking is admin
* fix loading users
* feat: invite user to team functionality
* fix token coulmn
* fix self host mode changes
* tests for user invite
* Refactor back-end
* Rename variables
* Improve some styling elements + refactor workspace settings
* More styling
* More UI polishing
* More UI fixes
* PHP linting
* Implemented most of the logic for team-functionnality
* Fix user avatar URL
* WIP remove users on cancellation
* Finished pricing for team functionality
* Fix tests
* Fix linting
* Added pricing_enabled helper
* Fix pricing_enabled shortcut
* Debug CI
* Disable pricing when testing
---------
Co-authored-by: LL-Etiane <lukongleinyuyetiane@gmail.com>
Co-authored-by: Lukong Etiane <83535251+LL-Etiane@users.noreply.github.com>
Co-authored-by: Julien Nahum <julien@nahum.net>
* Integrations Refactoring - WIP
* integrations list & edit - WIP
* Fix integration store binding issue
* integrations refactor - WIP
* Form integration - WIP
* Form integration Edit - WIP
* Integration Refactor - Slack - WIP
* Integration Refactor - Discord - WIP
* Integration Refactor - Webhook - WIP
* Integration Refactor - Send Submission Confirmation - WIP
* Integration Refactor - Backend handler - WIP
* Form Integration Status field
* Integration Refactor - Backend SubmissionConfirmation - WIP
* IntegrationMigration Command
* skip confirmation email test case
* Small refactoring
* FormIntegration status active/inactive
* formIntegrationData to integrationData
* Rename file name with Integration suffix for integration realted files
* Loader on form integrations
* WIP
* form integration test case
* WIP
* Added Integration card - working on refactoring
* change location for IntegrationCard and update package file
* Form Integration Create/Edit in single Modal
* Remove integration extra pages
* crisp_help_page_slug for integration json
* integration logic as collapse
* UI improvements
* WIP
* Trying to debug vue devtools
* WIP for integrations
* getIntegrationHandler change namespace name
* useForm for integration fields + validation structure
* Integration Test case & apply validation rules
* Apply useform changes to integration other files
* validation rules for FormNotificationsMessageActions fields
* Zapier integration as coming soon
* Update FormCleaner
* set default settings for confirmation integration
* WIP
* Finish validation for all integrations
* Updated purify, added integration formatData
* Fix testcase
* Ran pint; working on integration errors
* Handle integration events
* Remove old code related to notifications
* command for Delete Old Integration Events
* Display Past Events in Modal
* on Integration event create with status error send email to form creator
* Polish styling
* Minor improvements
* Finish badge and integration status
* Fix tests and add an integration event test
* Run linters
---------
Co-authored-by: Forms Dev <chirag+new@notionforms.io>
Co-authored-by: Julien Nahum <julien@nahum.net>
Fix resize for all forms
crisp migration (#302)
Co-authored-by: Julien Nahum <julien@nahum.net>
fix console error (#304)
fix: dark mode issues on form preview (#301)
* fix: dark mode issues on form preview
* Fix darkmode issues
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
Remove useless iframe attributes