Skip to content

Chore: Add Missing raw files#2

Open
Md-RH-Maruf wants to merge 1 commit intobit-apps-pro:mainfrom
Md-RH-Maruf:main
Open

Chore: Add Missing raw files#2
Md-RH-Maruf wants to merge 1 commit intobit-apps-pro:mainfrom
Md-RH-Maruf:main

Conversation

@Md-RH-Maruf
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the functionality and improves the robustness of the frontend components. It introduces new advanced field types for date/time, file uploads, and conversational forms, while also refining the core CSS processing and conditional logic systems. These changes aim to provide a more feature-rich and stable user experience across various form interactions.

Highlights

  • New External Services Documentation: A new markdown file, external-services.md, has been added to comprehensively document all third-party and external services that Bit Form may connect to. This includes details on data sent, connection triggers, and links to terms of use and privacy policies for each service.
  • Enhanced CSS Atomization Logic: The atomize-css package received updates to its selector combination logic, specifically to ignore vendor-prefixed selectors during combination. Robustness was also improved with nullish coalescing and optional chaining for CSS declarations and values. The utils.js file was refactored to replace the eval function with a safer calculate helper for arithmetic operations, and now handles reserved CSS variables.
  • New Advanced Date/Time Field Component: A new package, bit-advanced-datetime-field, has been introduced. This component provides advanced date and time input capabilities, including dynamic date modes (e.g., 'today', 'dynamic' offsets) and comprehensive configuration options for min/max dates and times.
  • New Advanced File Upload Field Component: A new package, bit-advanced-file-up-field, has been added. This component integrates with bit-filepond and its plugins to offer advanced file upload functionalities, including file size/type validation, image manipulation (crop, resize, preview), and server-side processing with AJAX.
  • New Conversational Form Component: A new package, bit-conversational-form, has been introduced to enable conversational form experiences. This includes step-by-step navigation, progress tracking, and enhanced user interaction for multi-step forms.
  • Refactored Conditional Logic System: The bit-conditionals package has undergone significant refactoring. It now merges extraFields into fields for more consistent data handling, correctly processes unselected radio/checkboxes and step numbers, and includes new function handlers for date/time manipulation, string concatenation, and number parsing within conditional evaluations. Input events are now triggered for certain field types to ensure conditional logic re-evaluation.
  • Dependency Management Update: The packageManager in bit-conditionals/package.json has been updated from pnpm@7.6.0 to pnpm@9.4.0, indicating a shift to a newer version of the pnpm package manager.
Changelog
  • external-services.md
    • Added a new document detailing third-party and external services used by Bit Form.
  • packages/atomize-css/node_modules/.bin/c8
    • Added new binary file.
  • packages/atomize-css/node_modules/.bin/cssbeautify
    • Added new binary file.
  • packages/atomize-css/node_modules/.bin/jest
    • Added new binary file.
  • packages/atomize-css/node_modules/.bin/json-beautify
    • Added new binary file.
  • packages/atomize-css/node_modules/.bin/sass
    • Added new binary file.
  • packages/atomize-css/node_modules/.bin/sort-json
    • Added new binary file.
  • packages/atomize-css/node_modules/.bin/vite
    • Added new binary file.
  • packages/atomize-css/node_modules/.bin/vitest
    • Added new binary file.
  • packages/atomize-css/node_modules/@codemirror/lang-css
    • Added new module symlink.
  • packages/atomize-css/node_modules/@codemirror/lang-javascript
    • Added new module symlink.
  • packages/atomize-css/node_modules/@testing-library/jest-dom
    • Added new module symlink.
  • packages/atomize-css/node_modules/@testing-library/react
    • Added new module symlink.
  • packages/atomize-css/node_modules/@testing-library/user-event
    • Added new module symlink.
  • packages/atomize-css/node_modules/@types/react
    • Added new module symlink.
  • packages/atomize-css/node_modules/@types/react-dom
    • Added new module symlink.
  • packages/atomize-css/node_modules/@uiw/codemirror-theme-dracula
    • Added new module symlink.
  • packages/atomize-css/node_modules/@uiw/react-codemirror
    • Added new module symlink.
  • packages/atomize-css/node_modules/@vitejs/plugin-react
    • Added new module symlink.
  • packages/atomize-css/node_modules/@vitest/ui
    • Added new module symlink.
  • packages/atomize-css/node_modules/allotment
    • Added new module symlink.
  • packages/atomize-css/node_modules/colord
    • Added new module symlink.
  • packages/atomize-css/node_modules/cssbeautify
    • Added new module symlink.
  • packages/atomize-css/node_modules/jest
    • Added new module symlink.
  • packages/atomize-css/node_modules/react
    • Added new module symlink.
  • packages/atomize-css/node_modules/react-dom
    • Added new module symlink.
  • packages/atomize-css/node_modules/sort-json
    • Added new module symlink.
  • packages/atomize-css/node_modules/vite
    • Added new module symlink.
  • packages/atomize-css/src/atomize-css/helpers/combineSelectors.js
    • Modified selector combination logic to ignore vendor-prefixed selectors.
  • packages/atomize-css/src/atomize-css/helpers/optimizeAndDefineCssClassProps.js
    • Improved robustness by adding nullish coalescing and optional chaining for CSS declarations and values.
  • packages/atomize-css/src/atomize-css/helpers/utils.js
    • Removed deepCopy import.
    • Introduced a calculate function to replace eval for arithmetic operations.
    • Added handling for reserved CSS variables.
    • Refined optimizeQuadValue spacing for consistency.
  • packages/bit-advanced-datetime-field/README.MD
    • Added new README file.
  • packages/bit-advanced-datetime-field/dist/bit-advanced-datetime-field.min.js
    • Added new minified JavaScript file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/browserslist
    • Added new binary file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/cross-env
    • Added new binary file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/cross-env-shell
    • Added new binary file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/rollup
    • Added new binary file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/webpack
    • Added new binary file.
  • packages/bit-advanced-datetime-field/node_modules/@babel/preset-env
    • Added new module symlink.
  • packages/bit-advanced-datetime-field/node_modules/@rollup/plugin-terser
    • Added new module symlink.
  • packages/bit-advanced-datetime-field/node_modules/flatpickr
    • Added new module symlink.
  • packages/bit-advanced-datetime-field/node_modules/rollup
    • Added new module symlink.
  • packages/bit-advanced-datetime-field/node_modules/rollup-plugin-livereload
    • Added new module symlink.
  • packages/bit-advanced-datetime-field/node_modules/rollup-plugin-serve
    • Added new module symlink.
  • packages/bit-advanced-datetime-field/node_modules/webpack
    • Added new module symlink.
  • packages/bit-advanced-datetime-field/package.json
    • Added new package configuration file.
  • packages/bit-advanced-datetime-field/rollup.config.js
    • Added new Rollup configuration file.
  • packages/bit-advanced-datetime-field/src/bit-advanced-datetime-field.js
    • Added new source file for the advanced datetime field component.
  • packages/bit-advanced-datetime-field/webpack.config.js
    • Added new Webpack configuration file.
  • packages/bit-advanced-file-up-field/.turbo/turbo-build.log
    • Added new build log file.
  • packages/bit-advanced-file-up-field/dist/bit-advanced-file-up-field.min.js
    • Added new minified JavaScript file.
  • packages/bit-advanced-file-up-field/node_modules/.bin/browserslist
    • Added new binary file.
  • packages/bit-advanced-file-up-field/node_modules/.bin/cross-env
    • Added new binary file.
  • packages/bit-advanced-file-up-field/node_modules/.bin/cross-env-shell
    • Added new binary file.
  • packages/bit-advanced-file-up-field/node_modules/.bin/rollup
    • Added new binary file.
  • packages/bit-advanced-file-up-field/node_modules/@rollup/plugin-babel
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-file-validate-size
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-file-validate-type
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-crop
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-preview
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-resize
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-transform
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-validate-size
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-media-preview
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/cross-env
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/rollup
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/rollup-plugin-livereload
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/rollup-plugin-serve
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/node_modules/terser-webpack-plugin
    • Added new module symlink.
  • packages/bit-advanced-file-up-field/rollup.config.js
    • Added new Rollup configuration file.
  • packages/bit-advanced-file-up-field/src/bit-advanced-file-up-field.js
    • Added new source file for the advanced file upload component.
  • packages/bit-advanced-file-up-field/webpack.config.js
    • Added new Webpack configuration file.
  • packages/bit-conditionals/.turbo/turbo-build.log
    • Added new build log file.
  • packages/bit-conditionals/dist/bit-conditionals.min.js
    • Added new minified JavaScript file.
  • packages/bit-conditionals/node_modules/.bin/browserslist
    • Added new binary file.
  • packages/bit-conditionals/node_modules/.bin/rollup
    • Added new binary file.
  • packages/bit-conditionals/node_modules/.bin/webpack
    • Added new binary file.
  • packages/bit-conditionals/node_modules/@babel/preset-env
    • Added new module symlink.
  • packages/bit-conditionals/node_modules/@rollup/plugin-babel
    • Added new module symlink.
  • packages/bit-conditionals/node_modules/@rollup/plugin-terser
    • Added new module symlink.
  • packages/bit-conditionals/node_modules/rollup
    • Added new module symlink.
  • packages/bit-conditionals/node_modules/rollup-plugin-livereload
    • Added new module symlink.
  • packages/bit-conditionals/node_modules/rollup-plugin-serve
    • Added new module symlink.
  • packages/bit-conditionals/node_modules/terser-webpack-plugin
    • Added new module symlink.
  • packages/bit-conditionals/node_modules/webpack
    • Added new module symlink.
  • packages/bit-conditionals/package.json
    • Updated pnpm package manager version from 7.6.0 to 9.4.0.
  • packages/bit-conditionals/src/bit-conditionals.js
    • Refactored conditional logic to merge extraFields into fields for consistent data handling.
    • Updated getAllFieldsValueFromForm to handle unselected radio/checkboxes and step numbers.
    • Adjusted onBlurHandler to use the new merged fields and pass targetFldKey to checkLogic.
  • packages/bit-conditionals/src/checkLogic.js
    • Enhanced conditional logic evaluation to include change and on_click events.
    • Added date type checks with bfDateFieldsLogicCheck.
    • Updated checkContainLogic to use bfSplit with props.
    • Replaced eval with a safe evalMathExpression for calculations.
    • Added new function handlers for date/time manipulation, concatenation, and number parsing.
  • packages/bit-conditionals/src/setActions.js
    • Updated setFieldValue to trigger input events for radio/checkbox/decision-box fields.
    • Added 'readonly' class for read-only fields.
    • Introduced a debounced saveFormProgress for draft saving.
    • Added handleSetConfigOption for date/time field configuration.
  • packages/bit-conversational-form/.turbo/turbo-build.log
    • Added new build log file.
  • packages/bit-conversational-form/dist/bit-conversational-form.min.js
    • Added new minified JavaScript file.
  • packages/bit-conversational-form/dist/handleConversationalFormMsg.min.js
    • Added new minified JavaScript file.
  • packages/bit-conversational-form/node_modules/.bin/browserslist
    • Added new binary file.
  • packages/bit-conversational-form/node_modules/.bin/cross-env
    • Added new binary file.
  • packages/bit-conversational-form/node_modules/.bin/cross-env-shell
    • Added new binary file.
  • packages/bit-conversational-form/node_modules/.bin/rollup
    • Added new binary file.
  • packages/bit-conversational-form/node_modules/.bin/webpack
    • Added new binary file.
  • packages/bit-conversational-form/node_modules/@babel/preset-env
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-babel
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-node-resolve
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-terser
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/cross-env
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/rollup
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/rollup-plugin-livereload
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/rollup-plugin-serve
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/terser-webpack-plugin
    • Added new module symlink.
  • packages/bit-conversational-form/node_modules/webpack
    • Added new module symlink.
  • packages/bit-conversational-form/package.json
    • Added new package configuration file.
  • packages/bit-conversational-form/rollup.config.js
    • Added new Rollup configuration file.
  • packages/bit-conversational-form/src/bit-conversational-form.js
    • Added new source file for the conversational form initialization.
  • packages/bit-conversational-form/src/class-conversational-form.js
    • Added new source file for the conversational form class.
  • packages/bit-conversational-form/src/handleConversationalFormMsg.js
    • Added new source file for handling conversational form messages.
  • packages/bit-conversational-form/webpack.config.js
    • Added new Webpack configuration file.
  • packages/bit-country-field/README.md
    • Added new README file.
Activity
  • The pull request introduces a new external-services.md file, providing transparency on third-party integrations.
  • Several new packages (bit-advanced-datetime-field, bit-advanced-file-up-field, bit-conversational-form, bit-country-field) have been added, indicating significant feature development.
  • Existing core utilities in atomize-css and bit-conditionals have been refined for better performance, security, and extensibility.
  • The packageManager version in bit-conditionals was updated, suggesting a general project-wide dependency management upgrade.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new documentation file detailing external service usage for transparency. It also significantly refines the internal workings of CSS atomization and the conditional logic system, making them more robust and feature-rich. Furthermore, it lays the groundwork for conversational forms with new components and message handling. A large number of dependency-related files were added, indicating a comprehensive update to the project's build and development environment.

Highlights

  • Documentation: A new markdown file, external-services.md, has been added to comprehensively list all third-party and external services that Bit Form may connect to, detailing data sent, connection triggers, and links to terms/privacy policies.
  • CSS Atomization Logic Enhancements: Improvements were made to the CSS atomization helpers, specifically in combineSelectors.js to intelligently ignore vendor-prefixed selectors during combination, and in optimizeAndDefineCssClassProps.js to handle undefined declarations and safely trim property values. The utils.js file was refactored to include a dedicated calculate function, remove an unused deepCopy import, and enhance CSS variable expression handling for better robustness and support for reserved variables.
  • Conditional Logic System Refinements: The core conditional logic system in bit-conditionals received significant updates. This includes improved handling of field values from forms, better processing of unselected radio/checkbox fields, and more robust function evaluation within conditions. New functions for date/time manipulation (_bf_format_datetime, _bf_datetime_difference, _bf_add_subtract_datetime), string concatenation (_bf_concat), and number extraction (_bf_number) were integrated into the logic evaluation. Additionally, the setActions.js file was refactored to enhance how field values are set, how disabled/readonly states are managed, and to introduce a debounced save mechanism for form progress.
  • Conversational Form Implementation: New components and logic for conversational forms have been introduced under packages/bit-conversational-form. This includes bit-conversational-form.js and class-conversational-form.js to manage multi-step conversational flows, navigation, and input handling, along with handleConversationalFormMsg.js for displaying form-related messages.
  • Dependency and Build Artifact Additions: Numerous raw files, primarily symbolic links and build artifacts within node_modules/.bin and node_modules directories, were added across atomize-css, bit-advanced-datetime-field, bit-advanced-file-up-field, and bit-conversational-form packages. This suggests a synchronization or re-inclusion of development dependencies and compiled assets.
  • Package Manager Update: The packageManager version in packages/bit-conditionals/package.json was updated from pnpm@7.6.0 to pnpm@9.4.0.
Changelog
  • external-services.md
    • Added a new document outlining third-party and external services used by Bit Form, detailing data sent and privacy policies.
  • packages/atomize-css/node_modules/.bin/c8
    • Added raw file.
  • packages/atomize-css/node_modules/.bin/cssbeautify
    • Added raw file.
  • packages/atomize-css/node_modules/.bin/jest
    • Added raw file.
  • packages/atomize-css/node_modules/.bin/json-beautify
    • Added raw file.
  • packages/atomize-css/node_modules/.bin/sass
    • Added raw file.
  • packages/atomize-css/node_modules/.bin/sort-json
    • Added raw file.
  • packages/atomize-css/node_modules/.bin/vite
    • Added raw file.
  • packages/atomize-css/node_modules/.bin/vitest
    • Added raw file.
  • packages/atomize-css/node_modules/@codemirror/lang-css
    • Added raw file.
  • packages/atomize-css/node_modules/@codemirror/lang-javascript
    • Added raw file.
  • packages/atomize-css/node_modules/@testing-library/jest-dom
    • Added raw file.
  • packages/atomize-css/node_modules/@testing-library/react
    • Added raw file.
  • packages/atomize-css/node_modules/@testing-library/user-event
    • Added raw file.
  • packages/atomize-css/node_modules/@types/react
    • Added raw file.
  • packages/atomize-css/node_modules/@types/react-dom
    • Added raw file.
  • packages/atomize-css/node_modules/@uiw/codemirror-theme-dracula
    • Added raw file.
  • packages/atomize-css/node_modules/@uiw/react-codemirror
    • Added raw file.
  • packages/atomize-css/node_modules/@vitejs/plugin-react
    • Added raw file.
  • packages/atomize-css/node_modules/@vitest/ui
    • Added raw file.
  • packages/atomize-css/node_modules/allotment
    • Added raw file.
  • packages/atomize-css/node_modules/colord
    • Added raw file.
  • packages/atomize-css/node_modules/cssbeautify
    • Added raw file.
  • packages/atomize-css/node_modules/jest
    • Added raw file.
  • packages/atomize-css/node_modules/json-beautify
    • Added raw file.
  • packages/atomize-css/node_modules/react
    • Added raw file.
  • packages/atomize-css/node_modules/react-dom
    • Added raw file.
  • packages/atomize-css/node_modules/sort-json
    • Added raw file.
  • packages/atomize-css/node_modules/vite
    • Added raw file.
  • packages/atomize-css/node_modules/vitest
    • Added raw file.
  • packages/atomize-css/src/atomize-css/helpers/combineSelectors.js
    • Updated CSS selector combination logic to ignore vendor-prefixed selectors when combining.
  • packages/atomize-css/src/atomize-css/helpers/optimizeAndDefineCssClassProps.js
    • Updated to handle potentially undefined declarations and safely trim property values.
  • packages/atomize-css/src/atomize-css/helpers/utils.js
    • Removed deepCopy import.
    • Introduced a calculate function for arithmetic operations.
    • Enhanced CSS variable expression handling to support reserved variables and improve fallback logic.
    • Adjusted optimizeQuadValue to ensure consistent spacing.
  • packages/bit-advanced-datetime-field/.turbo/turbo-build.log
    • Added raw file.
  • packages/bit-advanced-datetime-field/README.MD
    • Added raw file.
  • packages/bit-advanced-datetime-field/dist/bit-advanced-datetime-field.min.js
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/browserslist
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/cross-env
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/rollup
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/.bin/webpack
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/@babel/preset-env
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/@rollup/plugin-babel
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/@rollup/plugin-node-resolve
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/cross-env
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/flatpickr
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/rollup
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/rollup-plugin-livereload
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/rollup-plugin-serve
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/terser-webpack-plugin
    • Added raw file.
  • packages/bit-advanced-datetime-field/node_modules/webpack
    • Added raw file.
  • packages/bit-advanced-datetime-field/package.json
    • Added raw file.
  • packages/bit-advanced-datetime-field/rollup.config.js
    • Added raw file.
  • packages/bit-advanced-datetime-field/src/bit-advanced-datetime-field.js
    • Added raw file.
  • packages/bit-advanced-datetime-field/webpack.config.js
    • Added raw file.
  • packages/bit-advanced-file-up-field/.turbo/turbo-build.log
    • Added raw file.
  • packages/bit-advanced-file-up-field/dist/bit-advanced-file-up-field.min.js
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/.bin/cross-env-shell
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/.bin/webpack
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/@babel/preset-env
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/@rollup/plugin-babel
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/@rollup/plugin-terser
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-file-validate-size
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-file-validate-type
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-crop
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-transform
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-validate-size
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-media-preview
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/cross-env
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/rollup
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/rollup-plugin-livereload
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/rollup-plugin-serve
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/terser-webpack-plugin
    • Added raw file.
  • packages/bit-advanced-file-up-field/node_modules/webpack
    • Added raw file.
  • packages/bit-advanced-file-up-field/package.json
    • Added raw file.
  • packages/bit-advanced-file-up-field/rollup.config.js
    • Added raw file.
  • packages/bit-advanced-file-up-field/webpack.config.js
    • Added raw file.
  • packages/bit-conditionals/dist/bit-conditionals.min.js
    • Added raw file.
  • packages/bit-conditionals/node_modules/.bin/browserslist
    • Added raw file.
  • packages/bit-conditionals/node_modules/.bin/rollup
    • Added raw file.
  • packages/bit-conditionals/node_modules/.bin/webpack
    • Added raw file.
  • packages/bit-conditionals/node_modules/@babel/preset-env
    • Added raw file.
  • packages/bit-conditionals/node_modules/@rollup/plugin-babel
    • Added raw file.
  • packages/bit-conditionals/node_modules/@rollup/plugin-node-resolve
    • Added raw file.
  • packages/bit-conditionals/node_modules/@rollup/plugin-terser
    • Added raw file.
  • packages/bit-conditionals/node_modules/rollup-plugin-livereload
    • Added raw file.
  • packages/bit-conditionals/node_modules/rollup-plugin-serve
    • Added raw file.
  • packages/bit-conditionals/node_modules/terser-webpack-plugin
    • Added raw file.
  • packages/bit-conditionals/node_modules/webpack
    • Added raw file.
  • packages/bit-conditionals/package.json
    • Updated packageManager version from pnpm@7.6.0 to pnpm@9.4.0.
  • packages/bit-conditionals/src/bit-conditionals.js
    • Refactored generateFieldName to safely handle null/undefined inputs.
    • Enhanced getAllFieldsValueFromForm to correctly handle unselected radio/checkbox fields and button types, and included _bf_step_no for multi-step forms.
    • Modified onBlurHandler to merge extraFields and fields for more comprehensive conditional logic evaluation, and updated logic for on_input conditions.
  • packages/bit-conditionals/src/checkLogic.js
    • Introduced dateTypes array for specific date field logic.
    • Modified compareValueLogic to handle change and on_click events, and updated checkContainLogic to use bfSplit with props.
    • Removed on_click case from the main switch.
    • Updated checkEqualLogic, checkNotEqualLogic, checkContainAllLogic, checkNotContainLogic to use bfSplit.
    • Refined checkGreaterOrEqualLogic to use a dedicated fldType variable.
    • Adjusted checkBetweenLogic to parse logicsVal if it's a string.
    • Renamed cehckIsFunction to checkIsFunction and updated its regex.
    • Enhanced getFunctionValue to support new functions like _bf_format_datetime, _bf_datetime_difference, _bf_add_subtract_datetime, _bf_concat, and _bf_number.
    • Modified checkLogic to pass targetFldKey and fieldValues correctly, and added a check for isRepeaterField.
    • Updated mutateString to handle new special functions and correctly process field names.
  • packages/bit-conditionals/src/setActions.js
    • Refactored setFieldValue to improve handling of radio, checkbox, decision-box, and GDPR fields, including triggering input events for conditional logic.
    • Introduced debounce for saveFormProgress.
    • Updated setDisabled to include gdpr fields.
    • Enhanced setReadonly to add/remove a 'readonly' class.
    • Added triggerEvent helper.
    • Reordered logic in setActionValue for _bf_step_no.
    • Added handleSetConfigOption and integrated it into setActions switch.
  • packages/bit-conversational-form/.turbo/turbo-build.log
    • Added raw file.
  • packages/bit-conversational-form/dist/bit-conversational-form.min.js
    • Added raw file.
  • packages/bit-conversational-form/dist/handleConversationalFormMsg.min.js
    • Added raw file.
  • packages/bit-conversational-form/node_modules/.bin/browserslist
    • Added raw file.
  • packages/bit-conversational-form/node_modules/.bin/cross-env
    • Added raw file.
  • packages/bit-conversational-form/node_modules/.bin/cross-env-shell
    • Added raw file.
  • packages/bit-conversational-form/node_modules/.bin/rollup
    • Added raw file.
  • packages/bit-conversational-form/node_modules/.bin/webpack
    • Added raw file.
  • packages/bit-conversational-form/node_modules/@babel/preset-env
    • Added raw file.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-babel
    • Added raw file.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-node-resolve
    • Added raw file.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-terser
    • Added raw file.
  • packages/bit-conversational-form/node_modules/cross-env
    • Added raw file.
  • packages/bit-conversational-form/node_modules/rollup
    • Added raw file.
  • packages/bit-conversational-form/node_modules/rollup-plugin-livereload
    • Added raw file.
  • packages/bit-conversational-form/node_modules/rollup-plugin-serve
    • Added raw file.
  • packages/bit-conversational-form/node_modules/terser-webpack-plugin
    • Added raw file.
  • packages/bit-conversational-form/node_modules/webpack
    • Added raw file.
  • packages/bit-conversational-form/package.json
    • Added raw file.
  • packages/bit-conversational-form/rollup.config.js
    • Added raw file.
  • packages/bit-conversational-form/src/bit-conversational-form.js
    • Added raw file.
  • packages/bit-conversational-form/src/class-conversational-form.js
    • Added raw file.
  • packages/bit-conversational-form/src/handleConversationalFormMsg.js
    • Added raw file.
  • packages/bit-conversational-form/webpack.config.js
    • Added raw file.
  • packages/bit-country-field/.turbo/turbo-build.log
    • Added raw file.
  • packages/bit-country-field/README.md
    • Added raw file.
Activity
  • The pull request introduces a new documentation file for external services, enhancing transparency.
  • Several build-related files and node_modules symbolic links were added across multiple packages, indicating a potential re-initialization or update of dependencies.
  • Core logic for CSS atomization and conditional form fields has been refined and expanded, suggesting ongoing development and bug fixing.
  • New conversational form components and message handling were introduced, pointing to the development of new user interaction features.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the project's frontend build processes and enhances the robustness and functionality of core features. It introduces a new documentation file for external service transparency and significantly refines the conditional logic system, making it more powerful and secure. The changes also reflect an update in how project dependencies are managed across various packages.

Highlights

  • Dependency Management Update: Numerous raw files and symlinks for Node.js modules and build tools (e.g., c8, jest, vite, @codemirror, react) have been added across multiple packages, indicating a significant update to the project's dependency management, likely involving pnpm.
  • CSS Atomization Logic Enhancements: Improved handling of CSS selector combination logic, including ignoring vendor-prefixed selectors, and more robust processing of CSS declarations and values with null/undefined checks and trimming.
  • Conditional Logic System Refinements: The conditional logic system has been significantly enhanced to support date-related logic, new utility functions for calculations and string manipulation, and improved handling of field values and actions, including debounced draft saving and event triggering.
  • New External Services Documentation: A new external-services.md document has been added, providing comprehensive details on third-party and external services that Bit Form may connect to, along with data handling and privacy information.
Changelog
  • external-services.md
    • Added a new document detailing external services and privacy information for Bit Form.
  • packages/atomize-css/node_modules/.bin/c8
    • Added raw file for c8 executable.
  • packages/atomize-css/node_modules/.bin/cssbeautify
    • Added raw file for cssbeautify executable.
  • packages/atomize-css/node_modules/.bin/jest
    • Added raw file for jest executable.
  • packages/atomize-css/node_modules/.bin/json-beautify
    • Added raw file for json-beautify executable.
  • packages/atomize-css/node_modules/.bin/sass
    • Added raw file for sass executable.
  • packages/atomize-css/node_modules/.bin/sort-json
    • Added raw file for sort-json executable.
  • packages/atomize-css/node_modules/.bin/vite
    • Added raw file for vite executable.
  • packages/atomize-css/node_modules/.bin/vitest
    • Added raw file for vitest executable.
  • packages/atomize-css/node_modules/@codemirror/lang-css
    • Added raw file for @codemirror/lang-css module.
  • packages/atomize-css/node_modules/@codemirror/lang-javascript
    • Added raw file for @codemirror/lang-javascript module.
  • packages/atomize-css/node_modules/@testing-library/jest-dom
    • Added raw file for @testing-library/jest-dom module.
  • packages/atomize-css/node_modules/@testing-library/react
    • Added raw file for @testing-library/react module.
  • packages/atomize-css/node_modules/@testing-library/user-event
    • Added raw file for @testing-library/user-event module.
  • packages/atomize-css/node_modules/@types/react
    • Added raw file for @types/react module.
  • packages/atomize-css/node_modules/@types/react-dom
    • Added raw file for @types/react-dom module.
  • packages/atomize-css/node_modules/@uiw/codemirror-theme-dracula
    • Added raw file for @uiw/codemirror-theme-dracula module.
  • packages/atomize-css/node_modules/@uiw/react-codemirror
    • Added raw file for @uiw/react-codemirror module.
  • packages/atomize-css/node_modules/@vitejs/plugin-react
    • Added raw file for @vitejs/plugin-react module.
  • packages/atomize-css/node_modules/@vitest/ui
    • Added raw file for @vitest/ui module.
  • packages/atomize-css/node_modules/allotment
    • Added raw file for allotment module.
  • packages/atomize-css/node_modules/colord
    • Added raw file for colord module.
  • packages/atomize-css/node_modules/cssbeautify
    • Added raw file for cssbeautify module.
  • packages/atomize-css/node_modules/jest
    • Added raw file for jest module.
  • packages/atomize-css/node_modules/json-beautify
    • Added raw file for json-beautify module.
  • packages/atomize-css/node_modules/react
    • Added raw file for react module.
  • packages/atomize-css/node_modules/react-dom
    • Added raw file for react-dom module.
  • packages/atomize-css/node_modules/sort-json
    • Added raw file for sort-json module.
  • packages/atomize-css/node_modules/vite
    • Added raw file for vite module.
  • packages/atomize-css/node_modules/vitest
    • Added raw file for vitest module.
  • packages/atomize-css/src/atomize-css/helpers/combineSelectors.js
    • Modified CSS selector combination logic to ignore vendor-prefixed selectors during concatenation.
  • packages/atomize-css/src/atomize-css/helpers/optimizeAndDefineCssClassProps.js
    • Updated CSS property optimization to handle potentially undefined declarations and ensure trimming of values.
  • packages/atomize-css/src/atomize-css/helpers/utils.js
    • Removed deepCopy import.
    • Replaced eval with a new calculate function for safer arithmetic operations in expressCalcFunc.
    • Added logic to expressCssVar to handle reserved CSS variables (--bfv-) and prevent their replacement.
    • Adjusted optimizeQuadValue to ensure consistent spacing for two and three-part CSS values.
  • packages/bit-advanced-datetime-field/.turbo/turbo-build.log
    • Added build log file.
  • packages/bit-advanced-datetime-field/README.MD
    • Added README file.
  • packages/bit-advanced-datetime-field/dist/bit-advanced-datetime-field.min.js
    • Added minified JavaScript bundle for the advanced datetime field.
  • packages/bit-advanced-datetime-field/node_modules/.bin/browserslist
    • Added raw file for browserslist executable.
  • packages/bit-advanced-datetime-field/node_modules/.bin/cross-env
    • Added raw file for cross-env executable.
  • packages/bit-advanced-datetime-field/node_modules/.bin/cross-env-shell
    • Added raw file for cross-env-shell executable.
  • packages/bit-advanced-datetime-field/node_modules/.bin/rollup
    • Added raw file for rollup executable.
  • packages/bit-advanced-datetime-field/node_modules/.bin/webpack
    • Added raw file for webpack executable.
  • packages/bit-advanced-datetime-field/node_modules/@babel/preset-env
    • Added raw file for @babel/preset-env module.
  • packages/bit-advanced-datetime-field/node_modules/@rollup/plugin-babel
    • Added raw file for @rollup/plugin-babel module.
  • packages/bit-advanced-datetime-field/node_modules/@rollup/plugin-node-resolve
    • Added raw file for @rollup/plugin-node-resolve module.
  • packages/bit-advanced-datetime-field/node_modules/@rollup/plugin-terser
    • Added raw file for @rollup/plugin-terser module.
  • packages/bit-advanced-datetime-field/node_modules/flatpickr
    • Added raw file for flatpickr module.
  • packages/bit-advanced-datetime-field/node_modules/rollup
    • Added raw file for rollup module.
  • packages/bit-advanced-datetime-field/node_modules/rollup-plugin-livereload
    • Added raw file for rollup-plugin-livereload module.
  • packages/bit-advanced-datetime-field/node_modules/rollup-plugin-serve
    • Added raw file for rollup-plugin-serve module.
  • packages/bit-advanced-datetime-field/node_modules/terser-webpack-plugin
    • Added raw file for terser-webpack-plugin module.
  • packages/bit-advanced-datetime-field/node_modules/webpack
    • Added raw file for webpack module.
  • packages/bit-advanced-datetime-field/package.json
    • Added package configuration file.
  • packages/bit-advanced-datetime-field/rollup.config.js
    • Added Rollup configuration file.
  • packages/bit-advanced-datetime-field/webpack.config.js
    • Added Webpack configuration file.
  • packages/bit-advanced-file-up-field/.turbo/turbo-build.log
    • Added build log file.
  • packages/bit-advanced-file-up-field/dist/bit-advanced-file-up-field.min.js
    • Added minified JavaScript bundle for the advanced file upload field.
  • packages/bit-advanced-file-up-field/node_modules/.bin/browserslist
    • Added raw file for browserslist executable.
  • packages/bit-advanced-file-up-field/node_modules/.bin/cross-env
    • Added raw file for cross-env executable.
  • packages/bit-advanced-file-up-field/node_modules/.bin/cross-env-shell
    • Added raw file for cross-env-shell executable.
  • packages/bit-advanced-file-up-field/node_modules/.bin/webpack
    • Added raw file for webpack executable.
  • packages/bit-advanced-file-up-field/node_modules/@babel/preset-env
    • Added raw file for @babel/preset-env module.
  • packages/bit-advanced-file-up-field/node_modules/@rollup/plugin-babel
    • Added raw file for @rollup/plugin-babel module.
  • packages/bit-advanced-file-up-field/node_modules/@rollup/plugin-node-resolve
    • Added raw file for @rollup/plugin-node-resolve module.
  • packages/bit-advanced-file-up-field/node_modules/@rollup/plugin-terser
    • Added raw file for @rollup/plugin-terser module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond
    • Added raw file for bit-filepond module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-file-validate-size
    • Added raw file for bit-filepond-plugin-file-validate-size module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-file-validate-type
    • Added raw file for bit-filepond-plugin-file-validate-type module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-crop
    • Added raw file for bit-filepond-plugin-image-crop module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-preview
    • Added raw file for bit-filepond-plugin-image-preview module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-resize
    • Added raw file for bit-filepond-plugin-image-resize module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-transform
    • Added raw file for bit-filepond-plugin-image-transform module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-image-validate-size
    • Added raw file for bit-filepond-plugin-image-validate-size module.
  • packages/bit-advanced-file-up-field/node_modules/bit-filepond-plugin-media-preview
    • Added raw file for bit-filepond-plugin-media-preview module.
  • packages/bit-advanced-file-up-field/node_modules/cross-env
    • Added raw file for cross-env module.
  • packages/bit-advanced-file-up-field/node_modules/rollup
    • Added raw file for rollup module.
  • packages/bit-advanced-file-up-field/node_modules/rollup-plugin-livereload
    • Added raw file for rollup-plugin-livereload module.
  • packages/bit-advanced-file-up-field/node_modules/rollup-plugin-serve
    • Added raw file for rollup-plugin-serve module.
  • packages/bit-advanced-file-up-field/node_modules/terser-webpack-plugin
    • Added raw file for terser-webpack-plugin module.
  • packages/bit-advanced-file-up-field/node_modules/webpack
    • Added raw file for webpack module.
  • packages/bit-advanced-file-up-field/package.json
    • Added package configuration file.
  • packages/bit-advanced-file-up-field/rollup.config.js
    • Added Rollup configuration file.
  • packages/bit-advanced-file-up-field/src/bit-advanced-file-up-field.js
    • Added source file for the advanced file upload field.
  • packages/bit-advanced-file-up-field/webpack.config.js
    • Added Webpack configuration file.
  • packages/bit-conditionals/.turbo/turbo-build.log
    • Added build log file.
  • packages/bit-conditionals/dist/bit-conditionals.min.js
    • Added minified JavaScript bundle for conditional logic.
  • packages/bit-conditionals/node_modules/.bin/browserslist
    • Added raw file for browserslist executable.
  • packages/bit-conditionals/node_modules/.bin/rollup
    • Added raw file for rollup executable.
  • packages/bit-conditionals/node_modules/.bin/webpack
    • Added raw file for webpack executable.
  • packages/bit-conditionals/node_modules/@babel/preset-env
    • Added raw file for @babel/preset-env module.
  • packages/bit-conditionals/node_modules/@rollup/plugin-babel
    • Added raw file for @rollup/plugin-babel module.
  • packages/bit-conditionals/node_modules/@rollup/plugin-node-resolve
    • Added raw file for @rollup/plugin-node-resolve module.
  • packages/bit-conditionals/node_modules/@rollup/plugin-terser
    • Added raw file for @rollup/plugin-terser module.
  • packages/bit-conditionals/node_modules/rollup
    • Added raw file for rollup module.
  • packages/bit-conditionals/node_modules/rollup-plugin-livereload
    • Added raw file for rollup-plugin-livereload module.
  • packages/bit-conditionals/node_modules/rollup-plugin-serve
    • Added raw file for rollup-plugin-serve module.
  • packages/bit-conditionals/node_modules/terser-webpack-plugin
    • Added raw file for terser-webpack-plugin module.
  • packages/bit-conditionals/node_modules/webpack
    • Added raw file for webpack module.
  • packages/bit-conditionals/package.json
    • Updated packageManager version to pnpm@9.4.0.
  • packages/bit-conditionals/src/bit-conditionals.js
    • Updated generateFieldName to safely handle null or undefined field names.
    • Enhanced getAllFieldsValueFromForm to correctly handle unselected radio/checkbox fields and include _bf_step_no for multi-step forms.
    • Refactored onBlurHandler to merge extraFields into the main fields object and use the updated newProps for conditional logic evaluation.
    • Modified onBlurHandler to remove specific on_click logic checks and integrate bf_modify_workflow_logic_status for custom logic modifications.
  • packages/bit-conditionals/src/checkLogic.js
    • Introduced dateTypes array and integrated bfDateFieldsLogicCheck for date-related conditional logic.
    • Removed on_click logic from compareValueLogic as it's now handled differently.
    • Updated checkEqualLogic, checkNotEqualLogic, checkContainLogic, checkContainAllLogic, checkNotContainLogic to use bfSplit for consistent value parsing.
    • Refactored getFunctionValue to use checkIsFunction and added support for new functions: _bf_format_datetime, _bf_datetime_difference, _bf_add_subtract_datetime, _bf_concat, and _bf_number.
    • Modified checkLogic to pass targetFldKey and fieldValues explicitly, and to handle repeater fields more robustly.
  • packages/bit-conditionals/src/setActions.js
    • Improved setFieldValue to trigger input events for radio, checkbox, decision-box, and GDPR fields, ensuring conditional logic re-evaluation.
    • Introduced debounce and debouncedSaveFormProgress for more efficient draft saving.
    • Updated setDisabled to correctly handle decision-box and gdpr field types.
    • Enhanced setReadonly to add/remove a readonly class for visual indication.
    • Added triggerEvent utility function.
    • Modified setActionValue to prioritize _bf_step_no and then other fields.
    • Added handleSetConfigOption to manage date/time field configurations.
  • packages/bit-conversational-form/.turbo/turbo-build.log
    • Added build log file.
  • packages/bit-conversational-form/dist/bit-conversational-form.min.js
    • Added minified JavaScript bundle for conversational forms.
  • packages/bit-conversational-form/dist/handleConversationalFormMsg.min.js
    • Added minified JavaScript bundle for conversational form message handling.
  • packages/bit-conversational-form/node_modules/.bin/browserslist
    • Added raw file for browserslist executable.
  • packages/bit-conversational-form/node_modules/.bin/cross-env
    • Added raw file for cross-env executable.
  • packages/bit-conversational-form/node_modules/.bin/cross-env-shell
    • Added raw file for cross-env-shell executable.
  • packages/bit-conversational-form/node_modules/.bin/rollup
    • Added raw file for rollup executable.
  • packages/bit-conversational-form/node_modules/.bin/webpack
    • Added raw file for webpack executable.
  • packages/bit-conversational-form/node_modules/@babel/preset-env
    • Added raw file for @babel/preset-env module.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-babel
    • Added raw file for @rollup/plugin-babel module.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-node-resolve
    • Added raw file for @rollup/plugin-node-resolve module.
  • packages/bit-conversational-form/node_modules/@rollup/plugin-terser
    • Added raw file for @rollup/plugin-terser module.
  • packages/bit-conversational-form/node_modules/cross-env
    • Added raw file for cross-env module.
  • packages/bit-conversational-form/node_modules/rollup
    • Added raw file for rollup module.
  • packages/bit-conversational-form/node_modules/rollup-plugin-livereload
    • Added raw file for rollup-plugin-livereload module.
  • packages/bit-conversational-form/node_modules/rollup-plugin-serve
    • Added raw file for rollup-plugin-serve module.
  • packages/bit-conversational-form/node_modules/terser-webpack-plugin
    • Added raw file for terser-webpack-plugin module.
  • packages/bit-conversational-form/node_modules/webpack
    • Added raw file for webpack module.
  • packages/bit-conversational-form/package.json
    • Added package configuration file.
  • packages/bit-conversational-form/rollup.config.js
    • Added Rollup configuration file.
  • packages/bit-conversational-form/src/bit-conversational-form.js
    • Added source file for conversational form initialization.
  • packages/bit-conversational-form/src/class-conversational-form.js
    • Added source file for the conversational form class.
  • packages/bit-conversational-form/src/handleConversationalFormMsg.js
    • Added source file for handling conversational form messages.
  • packages/bit-conversational-form/webpack.config.js
    • Added Webpack configuration file.
  • packages/bit-country-field/.turbo/turbo-build.log
    • Added build log file.
  • packages/bit-country-field/README.md
    • Added README file.
  • packages/bit-country-field/dist/bit-country-field.min.js
    • Added minified JavaScript bundle for the country field.
  • packages/bit-country-field/node_modules/.bin/browserslist
    • Added raw file for browserslist executable.
  • packages/bit-country-field/node_modules/.bin/cross-env
    • Added raw file for cross-env executable.
  • packages/bit-country-field/node_modules/.bin/cross-env-shell
    • Added raw file for cross-env-shell executable.
  • packages/bit-country-field/node_modules/.bin/rollup
    • Added raw file for rollup executable.
  • packages/bit-country-field/node_modules/.bin/webpack
    • Added raw file for webpack executable.
  • packages/bit-country-field/node_modules/@babel/preset-env
    • Added raw file for @babel/preset-env module.
  • packages/bit-country-field/node_modules/@rollup/plugin-babel
    • Added raw file for @rollup/plugin-babel module.
  • packages/bit-country-field/node_modules/@rollup/plugin-node-resolve
    • Added raw file for @rollup/plugin-node-resolve module.
  • packages/bit-country-field/node_modules/@rollup/plugin-terser
    • Added raw file for @rollup/plugin-terser module.
  • packages/bit-country-field/node_modules/cross-env
    • Added raw file for cross-env module.
  • packages/bit-country-field/node_modules/rollup
    • Added raw file for rollup module.
  • packages/bit-country-field/node_modules/rollup-plugin-livereload
    • Added raw file for rollup-plugin-livereload module.
  • packages/bit-country-field/node_modules/rollup-plugin-serve
    • Added raw file for rollup-plugin-serve module.
  • packages/bit-country-field/node_modules/terser-webpack-plugin
    • Added raw file for terser-webpack-plugin module.
  • packages/bit-country-field/node_modules/webpack
    • Added raw file for webpack module.
  • packages/bit-country-field/package.json
    • Added package configuration file.
  • packages/bit-country-field/rollup.config.js
    • Added Rollup configuration file.
  • packages/bit-country-field/src/bit-country-field.js
    • Added source file for the country field.
  • packages/bit-country-field/webpack.config.js
    • Added Webpack configuration file.
Activity
  • The pull request introduces a large number of new files, primarily raw files/symlinks for node modules and build configurations across several packages. This indicates a significant update to the project's dependency management or build process, likely related to pnpm and its handling of node_modules.
  • New documentation external-services.md was added, suggesting an effort to improve transparency regarding third-party integrations.
  • Core logic for CSS atomization and conditional fields has been refined, with improvements in robustness, safety (e.g., replacing eval), and extensibility (e.g., new functions for date/time and string manipulation in conditionals).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant number of new files, including new packages and features, alongside some refactoring. The most critical issue is the inclusion of node_modules directories in the repository. These contain hardcoded local paths that will break the build for other developers. They must be removed and added to .gitignore. Additionally, I've identified a security concern with the use of new Function() for parsing configurations, which could lead to XSS vulnerabilities, and a potential bug that could generate invalid CSS selectors. Please address these points to improve the codebase's security, stability, and maintainability.

Comment on lines +1 to +17
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -z "$NODE_PATH" ]; then
export NODE_PATH="/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/node_modules"
else
export NODE_PATH="/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/c8.js" "$@"
else
exec node "$basedir/../../../../node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/c8.js" "$@"
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file, and the entire node_modules directory, should not be committed to version control. It contains hardcoded absolute paths to a local development environment (e.g., /home/maruf/... on lines 9 and 11), which will cause the build to fail for other developers and in CI/CD pipelines. Please remove all node_modules directories from the repository and add node_modules/ to your .gitignore file. This applies to all node_modules directories and other generated dependency files included in this pull request.

@@ -227,13 +226,33 @@ export const expressCalcFunc = (calcStr, cssVarDefinations = {}) => {
const val1 = Number(variableDefinedArr[0].replace(/[^\.\d\s]/g, ''))
const val2 = Number(variableDefinedArr[2].replace(/[^\.\d\s]/g, ''))
// eslint-disable-next-line no-eval

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using eval() is a significant security risk as it can execute arbitrary code. It's great that you've replaced it with a safer, custom calculate function. This improves both the security and maintainability of the code.

this.#bitFlatPickrInstance = flatpickr
if (config?.advancedConfig) {
try {
this.#advanceConfig = (new Function(`return ${config.advancedConfig}`))()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The use of new Function() to parse config.advancedConfig is a potential security vulnerability, similar to using eval(). If the advancedConfig string can be influenced by a user, it could lead to Cross-Site Scripting (XSS) attacks. It's strongly recommended to use a safer method for parsing configurations, such as JSON.parse(). If the configuration needs to contain functions, consider refactoring the design to avoid executing arbitrary code from a string.

Comment on lines +40 to 44
if (!combinedCssRulesObj[validConcatSelectors.join(',')]) {
combinedCssRulesObj[validConcatSelectors.join(',')] = { [prop]: value }
} else {
combinedCssRulesObj[sameProValSelectors.join(',')][prop] = value
combinedCssRulesObj[validConcatSelectors.join(',')][prop] = value
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If validConcatSelectors is an empty array, validConcatSelectors.join(',') will produce an empty string ''. This will result in creating a CSS rule with an empty selector ('' { ... }), which is invalid and might cause issues in some CSS parsers or browsers. You should add a check to ensure validConcatSelectors is not empty before joining and creating the rule.

        if (validConcatSelectors.length > 0) {
          if (!combinedCssRulesObj[validConcatSelectors.join(',')]) {
            combinedCssRulesObj[validConcatSelectors.join(',')] = { [prop]: value }
          } else {
            combinedCssRulesObj[validConcatSelectors.join(',')][prop] = value
          }
        }

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a significant number of generated files, build artifacts, and local dependencies (node_modules) to the repository. Committing these files is highly discouraged as it bloats the repository, can cause merge conflicts, and, most critically, includes files with hardcoded absolute paths from a local development environment (e.g., /home/maruf/...). This will break the project for other developers and in CI/CD pipelines. Please add node_modules/, dist/, *.log, and other build artifacts to your .gitignore file and remove these files from the pull request. Additionally, there are a few areas for improvement in the source code, including a security vulnerability related to the use of new Function(), and some opportunities for code clarification and bug prevention.

Comment on lines +9 to +11
export NODE_PATH="/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/node_modules"
else
export NODE_PATH="/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/node_modules:$NODE_PATH"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains hardcoded absolute paths to a local directory (/home/maruf/...). This will cause the script to fail in any other environment. This file, along with the entire node_modules directory, is a local dependency and should not be committed to version control. Please ensure node_modules is listed in your .gitignore file. This comment applies to all similar executable files found in .bin directories within this pull request.

this.#bitFlatPickrInstance = flatpickr
if (config?.advancedConfig) {
try {
this.#advanceConfig = (new Function(`return ${config.advancedConfig}`))()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

Using new Function() to parse advancedConfig is a security risk, as it can execute arbitrary JavaScript code. If the advancedConfig string comes from an untrusted source (like user input), this could lead to a code injection vulnerability. It's highly recommended to use a safer method for parsing configurations, such as JSON.parse(). If the configuration needs to contain functions, consider refactoring to pass them in a more secure way.

Comment on lines +40 to 44
if (!combinedCssRulesObj[validConcatSelectors.join(',')]) {
combinedCssRulesObj[validConcatSelectors.join(',')] = { [prop]: value }
} else {
combinedCssRulesObj[sameProValSelectors.join(',')][prop] = value
combinedCssRulesObj[validConcatSelectors.join(',')][prop] = value
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If validConcatSelectors is an empty array, validConcatSelectors.join(',') will result in an empty string ''. This will create a CSS rule with an empty selector, which is likely not intended and could lead to unexpected behavior. It's better to guard this block to only execute if there are valid selectors to combine.

        if (validConcatSelectors.length > 0) {
          const combinedSelector = validConcatSelectors.join(',');
          if (!combinedCssRulesObj[combinedSelector]) {
            combinedCssRulesObj[combinedSelector] = { [prop]: value };
          } else {
            combinedCssRulesObj[combinedSelector][prop] = value;
          }
        }

if (value === undefined || value === null) value = ''
let newValue = value
.trim()
?.trim()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The optional chaining (?.) on .trim() is redundant here. The preceding line if (value === undefined || value === null) value = '' ensures that value is always a string, so it will always have the trim method. Removing the optional chaining will make the code slightly cleaner.

Suggested change
?.trim()
.trim()

@@ -1,6 +1,5 @@
/* eslint-disable no-useless-escape */
import colorMinify from './colorMinify'
import deepCopy from './deepCopy'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The deepCopy import is no longer used in this file and can be removed.

Comment on lines +221 to +222
// this.#document = null
// this.#dateTimeInputHidden = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This commented-out code should be removed. Leaving dead code in the repository can cause confusion and reduce maintainability.


#addEvent(element, eventType, eventAction) {
element.addEventListener(eventType, eventAction)
// this.#allEventListeners.push({ element, eventType, eventAction })

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line is commented out. Dead code should be removed to improve code clarity and maintainability.

elm?.setAttribute?.(name, value)
}

#select(selector) { return this.#fieldUploadWrapper.querySelector(selector) || console.error('selector not found', selector) }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using the logical OR operator (||) for side effects like logging an error can be confusing and is not a common pattern. It would be more readable and explicit to use a standard if statement to check for the element and log an error if it's not found.

  #select(selector) {
    const element = this.#fieldUploadWrapper.querySelector(selector)
    if (!element) {
      console.error('selector not found', selector)
    }
    return element
  }

Comment on lines +64 to 68
return function (...args) {
clearTimeout(timeoutId)
timeoutId = setTimeout(() => {
func.apply(this, args)
}, delay)
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The implementation of handleFormSaveDraft calls saveFormProgress directly on every event. This can lead to excessive calls, especially on frequent events like on_input. It's better to debounce this function to improve performance and avoid overwhelming the backend.

function debounce(func, delay) {
  let timeoutId
  return function (...args) {
    clearTimeout(timeoutId)
    timeoutId = setTimeout(() => {
      func.apply(this, args)
    }, delay)
  }
}

const debouncedSaveFormProgress = debounce((contentId) => typeof saveFormProgress !== 'undefined' && saveFormProgress(contentId), 2500)

const handleFormSaveDraft = (actionDetail, props) => {
  debouncedSaveFormProgress(props.contentId)
}

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several new features and fixes, particularly around conditional logic and new field types. The refactoring to move logic into helper functions and make the code more robust is a good improvement.

However, there are a few critical issues that need to be addressed:

  1. Committed node_modules and build artifacts: A large number of generated files from node_modules, dist, and .turbo directories have been included in this PR. These files are user-specific, contain absolute paths, and should not be part of the version control system. They will cause the project to break for other developers and unnecessarily bloat the repository. Please remove these directories from the PR and add them to your .gitignore file.

  2. Security Concern: The use of new Function() in the new advanced datetime field poses a potential XSS security risk. It's highly recommended to use a safer method like JSON.parse() for handling configurations.

I've left specific comments on the code with detailed feedback and suggestions for the issues I've found.

Comment on lines +1 to +17
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -z "$NODE_PATH" ]; then
export NODE_PATH="/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/node_modules"
else
export NODE_PATH="/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules/c8/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/c8@7.14.0/node_modules:/home/maruf/Local Sites/bit-formorg/app/public/wp-content/plugins/bitform/frontend-dev/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/c8.js" "$@"
else
exec node "$basedir/../../../../node_modules/.pnpm/c8@7.14.0/node_modules/c8/bin/c8.js" "$@"
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file, along with many others in this pull request, appears to be part of the node_modules directory and contains hardcoded absolute paths specific to a user's local machine (e.g., /home/maruf/...).

Checking node_modules and other generated files (like those in dist/ and .turbo/) into version control is a critical issue because:

  1. It breaks the build for other developers whose local paths do not match.
  2. It unnecessarily bloats the repository size.
  3. It can lead to hard-to-debug dependency conflicts.

The entire node_modules directory, as well as other build artifact directories, should be added to your .gitignore file to prevent these files from being committed. Please remove all such files from this pull request.

Comment on lines +40 to 44
if (!combinedCssRulesObj[validConcatSelectors.join(',')]) {
combinedCssRulesObj[validConcatSelectors.join(',')] = { [prop]: value }
} else {
combinedCssRulesObj[sameProValSelectors.join(',')][prop] = value
combinedCssRulesObj[validConcatSelectors.join(',')][prop] = value
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If validConcatSelectors is an empty array (which can happen if all selectors with the same property-value pair have vendor prefixes), validConcatSelectors.join(',') will result in an empty string. This will create a CSS rule with an empty selector ('' { ... }), which is invalid and can cause issues in CSS parsing.

You should add a check to ensure validConcatSelectors has elements before creating the combined rule.

        if (validConcatSelectors.length > 0) {
          if (!combinedCssRulesObj[validConcatSelectors.join(',')]) {
            combinedCssRulesObj[validConcatSelectors.join(',')] = { [prop]: value }
          } else {
            combinedCssRulesObj[validConcatSelectors.join(',')][prop] = value
          }
        }

this.#bitFlatPickrInstance = flatpickr
if (config?.advancedConfig) {
try {
this.#advanceConfig = (new Function(`return ${config.advancedConfig}`))()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using new Function() to parse config.advancedConfig is a security risk, similar to using eval(). If advancedConfig can be influenced by a user, it could lead to Cross-Site Scripting (XSS) vulnerabilities. It is strongly recommended to use a safer method for parsing this configuration, such as JSON.parse(). If the configuration needs to contain functions, consider a safer approach like registering functions and referencing them by name, rather than executing arbitrary code from a string.

Comment on lines +111 to +114
| **Autonami** | Marketing automation | Form field values | [Autonami](https://autonami.io/) | See service website |
| **Groundhogg** | Marketing automation | Form field values | [Groundhogg](https://www.groundhogg.io/) | See service website |
| **Encharge** | Email marketing | Form field values | [Encharge Terms](https://encharge.io/terms/) | [Encharge Privacy](https://encharge.io/privacy-policy/) |
| **SendFox** | Email marketing | Form field values | [SendFox](https://sendfox.com/) | See service website |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better transparency and user convenience, it would be helpful to provide direct links to the Terms of Service and Privacy Policy for services where it currently says 'See service website'. I've found the links for a few of them.

Suggested change
| **Autonami** | Marketing automation | Form field values | [Autonami](https://autonami.io/) | See service website |
| **Groundhogg** | Marketing automation | Form field values | [Groundhogg](https://www.groundhogg.io/) | See service website |
| **Encharge** | Email marketing | Form field values | [Encharge Terms](https://encharge.io/terms/) | [Encharge Privacy](https://encharge.io/privacy-policy/) |
| **SendFox** | Email marketing | Form field values | [SendFox](https://sendfox.com/) | See service website |
| **Autonami** | Marketing automation | Form field values | [Autonami Terms](https://autonami.com/terms-and-conditions/) | [Autonami Privacy](https://autonami.com/privacy-policy/) |
| **Groundhogg** | Marketing automation | Form field values | [Groundhogg Terms](https://www.groundhogg.io/terms-and-conditions/) | [Groundhogg Privacy](https://www.groundhogg.io/privacy-policy/) |
| **Encharge** | Email marketing | Form field values | [Encharge Terms](https://encharge.io/terms/) | [Encharge Privacy](https://encharge.io/privacy-policy/) |
| **SendFox** | Email marketing | Form field values | [SendFox Terms](https://sendfox.com/terms) | [SendFox Privacy](https://sendfox.com/privacy) |

Comment on lines +158 to +159
| **Integrately** | Workflow automation | Form field values | [Integrately](https://integrately.com/) | See service website |
| **Pabbly** | Workflow automation | Form field values | [Pabbly](https://www.pabbly.com/terms) | See service website |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It would be more helpful for users if direct links to the privacy policies were provided here instead of 'See service website'.

Suggested change
| **Integrately** | Workflow automation | Form field values | [Integrately](https://integrately.com/) | See service website |
| **Pabbly** | Workflow automation | Form field values | [Pabbly](https://www.pabbly.com/terms) | See service website |
| **Integrately** | Workflow automation | Form field values | [Integrately Terms](https://integrately.com/terms) | [Integrately Privacy](https://integrately.com/privacy-policy) |
| **Pabbly** | Workflow automation | Form field values | [Pabbly Terms](https://www.pabbly.com/terms) | [Pabbly Privacy](https://www.pabbly.com/privacy-policy/) |

Comment on lines 415 to 426
if (strArr.length === 2) {
return `${strArr[0]} ${strArr[1]}${hasImportant}`
return `${strArr[0]} ${strArr[1]}${hasImportant} `
}
if (strArr.length === 3 && strArr[0] === strArr[2]) {
return `${strArr[0]} ${strArr[1]}${hasImportant}`
return `${strArr[0]} ${strArr[1]}${hasImportant} `
}
if (strArr.length === 4 && strArr.every((val, i, arr) => val === arr[0])) {
return strArr[0] + hasImportant
}
if (strArr.length === 4 && strArr[0] === strArr[2] && strArr[1] === strArr[3]) {
return `${strArr[0]} ${strArr[1]}${hasImportant}`
return `${strArr[0]} ${strArr[1]}${hasImportant} `
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding a trailing space here seems incorrect and could cause issues with CSS parsing. The goal is likely to correctly format !important, but this change doesn't achieve that and may introduce subtle bugs.

A more robust way to handle !important would be to include the leading space when defining hasImportant, and then append it without any extra spaces.

For example:

const hasImportant = str.includes(' !important') ? ' !important' : '';
const trimmedStr = str.replace(/ !important/g, '').trim();
// ...
// then in return statements:
return `${strArr[0]} ${strArr[1]}${hasImportant}`;

This would correctly format values like 10px 20px !important.

elm?.setAttribute?.(name, value)
}

#select(selector) { return this.#fieldUploadWrapper.querySelector(selector) || console.error('selector not found', selector) }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This method logs an error but returns undefined when an element is not found. This can lead to subsequent TypeError: Cannot read properties of undefined if the caller doesn't explicitly check the return value, making debugging harder.

It would be more robust to just return the result of querySelector (null if not found) and let the caller handle it, possibly using optional chaining (?.). The error logging is helpful, but the return value is what causes the downstream issue.

  #select(selector) {
    const element = this.#fieldUploadWrapper.querySelector(selector)
    if (!element) {
      console.error('selector not found', selector)
    }
    return element
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant