Commit Graph

28 Commits

Author SHA1 Message Date
Chirag Chhatrala aa5c1acf3a
Decouple title from title block (#696)
* Decouple title from title block

* fix lint

* remove dry run for FormTitleMigration

* Skip form title migration for forms with hidden titles

* Refactor AI Form Generation with Dedicated Prompt Services

- Extract AI form generation logic from GenerateTemplate command into dedicated prompt service classes
- Update GenerateAiForm job to use new prompt generation services
- Improve GptCompleter with more robust error handling and token tracking
- Add error field to AiFormCompletion model for better error logging
- Simplify command signature from 'ai:make-form-template' to 'form:generate'

* Consolidate Template Metadata Generation with Unified Prompt Service

- Create GenerateTemplateMetadataPrompt to centralize template metadata generation
- Update GenerateTemplate command to use new consolidated metadata generation approach
- Enhance GptCompleter to support strict JSON schema validation
- Increase form prompt max length to support more complex form descriptions
- Refactor form generation to simplify metadata extraction and processing

* Implement Form Mode Strategy for Flexible Form Rendering

- Introduce FormModeStrategy to centralize form rendering logic
- Add support for different form modes: LIVE, PREVIEW, TEST, EDIT, PREFILL
- Refactor components to use mode-based rendering strategy
- Remove legacy boolean props like adminPreview and creating
- Enhance form component flexibility and reusability

* Refine Form Mode Strategy Display Behavior

- Update FormModeStrategy to hide hidden fields in PREVIEW mode
- Add FormMode getter in UrlFormPrefill component for mode-specific rendering
- Clarify mode-specific validation and display logic in form strategies

* Enhance Form Template Generation with Advanced Field Options

- Update GenerateTemplate command to use front_url for template URL output
- Expand GenerateFormPrompt with comprehensive field configuration options
- Add support for advanced field types: date with time, toggle switches, radio/checkbox selections
- Introduce field width configuration and HTML formatting for text elements
- Re-enable select, multi-select, and matrix field type definitions with enhanced configurations

* Remove Deprecated Template Metadata Generation Services

- Delete multiple AI prompt services related to template metadata generation
- Simplify GenerateTemplate command to use default values instead of complex metadata generation
- Remove GenerateTemplateMetadataPrompt and related classes like GenerateTemplateDescriptionPrompt, GenerateTemplateImageKeywordsPrompt, etc.
- Update form template generation to use basic fallback metadata generation approach

* Restore GenerateTemplateMetadataPrompt for Comprehensive Template Generation

- Reintroduce GenerateTemplateMetadataPrompt to replace default metadata generation
- Update GenerateTemplate command to use consolidated metadata generation approach
- Extract detailed metadata components including title, description, industries, and image search query
- Improve template generation with more dynamic and AI-generated metadata

* Refactor Template Preview Section Layout

- Remove unnecessary nested div in template preview section
- Simplify HTML structure for the template preview component
- Maintain existing styling and functionality while improving code readability

* Refactor Constructor and Code Formatting in AI Form Generation and Prompt Classes

- Updated the constructor in GenerateAiForm.php to use a block structure for improved readability and consistency.
- Added a blank line in the Prompt.php file to enhance code formatting and maintain consistency with PHP coding standards.
- Modified the migration file to use a more concise class declaration syntax, improving clarity.

These changes aim to enhance code readability and maintainability across the affected files.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-03-21 16:59:18 +01:00
Chirag Chhatrala 8e777ecca6
Form Templates for self hosted (#546)
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-08-29 11:08:09 +02:00
Favour Olayinka bcd45ce8a6
0351d front end linting (#377)
* feat: disable custom script for  trial users

* after lint fix

* frontend linting

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-04-15 19:39:03 +02:00
Favour Olayinka 9761351a26
remove nuxtimg (#347)
* remove nuxtimg

* fix: remove dummyImageProvider

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-03-19 17:59:10 +01:00
Julien Nahum cf32ba22f7
Optimize template images + disable image optim docker (#313)
* Optimize template images + disable image optim docker

* Fix new name default docker env variable name

* Re-establish template page cache
2024-02-06 19:56:14 +01:00
Julien Nahum b29cdf8d8a No follow for non-production env 2024-01-12 15:59:01 +01:00
Julien Nahum 630ae1df1d image optimization caching + fix hydratation issue form template page 2024-01-11 09:48:57 +01:00
Julien Nahum 7665539657 Restore templates pages cache 2024-01-10 16:18:23 +01:00
Julien Nahum 9750406025 Remove NuxtImg for non asset files 2024-01-10 16:17:47 +01:00
Julien Nahum 26ca536e87 Enable swr caching instead of prerenderign 2024-01-08 22:34:21 +01:00
Julien Nahum 2e660c1fe3 Disable page pre-rendering 2024-01-06 16:27:54 +01:00
formsdev 27ece34226
NuxtImg Migration (#279)
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-01-05 11:41:49 +01:00
formsdev 9c7d46b53b
Templates pages migration (#275) 2024-01-05 11:00:34 +01:00
formsdev cc7d64a0c6
Set middleware on pages (#278)
* Se middleware on pages

* Se middleware on account page
2024-01-05 10:47:36 +01:00
formsdev 2207c8cd90
migrate to nuxt useClipboard (#268) 2024-01-05 09:59:53 +01:00
formsdev f87e3f1685
SEO meta nuxt migration (#274)
* SEO meta nuxt migration

* Polish seo metas, add defaults for OG and twitter

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-01-04 18:38:50 +01:00
formsdev 3fcf1736df
fix guestpage editor (#269)
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-01-03 11:30:48 +01:00
Julien Nahum d1d8e62abb Working on page pre-rendering 2024-01-02 16:35:16 +01:00
formsdev 6fd2985ff5
Nuxt Migration notifications (#265)
* Nuxt Migration notifications

* @input to @update:model-value

* change field type fixes

* @update:model-value

* Enable form-block-logic-editor

* vue-confetti migration

* PR request changes

* useAlert in setup
2023-12-31 12:39:01 +01:00
Chirag Chhatrala 3d92637ef5
NuxtLink migration (#262)
Co-authored-by: Forms Dev <chirag+new@notionforms.io>
2023-12-22 10:24:51 +01:00
Julien Nahum 5640f43b9d Reworked workspaces store 2023-12-19 18:57:31 +01:00
Julien Nahum aac4d1da04 Finish reworking most templates pages 2023-12-19 17:10:07 +01:00
Julien Nahum 8e70d6be98 Finishing the templates pages 2023-12-19 15:24:54 +01:00
Julien Nahum bb519907f6 Refactoring stores and templates pages to comp. api 2023-12-19 13:46:55 +01:00
Julien Nahum 3b798c12fd WI 2023-12-18 10:35:00 +01:00
Julien Nahum 7c2db2052a Figured out auth & middlewares 2023-12-16 19:21:03 +01:00
Julien Nahum 5c4dc2a3d6 WIP 2023-12-11 11:56:21 +01:00
Julien Nahum 1f853e8178 Work in progress 2023-12-09 15:47:03 +01:00