-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Release: Appbuilder Sprint 20 #14843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…data change (#14686) * fix: add effect to clear edited rows and update exposed variables on data change * added commnet for future reference
* Fixed multiline codehinter suggestions getting clipped in mozilla firefox * Fix for custom component and single line code editor
…tions (#14705) * Enhance canvas functionality with auto-scrolling during widget drag operations - Introduced a new custom hook `useCanvasAutoScroll` to manage auto-scrolling behavior when dragging widgets near the edges of the canvas. - Updated `Grid` component to integrate auto-scroll functionality, ensuring smooth user experience during drag-and-drop actions. - Removed redundant code related to canvas and sidebar element checks, streamlining the drop handler logic. - Adjusted widget positioning logic to account for scroll deltas, improving accuracy during drag operations. * Enhance widget drag functionality with bounds clamping - Implemented bounds clamping in the `Grid` component to prevent widgets from being dragged outside the canvas area. - Updated the `useCanvasAutoScroll` hook to include canvas width checks, ensuring elements remain within the visible area during drag operations. * Add autoscroll on resize * Add group dragging * Refactor * Remove resizing part * refactor * refactor
* feat: add show currency flag option * update server config * migrate showFlag variable * update import export service * fix import export service
* feat: add migration for app_history table and update entity structure * feat: refactor AppHistory module imports and add new services and guards * Fix: Vertical page menu minor enhancements * feat: add stream history feature and update related permissions and constants * feat: add AppStateRepository to AppHistoryModule imports and providers * feat: add NameResolverRepository to AppHistoryModule imports and providers * feat: implement NameResolverRepository and NameResolverService for component and page name resolution * feat: remove QueueHistoryIntegrationService and update AppHistoryModule to reflect changes * feat: update AppHistoryModule and AppHistoryRepository with new methods and refactor imports * feat: refactor AppHistoryModule and related services to streamline name resolution and history capture * feat: add AppStateRepository and HistoryQueueProcessor, refactor AppStateAggregatorService to utilize repository methods * feat: rename methods in AppStateRepository for clarity and update AppStateAggregatorService to reflect changes * feat: refactor history capture logic to use synchronous execution and improve error handling across services * Fix: Mobile view page menu UI enhancements * feat: enhance ability guards and repository methods for app history validation * Update submodule references * Migrate to shadcn sidebar component * plan * Fix: Components not getting pasted at correct position if user scrolled and pasted inside container components * Fix: Group components not getting pasted at correct position horizontally inside container components * POC for removing overlap prevention logic if not enough space present, incase user clicks somewhere to respect click position * Update frontend/src/AppBuilder/AppCanvas/Container.jsx Co-authored-by: Copilot <[email protected]> * modules and customGroup * feat: enhance AppHistoryModule registration with isMainImport flag * feat: update settings method to queue history capture after successful update * chore: update subproject commit reference in frontend/ee * feat: add function to delete app history for structural migrations * Refactor imports and enhance code organization across multiple files - Updated import paths to reflect the new directory structure in TooljetDatabase and AppBuilder components. - Consolidated utility functions in appUtils.js, removing redundant code and improving readability. - Enhanced error handling and state management in dataQueriesStore and resolverStore. - Added Bundle Analyzer plugin to webpack configuration for better performance insights. - Improved chunking strategy in webpack to optimize loading of libraries and components. - Refactored ErrorBoundary imports to maintain consistency across UI components. * feat: enhance UI components with new icons and styling adjustments * refactor: remove unused components and icons from QueryManager - Deleted QueryManagerHeader component and its associated logic. - Removed SuccessNotificationInputs component and its functionality. - Eliminated Transformation component and related code. - Deleted BreadcrumbsIcon, CreateIcon, PreviewIcon, RenameIcon, RunIcon, and ToggleQueryEditorIcon. - Updated imports in appUtils.js to reflect new icon paths. * Refactor editorHelpers and utils: Remove unused functions and imports, streamline background update logic, and adjust state handling. Comment out or delete handleReferenceTransactions and related logic in various stores to simplify data flow and improve maintainability. * Refactor queryPanelStore and storeHelper by commenting out unused imports and code. This cleanup improves code readability and maintainability. * builder roggle * role name * revert: Reverted the lazy loading changes * revert: Reverted the changes on App & AppRoute * Fix: Inside side effects, get the correct canvas element, disable page scrolling and reposition modal container when modal is opened * Fix: Use the side effects when modal is opened and closed * Update submodule references * struct * fix * sus * field fix * create app btn * fix: Corrected zustandDevTools enabled option logic * module visible * refactor: update license validation logic and improve feature access checks * app module * feat: Added modules support for public apps * update ee-frontend submodule ref * Enhance: Vertical page menu default styles * refactor: migrate license management to a new store and update related components * workflow enabled * feat: integrate license validation into Viewer component and remove deprecated license check * Revert "feat: integrate license validation into Viewer component and remove deprecated license check" This reverts commit b4b5218. * Revert "refactor: migrate license management to a new store and update related components" This reverts commit cd2936b. * chore: update subproject commit reference in server/ee * chore: merged with lts * chore: moved components from Editor to AppBuilder folder * chore: cleaned up the appbuilder imports * refactor: update license checks in PageSettingsTab components to use appPermissionPages feature flag * refactor: update license checks in QueryCardMenu and Inspector components to use appPermission feature flags * chore: update subproject commit reference * update submodule ref * Enhance: Horizontal page menu default styles * fix: Global search for multiselect column * Fix: More button on pages overflow is getting cropped and remove unnecessary calculations related to it * Refactor page menu code * Integrate shadcn navigation menu component for horizontal page menu * Update submodule ref * refactor: add license checks for page, query, and component permissions in app-permissions feature configuration * chore: update subproject commit reference in server/ee to latest version * chore: update subproject commit reference in server/ee to latest version * update submodule ref * Fix: Minimum width of the popup in horizontal page menu * Fixed UI issues * Removed commented code * Removed wrapper and unwanted code * Fix: Minor page menu bugs inside Editor * Fix: popover overflow issue and other minor bugs * Remove unnecessary package.json change * chore: fix import path casing for RealTimeEditor * Fix: Grid resizing issue and component selector overflow * Fix: Increased transition duration to 200 * Removed the classname change * Fix: Scrollbar visible in viewer in vertical page menu * Fix: Remove arbitrary variant chains since not supported in Tailwind v3 to fix animations in horizontal page menu * chore: update subproject commits for frontend and server * Refactored code * Update ee-frontend submodule reference * Removed leading and trailing icon width * chore: update subproject commit reference in server/ee to latest version * Refactor page menu styling part to make it reusable for mobile view * Integrate Shacn Sidebar component in page menu for mobile view * Update submodule references * fix: merge issues and minor bugs * Update frontend/src/_styles/pages-sidebar.scss Co-authored-by: Copilot <[email protected]> * update submodule ref * fixed: custom validation working for dropdown inside the listview * update submodule references * Fix: Broken app logo in editor incase app logo url is incorrect * Fix: Default styles * update submodule reference * Fix: Implement changes for legacy modal as well * Fix: Change state logic to dom manipulation logic on canvas scroll to prevent unnecessary re-renders * Fix: Change default border color to cc-Border/weak * Fix: Remove max width on overflow menu in horizontal page menu and prevent right sidebar to open on toggling page groups in overflow menu * Fix: Box shadow should only be visible for horizontal page menu only when canvas is scrolled and not on top * Update submodule references * Feat: Add support for icon in modal trigger * Update frontend/src/AppBuilder/Widgets/ModalV2/ModalV2.jsx Co-authored-by: Copilot <[email protected]> * Update frontend/src/AppBuilder/Widgets/ModalV2/helpers/stylesFactory.js Co-authored-by: Copilot <[email protected]> * chore: update subproject commit reference in frontend/ee * refactor: clean up controller methods and remove unused streamHistory and getEvents methods * chore: update subproject commit reference in frontend/ee * update submodule references * Fix: Scrollbar behaviour in vertical page menu * Fix: Group closes on selecting a page on vertical page menu * Remove log * fix: update BoundedBox widget styles and fix class names; add datepicker styles * feat: add permission checks based on selected data source scope in QueryCard component * Border weak added to containers * Added border weak to table and code editor * fix: enhance error handling in streamHistoryUpdates and update subproject reference * fix: fixed the bug on app history in capturing the query deletion * fix: Fixed unknown component issue while adding an event in query and pages. Added resolveEntityName method to handle entity name resolution for components, queries, and pages * feat: Add captureSettingsUpdateHistory method to log app version settings updates * fix: pageSettings were not properly restored while restoring the app history and version change * fix: Enhance settings update history capture with action type differentiation * feat: Optimize layout updates by batching component layout changes * fix: Prevent redundant canvasHeight updates when the value is unchanged * Changed default size of container based components to that of form * Organized accordians for ModalV2, Form and Container and added divider colors * Added container styles to some components * style: Update padding and spacing in app history styles for improved layout * chore: Update subproject commit reference for frontend/ee * chore: Update subproject commit references for frontend and server * Fix: update hover effect for app name display in EditAppName component * Fix: remove redundant darkMode prop from FormField component * fix: add !important to primary color for rc-slider track and handle * feat: implement batching for form component updates and layout changes * feat: enhance form component handling with batching and parent ID extraction * Update submodule references * Fix: Page of type app or url gets converted to default page on app import * feat: enhance page cloning with history capture functionality * fix: optimize parent change detection to prevent unnecessary batch updates during drag operations * feat: optimize query saving logic to skip unnecessary updates for name changes * Fix: Group not selected after nested page selection until hovered in horizontal menu * Revert "Revert "[refactor]: Fix leftsidebar on opening disturbing the scroll"" This reverts commit d712c47. * Fix: Navigation menu disappears when view switched between desktop and mobile view in editor * update ee-server submodule ref * update submodule references * Fix: Icon alignment issue * Reverted default sizes for calendar & kanban and made header title center aligned for form and container * feat: implement bulk creation of event handlers and optimize component event handling * chore: update subproject commit reference in frontend/ee * Revert "POC for removing overlap prevention logic if not enough space present, incase user clicks somewhere to respect click position" This reverts commit 8aec525. * feat: disable client overlay in webpack configuration * update the submodule refs * update submodule refs * update submodule reference for server/ee * refactor: rename `defaultDataSources` prop to `staticDataSources` in `DataSourceSelect` component. * update submodule refs * feat: add AppHistoryStreamService to manage app history streaming * update submodule reference for server/ee * update submodule reference for server/ee * fix: add null check in onHideSideEffects and remove unnecessary !important from sidebar height * fix: update submodule reference for server/ee * Fix: Page menu header overflowing the canvas on app mode change * Fix: Canvas width changes on opening left and right sidebar when page menu is side aligned and opened * Fix: App logo and name getting wrapped to new line in mobile view * chore: update submodule to latest commit ddc3418f for server/ee * Fix: Released app mobile view * Fix: sidebar footer getting cutoff in mobile view * chore: update submodules for frontend and server to latest commits * Update ee-server submodule reference * Update ee-server submodule reference * Button accordian renamed to trigger button * Migrations added * Migrations added * Submodule update * Comments resolved --------- Co-authored-by: Kavin Venkatachalam <[email protected]> Co-authored-by: devanshu052000 <[email protected]> Co-authored-by: Rudhra Deep Biswas <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: manishkushare <[email protected]> Co-authored-by: Johnson Cherian <[email protected]> Co-authored-by: Nishidh Jain <[email protected]> Co-authored-by: Kavin Venkatachalam <[email protected]>
…roperties panel (#14641) * Fix on canvas click closing popover would also switch right sidebar properties panel * Fix closing of date and time format popovers * update submodule * Add for table action button popover and inspector header actions
#14713) Co-authored-by: johnsoncherian <[email protected]>
…tainer with child components has reduced width from original component (#14743)
* refactor: BaseInput Component Structure * fix: Input overflowing over padding space in top alignment in default size
* feat: enhance AppHistoryModule registration with isMainImport flag * feat: update settings method to queue history capture after successful update * chore: update subproject commit reference in frontend/ee * feat: add function to delete app history for structural migrations * Refactor imports and enhance code organization across multiple files - Updated import paths to reflect the new directory structure in TooljetDatabase and AppBuilder components. - Consolidated utility functions in appUtils.js, removing redundant code and improving readability. - Enhanced error handling and state management in dataQueriesStore and resolverStore. - Added Bundle Analyzer plugin to webpack configuration for better performance insights. - Improved chunking strategy in webpack to optimize loading of libraries and components. - Refactored ErrorBoundary imports to maintain consistency across UI components. * feat: enhance UI components with new icons and styling adjustments * refactor: remove unused components and icons from QueryManager - Deleted QueryManagerHeader component and its associated logic. - Removed SuccessNotificationInputs component and its functionality. - Eliminated Transformation component and related code. - Deleted BreadcrumbsIcon, CreateIcon, PreviewIcon, RenameIcon, RunIcon, and ToggleQueryEditorIcon. - Updated imports in appUtils.js to reflect new icon paths. * Refactor editorHelpers and utils: Remove unused functions and imports, streamline background update logic, and adjust state handling. Comment out or delete handleReferenceTransactions and related logic in various stores to simplify data flow and improve maintainability. * Refactor queryPanelStore and storeHelper by commenting out unused imports and code. This cleanup improves code readability and maintainability. * builder roggle * role name * revert: Reverted the lazy loading changes * revert: Reverted the changes on App & AppRoute * Fix: Inside side effects, get the correct canvas element, disable page scrolling and reposition modal container when modal is opened * Fix: Use the side effects when modal is opened and closed * Update submodule references * struct * fix * sus * field fix * create app btn * fix: Corrected zustandDevTools enabled option logic * module visible * refactor: update license validation logic and improve feature access checks * app module * feat: Added modules support for public apps * update ee-frontend submodule ref * Enhance: Vertical page menu default styles * refactor: migrate license management to a new store and update related components * workflow enabled * feat: integrate license validation into Viewer component and remove deprecated license check * Revert "feat: integrate license validation into Viewer component and remove deprecated license check" This reverts commit b4b5218. * Revert "refactor: migrate license management to a new store and update related components" This reverts commit cd2936b. * chore: update subproject commit reference in server/ee * chore: merged with lts * chore: moved components from Editor to AppBuilder folder * chore: cleaned up the appbuilder imports * refactor: update license checks in PageSettingsTab components to use appPermissionPages feature flag * refactor: update license checks in QueryCardMenu and Inspector components to use appPermission feature flags * chore: update subproject commit reference * update submodule ref * Enhance: Horizontal page menu default styles * fix: Global search for multiselect column * Fix: More button on pages overflow is getting cropped and remove unnecessary calculations related to it * Refactor page menu code * Integrate shadcn navigation menu component for horizontal page menu * Update submodule ref * refactor: add license checks for page, query, and component permissions in app-permissions feature configuration * chore: update subproject commit reference in server/ee to latest version * chore: update subproject commit reference in server/ee to latest version * update submodule ref * Fix: Minimum width of the popup in horizontal page menu * Fixed UI issues * Removed commented code * Removed wrapper and unwanted code * Fix: Minor page menu bugs inside Editor * Fix: popover overflow issue and other minor bugs * Remove unnecessary package.json change * chore: fix import path casing for RealTimeEditor * Fix: Grid resizing issue and component selector overflow * Fix: Increased transition duration to 200 * Removed the classname change * Fix: Scrollbar visible in viewer in vertical page menu * Fix: Remove arbitrary variant chains since not supported in Tailwind v3 to fix animations in horizontal page menu * chore: update subproject commits for frontend and server * Refactored code * Update ee-frontend submodule reference * Removed leading and trailing icon width * chore: update subproject commit reference in server/ee to latest version * Refactor page menu styling part to make it reusable for mobile view * Integrate Shacn Sidebar component in page menu for mobile view * Update submodule references * fix: merge issues and minor bugs * Update frontend/src/_styles/pages-sidebar.scss Co-authored-by: Copilot <[email protected]> * update submodule ref * fixed: custom validation working for dropdown inside the listview * update submodule references * Fix: Broken app logo in editor incase app logo url is incorrect * Fix: Default styles * update submodule reference * Fix: Implement changes for legacy modal as well * Fix: Change state logic to dom manipulation logic on canvas scroll to prevent unnecessary re-renders * Fix: Change default border color to cc-Border/weak * Fix: Remove max width on overflow menu in horizontal page menu and prevent right sidebar to open on toggling page groups in overflow menu * Fix: Box shadow should only be visible for horizontal page menu only when canvas is scrolled and not on top * Update submodule references * Feat: Add support for icon in modal trigger * Update frontend/src/AppBuilder/Widgets/ModalV2/ModalV2.jsx Co-authored-by: Copilot <[email protected]> * Update frontend/src/AppBuilder/Widgets/ModalV2/helpers/stylesFactory.js Co-authored-by: Copilot <[email protected]> * chore: update subproject commit reference in frontend/ee * refactor: clean up controller methods and remove unused streamHistory and getEvents methods * chore: update subproject commit reference in frontend/ee * Update default styles for Table component * Remove padding from table * Update all colors and their opacity and add change indicator * Add support for tabler-icons in AppButton * Update UI for Save/Discard changes buttons * Update UI for search input * Update icon and button for filter popup * Update styles for filter button and search input * Update table header interaction and icons * Enhance overlay trigger component * Update footer styling and alignment * Revamp the table action buttons in Table footer and update UI for popups * Update UI for pagination in Table footer * Fix style for different row styles * Fix all row interactions * update submodule references * Update frontend/src/AppBuilder/Widgets/NewTable/_components/Footer/_components/ControlButtons.jsx Co-authored-by: Copilot <[email protected]> * Fix: Scrollbar behaviour in vertical page menu * Fix: Group closes on selecting a page on vertical page menu * Remove log * fix: update BoundedBox widget styles and fix class names; add datepicker styles * feat: add permission checks based on selected data source scope in QueryCard component * Fix: default styles for header casing and cell height * Fix: column header changes height when sorting is added * Fix: Dropdown to select visibility of columns should not have max width * Fix: Icon and placeholder shifts when I focus on the search input * Fix: Border under header is missing when row style changed to striped * Fix: refactor logic * Fix: Pagination button's hover state still visible when disabled * Fix: Change UI for the row selection checkbox * fix: enhance error handling in streamHistoryUpdates and update subproject reference * fix: fixed the bug on app history in capturing the query deletion * fix: Fixed unknown component issue while adding an event in query and pages. Added resolveEntityName method to handle entity name resolution for components, queries, and pages * feat: Add captureSettingsUpdateHistory method to log app version settings updates * fix: pageSettings were not properly restored while restoring the app history and version change * fix: Enhance settings update history capture with action type differentiation * feat: Optimize layout updates by batching component layout changes * fix: Prevent redundant canvasHeight updates when the value is unchanged * Fix: Column should have border on all side when hovered and height shouldn't flicker * style: Update padding and spacing in app history styles for improved layout * Fix: Increase min column width to 68px and fix column header UI accordingly * Fix: row height diff between striped and regular row style and colors in striped row style * chore: Update subproject commit reference for frontend/ee * chore: Update subproject commit references for frontend and server * Fix: update hover effect for app name display in EditAppName component * Fix: remove redundant darkMode prop from FormField component * fix: add !important to primary color for rc-slider track and handle * feat: implement batching for form component updates and layout changes * feat: enhance form component handling with batching and parent ID extraction * Update submodule references * Fix: Page of type app or url gets converted to default page on app import * feat: enhance page cloning with history capture functionality * fix: optimize parent change detection to prevent unnecessary batch updates during drag operations * feat: optimize query saving logic to skip unnecessary updates for name changes * Fix: Group not selected after nested page selection until hovered in horizontal menu * Revert "Revert "[refactor]: Fix leftsidebar on opening disturbing the scroll"" This reverts commit d712c47. * Fix: Navigation menu disappears when view switched between desktop and mobile view in editor * update ee-server submodule ref * update submodule references * Fix: Icon alignment issue * feat: implement bulk creation of event handlers and optimize component event handling * chore: update subproject commit reference in frontend/ee * Revert "POC for removing overlap prevention logic if not enough space present, incase user clicks somewhere to respect click position" This reverts commit 8aec525. * feat: disable client overlay in webpack configuration * update the submodule refs * update submodule refs * update submodule reference for server/ee * refactor: rename `defaultDataSources` prop to `staticDataSources` in `DataSourceSelect` component. * update submodule refs * feat: add AppHistoryStreamService to manage app history streaming * update submodule reference for server/ee * update submodule reference for server/ee * fix: add null check in onHideSideEffects and remove unnecessary !important from sidebar height * fix: update submodule reference for server/ee * Fix: Page menu header overflowing the canvas on app mode change * Fix: Canvas width changes on opening left and right sidebar when page menu is side aligned and opened * Fix: App logo and name getting wrapped to new line in mobile view * chore: update submodule to latest commit ddc3418f for server/ee * Fix: Released app mobile view * Fix: sidebar footer getting cutoff in mobile view * update submodule references * Fix: Change min column width back to 60px for backward compatibility * Fix: While dragging table ensure all popups close * chore: update submodules for frontend and server to latest commits * Update ee-server submodule reference * Update ee-server submodule reference * update submodule references * Fix: Add button to go to last/first page in pagination popover * update submodule ref * Fix: The last/first page button should stick to the top and bottom respectively * Fix: Implemented virtualization for the pagination popup * update submodule references * Fix: Change behaviour of Last/First page buttons in pagination popover --------- Co-authored-by: Rudhra Deep Biswas <[email protected]> Co-authored-by: Kavin Venkatachalam <[email protected]> Co-authored-by: manishkushare <[email protected]> Co-authored-by: Johnson Cherian <[email protected]> Co-authored-by: Nishidh Jain <[email protected]> Co-authored-by: Kavin Venkatachalam <[email protected]> Co-authored-by: Copilot <[email protected]>
…nside list view and kanban component (#14791) * fix: Tags not visible and radio buttons being disabled when dropped inside list view and kanban component * fix: Clicking on radio options other than from row 1 still updates the value for the first row instead of current row option
|
Bito Automatic Review Skipped - Branch Excluded |
…stview subcontainers (#14688) * fix: enhance ConfigHandle to prevent rendering in read-only Kanban/Listview subcontainers * chore : removed comments * fix: pass readOnly prop to ConfigHandle in WidgetWrapper * fix: move readOnly check to prevent rendering of ConfigHandle
|
Bito Automatic Review Skipped - Branch Excluded |
Changes SummaryThis PR contains a significant AppBuilder sprint release (S20) with 14 commits introducing canvas auto-scrolling during widget drag operations, major Table component styling overhaul, BaseInput component refactoring, new 'Reset Query' action, fixes for components inside ListView/Kanban containers, and multiple widget styling enhancements with new default styles for several components. Type: mixed Components Affected: AppCanvas/Grid (auto-scroll during drag), Table/NewTable (styling and UI overhaul), BaseInput (component structure refactoring), Form (header/footer dividers, exposed variables), ModalV2 (divider styling), Dropdown/MultiSelect (scroll to selected option), RadioButtonV2 (fix for ListView/Kanban), ConfigHandle (read-only mode handling), QueryPanel (reset query functionality), EventManager/ActionTypes (reset-query action), Calendar, Chat, CodeEditor, PDF, CustomComponent, Container, CurrencyInput (default styles) Architecture Impact
Risk Areas: Data migrations (3 new migrations) for updating component styles - risk of incomplete migration affecting existing apps, Canvas auto-scroll feature interacts with multiple drag operations (single, group, virtual target) - complex state management, BaseInput refactoring changes height calculation and styling which could affect all input-type widgets, Form exposed variables now include functions via deepCloneWithFunctions - potential serialization issues, Table styling overhaul with many CSS changes could cause visual regressions, RadioButton ID generation change for subcontainers could break accessibility or label associations Suggestions
Full review in progress... | Powered by diffray |
| <SolidIcon fill={'var(--icons-default)'} width="16" name="TriangleUpCenter" /> | ||
| </div> | ||
| </div> | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 MEDIUM - Missing dependencies in useEffect hook
Category: bug
Description:
The useEffect hook uses props.setExposedVariable but dependency array only includes inputLogic.value
Suggestion:
Add props.setExposedVariable to the dependency array, or verify it's stable
Confidence: 75%
Rule: react_conditional_hook_call
| useEffect(() => { | ||
| const completedLabelColor = component?.component?.definition?.styles?.completedLabel?.value; | ||
| if (variant !== prevVariant) { | ||
| if (variant === "numbers" && completedLabelColor === "#1B1F24") { | ||
| paramUpdated({ name: 'completedLabel' }, 'value', "#FFFFFF", 'styles', false, {}); | ||
| } else if (variant === "titles" && completedLabelColor === "#FFFFFF") { | ||
| paramUpdated({ name: 'completedLabel' }, 'value', "#1B1F24", 'styles', false, {}); | ||
| if (variant === 'numbers' && completedLabelColor === '#1B1F24') { | ||
| paramUpdated({ name: 'completedLabel' }, 'value', '#FFFFFF', 'styles', false, {}); | ||
| } else if (variant === 'titles' && completedLabelColor === '#FFFFFF') { | ||
| paramUpdated({ name: 'completedLabel' }, 'value', '#1B1F24', 'styles', false, {}); | ||
| } | ||
| } | ||
|
|
||
| }, [variant]) | ||
| }, [variant]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 MEDIUM - Missing dependencies in useEffect hook
Category: bug
Description:
useEffect uses component, prevVariant, paramUpdated but only [variant] in dependency array
Suggestion:
Add component and paramUpdated to dependency array or wrap in useCallback
Confidence: 78%
Rule: react_conditional_hook_call
| const overRideFunction = React.useCallback((context) => autoCompleteExtensionConfig(context), [paramList]); | ||
| const { handleTogglePopupExapand, isOpen, setIsOpen, forceUpdate } = portalProps; | ||
| let cyLabel = paramLabel ? paramLabel.toLowerCase().trim().replace(/\s+/g, '-') : props.cyLabel; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 MEDIUM - Missing dependencies in useCallback hook
Category: bug
Description:
useCallback for overRideFunction calls autoCompleteExtensionConfig which uses workflowSuggestions, getSuggestions, getServerSideGlobalResolveSuggestions, isInsideQueryManager, lang but only includes [paramList]
Suggestion:
Add missing dependencies to useCallback or document why they're intentionally excluded
Confidence: 80%
Rule: react_conditional_hook_call
| for (const component of components) { | ||
| const styles = component.styles ? { ...component.styles } : {}; | ||
| const componentType = component.type; | ||
|
|
||
| this.applyDefaultStyles(styles, componentType); | ||
|
|
||
| // Updating component using raw query | ||
| await queryRunner.query(`UPDATE components SET styles = $1 WHERE id = $2`, [ | ||
| JSON.stringify(styles), | ||
| component.id, | ||
| ]); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 CRITICAL - N+1 Query Pattern: Individual UPDATE queries in loop
Category: performance
Description:
Migration processes components in batches but executes individual UPDATE for each component. With thousands of components, this creates N individual UPDATE statements.
Suggestion:
Use bulk UPDATE with CASE statements or PostgreSQL's UPDATE with unnest() to reduce N queries to 1 per batch
Confidence: 95%
Rule: sql_n_plus_one_query
| } | ||
| } | ||
| setPreviewLoading(false); | ||
| setIsPreviewQueryLoading(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 MEDIUM - Console.log in production code
Category: quality
Description:
console.log statement in catch block should be removed or replaced with proper logging
Suggestion:
Remove console.log or replace with proper logging mechanism
Confidence: 90%
Rule: quality_avoid_console_in_production
|
|
||
| return ( | ||
| <div style={{ display: visibility ? 'flex' : 'none', width: width - 3, height, boxShadow }} data-cy={dataCy}> | ||
| <div className="d-flex position-relative h-100 flex-column" style={{ margin: '0 auto', overflow: 'hidden' }}> | ||
| <div | ||
| className="d-flex position-relative h-100 flex-column" | ||
| style={{ | ||
| margin: '0 auto', | ||
| overflow: 'hidden', | ||
| borderRadius: `${borderRadius}px`, | ||
| border: `1px solid ${borderColor}`, | ||
| }} | ||
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 MEDIUM - Potential SSRF in PDF download
Category: security
Description:
The downloadFile function uses fetch() with a user-controlled URL without validation. This could allow an attacker to make the client fetch arbitrary URLs.
Suggestion:
Validate the PDF URL before fetching: 1) Ensure URL uses safe protocols (http/https only), 2) Validate against allowlist of trusted domains, 3) Consider proxying PDF downloads through your backend.
Confidence: 75%
Rule: frontend_prevent_open_redirect_dom
| const TablerIcon = ({ name, ...props }) => { | ||
| // eslint-disable-next-line import/namespace | ||
| const IconElement = Icons[name] === undefined ? Icons['IconHome2'] : Icons[name]; | ||
| return <IconElement {...props} />; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 LOW - Component defined inside render function
Category: quality
Description:
The TablerIcon component is defined inside the ButtonBase component. This creates a new component definition on every render, which can cause performance issues and break React's reconciliation.
Suggestion:
Move TablerIcon outside of ButtonBase as a standalone component or use useMemo to memoize it.
Confidence: 85%
Rule: ts_component_files
| inputRef.current.style.height = '100%'; | ||
| return; | ||
| } | ||
| inputRef.current.style.height = 'auto'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 LOW - useCallback with mutable ref in dependencies
Category: quality
Description:
The resizeTextArea useCallback references inputRef.current in its dependency array which is a mutable ref value that React cannot track.
Suggestion:
Remove inputRef?.current from the dependency array since React refs are stable. The function will always have access to the current ref value.
Confidence: 85%
Rule: ts_memoize_components_and_callbacks_when_pr
| export const deepCloneWithFunctions = (obj) => { | ||
| return cloneDeepWith(obj, (value) => { | ||
| if (typeof value === 'function') { | ||
| return value; // Return function reference as-is | ||
| } | ||
| // Return undefined to let lodash handle default cloning | ||
| }); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 HIGH - New function deepCloneWithFunctions lacks test coverage
Category: testing
Description:
A new utility function deepCloneWithFunctions was added but no corresponding tests were created. This function is used in production code (Form.jsx) but has no test coverage.
Suggestion:
Add comprehensive tests for deepCloneWithFunctions covering: deep cloning with function preservation, nested functions, null/undefined values, and arrays containing functions.
Confidence: 90%
Rule: test_new_parameter_coverage
| } | ||
| } | ||
|
|
||
| private async processUpdates(queryRunner: QueryRunner, components: any[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 MEDIUM - Using 'any' type for components array
Category: bug
Description:
The 'components' parameter is typed as 'any[]', which bypasses type checking and can lead to runtime errors when accessing component properties.
Suggestion:
Define a proper interface for component objects that includes 'id' and 'properties' fields with their expected types.
Confidence: 75%
Rule: ts_any_type_usage
Review Summary
Validated 102 issues: 55 kept, 47 filtered Issues Found: 55See 36 individual line comment(s) for details. 📊 30 unique issue type(s) across 55 location(s) 📋 Full issue list (click to expand)🔴 CRITICAL - Stale closure bug in setColumnOrder callbackCategory: bug File: Description: The setColumnOrder callback receives Suggestion: Use Confidence: 98% Rule: 🔴 CRITICAL - N+1 Query Pattern: Individual UPDATE queries in loop (3 occurrences)Category: performance 📍 View all locations
Rule: 🟠 HIGH - Form input without associated label (2 occurrences)Category: quality 📍 View all locations
Rule: 🟠 HIGH - Interactive element without keyboard accessibility (3 occurrences)Category: quality 📍 View all locations
Rule: 🟠 HIGH - Missing cleanup and incomplete dependency array in useEffectCategory: bug File: Description: useEffect uses setTimeout without cleanup, and the dependency array doesn't include virtualizer or pageIndex which are used inside the effect. Suggestion: The code at lines 81-91 already includes cleanup. However, empty dependency array [] is intentional (runs once on mount). Issue is overstated. Confidence: 60% Rule: 🟠 HIGH - Event listener added without cleanup (2 occurrences)Category: bug 📍 View all locations
Rule: 🟠 HIGH - Single Responsibility Principle violation - runQuery (2 occurrences)Category: quality 📍 View all locations
Rule: 🟠 HIGH - Extremely long function (322 lines)Category: quality File: Description: The adjustComponentPositions function is over 300 lines with deeply nested logic and multiple responsibilities for visibility calculation, height calculation, layout calculations, etc. Suggestion: Break it down into: calculateContainerHeight(), adjustChildrenPositions(), handleDynamicHeight(), updateTemporaryLayouts() Confidence: 92% Rule: 🟠 HIGH - N+1 Query Pattern: Individual findOne queries for DataSourceOptions (4 occurrences)Category: performance 📍 View all locations
Rule: 🟠 HIGH - Quadratic loops in group drag: O(N×M) lookup (2 occurrences)Category: performance 📍 View all locations
Rule: 🟠 HIGH - Dynamic code execution using Function constructor (2 occurrences)Category: security 📍 View all locations
Rule: 🟠 HIGH - New function deepCloneWithFunctions lacks test coverageCategory: testing File: Description: A new utility function deepCloneWithFunctions was added but no corresponding tests were created. This function is used in production code (Form.jsx) but has no test coverage. Suggestion: Add comprehensive tests for deepCloneWithFunctions covering: deep cloning with function preservation, nested functions, null/undefined values, and arrays containing functions. Confidence: 90% Rule: 🟡 MEDIUM - Missing dependencies in useEffect hook (4 occurrences)Category: bug 📍 View all locations
Rule: 🟡 MEDIUM - Missing dependency in useEffect - variable name mismatch (2 occurrences)Category: bug 📍 View all locations
Rule: 🟡 MEDIUM - Console.log in production codeCategory: quality File: Description: console.log statement in catch block should be removed or replaced with proper logging Suggestion: Remove console.log or replace with proper logging mechanism Confidence: 90% Rule: 🟡 MEDIUM - Inline component definition causes unnecessary re-renders (2 occurrences)Category: performance 📍 View all locations
Rule: 🟡 MEDIUM - Direct DOM manipulation using querySelectorCategory: quality File: Description: Using document.querySelector to check for parent elements violates React best practices. However, this runs during component initialization outside React lifecycle. Suggestion: Use React refs and context to determine if component is inside query pane Confidence: 72% Rule: 🟡 MEDIUM - Hardcoded user-facing string with typo (2 occurrences)Category: quality 📍 View all locations
Rule: 🟡 MEDIUM - Module-level mutable state creates implicit singletonCategory: quality File: Description: Module-level mutable variables (previousActiveWidgets, previousActiveCanvas, processedComponents) act as implicit singletons creating shared mutable state across the app. Suggestion: Refactor to encapsulate state within a class or closure, or pass state as parameters Confidence: 75% Rule: 🟡 MEDIUM - Potential NaN in value parsingCategory: bug File: Description: parseFloat(props.properties.value) could return NaN if value is null, undefined, or non-numeric string. Number(NaN.toFixed(...)) returns NaN. Suggestion: Add null/undefined check: value: props.properties.value != null && !isNaN(parseFloat(props.properties.value)) ? Number(...) : null Confidence: 80% Rule: 🟡 MEDIUM - JSDoc @param missing for moduleId parameter (2 occurrences)Category: docs 📍 View all locations
Rule: 🟡 MEDIUM - Magic numbers without named constants (2 occurrences)Category: quality 📍 View all locations
Rule: 🟡 MEDIUM - Array index used as React keyCategory: quality File: Description: Using array index as key (line 196) can cause incorrect component state when the list order changes. Suggestion: Use a stable unique identifier for keys based on button type instead of index. Confidence: 68% Rule: 🟡 MEDIUM - Open redirect vulnerability in open-webpage action (2 occurrences)Category: security 📍 View all locations
Rule: 🟡 MEDIUM - JSON.parse without try-catch in event handlers (2 occurrences)Category: security 📍 View all locations
Rule: 🟡 MEDIUM - Using 'any' type for components arrayCategory: bug File: Description: The 'components' parameter is typed as 'any[]', which bypasses type checking and can lead to runtime errors when accessing component properties. Suggestion: Define a proper interface for component objects that includes 'id' and 'properties' fields with their expected types. Confidence: 75% Rule: 🔵 LOW - Using != instead of !== for comparisonCategory: bug File: Description: The code uses != (loose equality) to check width and label length which can lead to unexpected type coercion behavior. Suggestion: Use strict equality (!==) for comparisons: width !== 0 && label?.length !== 0 Confidence: 70% Rule: 🔵 LOW - React.memo comparison function returns nothing (4 occurrences)Category: quality 📍 View all locations
Rule: 🔵 LOW - Console.log left in production codeCategory: quality File: Description: A console.log statement 'console.log('here--- initDependencyGraph--- ');' is present. This appears to be debug code that should be removed before merging. Suggestion: Remove the console.log statement. Confidence: 95% Rule: 🔵 LOW - Component defined inside render functionCategory: quality File: Description: The Suggestion: Move Confidence: 85% Rule: Powered by diffray - AI Code Review Agent |
|
Bito Automatic Review Skipped - Branch Excluded |
|
Bito Automatic Review Skipped - Branch Excluded |
|
Bito Automatic Review Skipped - Branch Excluded |
QA Checklist