ToolJet/frontend/src/AppBuilder/Header/CreateVersionModal.jsx

402 lines
15 KiB
React
Raw Normal View History

import React, { useEffect, useState } from 'react';
2025-02-25 06:52:50 +00:00
import { appVersionService, authenticationService, gitSyncService } from '@/_services';
import AlertDialog from '@/_ui/AlertDialog';
import { Alert } from '@/_ui/Alert';
import { toast } from 'react-hot-toast';
import { useTranslation } from 'react-i18next';
import Select from '@/_ui/Select';
import { shallow } from 'zustand/shallow';
import useStore from '@/AppBuilder/_stores/store';
import { useModuleContext } from '@/AppBuilder/_contexts/ModuleContext';
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
import { ButtonSolid } from '@/_ui/AppButton/AppButton';
import '../../_styles/version-modal.scss';
2025-02-25 06:52:50 +00:00
const CreateVersionModal = ({
showCreateAppVersion,
setShowCreateAppVersion,
handleCommitEnableChange,
canCommit,
orgGit,
fetchingOrgGit,
Enhance TypeScript support in frontend configuration (#15576) * test: verify pre-commit hook * fix: clean up code formatting and improve readability across multiple components * chore: update subproject commit reference in frontend/ee * chore: update eslint to version 9.26.0 and remove unused dependencies from package.json fix: update submodule reference in server/ee * chore: refactor ESLint configuration and add quiet linting script; update components to disable specific ESLint rules * chore: add GitHub Copilot review instructions for App Builder team Covers backward compatibility rules, styling conventions, state management, resolution system, widget definitions, and common review flags. * chore: add review instructions for App Builder, Data Migrations, Server Widget Config, Widget Components, and Widget Config * Enhance TypeScript support in frontend configuration - Added TypeScript parser and linting rules to ESLint configuration. - Updated Babel configuration to include TypeScript preset. - Modified package.json and package-lock.json to include TypeScript and related dependencies. - Introduced tsconfig.json for TypeScript compiler options. - Updated Webpack configuration to support .ts and .tsx file extensions. - Adjusted linting and formatting scripts to include TypeScript files. * chore: update TypeScript ESLint packages and subproject commits --------- Co-authored-by: kavinvenkatachalam <kavin.saratha@gmail.com> Co-authored-by: Johnson Cherian <johnsonc.dev@gmail.com>
2026-03-19 07:11:32 +00:00
handleCommitOnVersionCreation = () => {},
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
versionId,
onVersionCreated,
2025-02-25 06:52:50 +00:00
}) => {
const { moduleId } = useModuleContext();
const setResolvedGlobals = useStore((state) => state.setResolvedGlobals, shallow);
const [isCreatingVersion, setIsCreatingVersion] = useState(false);
const [versionName, setVersionName] = useState('');
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
const [versionDescription, setVersionDescription] = useState('');
const isGitSyncEnabled = orgGit?.git_ssh?.is_enabled || orgGit?.git_https?.is_enabled || orgGit?.git_lab?.is_enabled;
const {
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
changeEditorVersionAction,
environmentChangedAction,
2025-02-25 06:52:50 +00:00
fetchDevelopmentVersions,
developmentVersions,
appId,
selectedVersion,
currentMode,
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
currentEnvironment,
environments,
setIsEditorFreezed,
} = useStore(
(state) => ({
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
changeEditorVersionAction: state.changeEditorVersionAction,
environmentChangedAction: state.environmentChangedAction,
selectedEnvironment: state.selectedEnvironment,
2025-02-25 06:52:50 +00:00
fetchDevelopmentVersions: state.fetchDevelopmentVersions,
developmentVersions: state.developmentVersions,
2025-02-25 06:52:50 +00:00
featureAccess: state.license.featureAccess,
editingVersion: state.currentVersionId,
appId: state.appId ?? state.appStore.modules[moduleId]?.app?.appId,
currentVersionId: state.currentVersionId,
selectedVersion: state.selectedVersion,
currentMode: state.currentMode,
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
currentEnvironment: state.selectedEnvironment,
environments: state.environments,
setIsEditorFreezed: state.setIsEditorFreezed,
}),
shallow
);
const [selectedVersionForCreation, setSelectedVersionForCreation] = useState(null);
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
const textareaRef = React.useRef(null);
const handleDescriptionInput = (e) => {
const textarea = textareaRef.current;
if (!textarea) return;
textarea.style.height = 'auto';
const lineHeight = 24;
const maxLines = 4;
const maxHeight = lineHeight * maxLines;
textarea.style.height = Math.min(textarea.scrollHeight, maxHeight) + 'px';
textarea.style.overflowY = textarea.scrollHeight > maxHeight ? 'auto' : 'hidden';
};
useEffect(() => {
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
if (appId) {
fetchDevelopmentVersions(appId);
}
}, [appId, fetchDevelopmentVersions]);
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
// Set the version to promote when modal opens or when developmentVersions/versionId changes
useEffect(() => {
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
// Only run when modal is open
if (!showCreateAppVersion) {
return;
}
// Wait for developmentVersions to be loaded
if (!developmentVersions?.length) {
return;
}
// If versionId prop is provided, ONLY use that specific version
if (versionId) {
const versionToPromote = developmentVersions.find((version) => version?.id === versionId);
if (versionToPromote) {
setSelectedVersionForCreation(versionToPromote);
setVersionName(versionToPromote.name);
setVersionDescription(versionToPromote.description || '');
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
}
return;
}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
// If no versionId prop, use selectedVersion from store
if (selectedVersion?.id) {
const selected = developmentVersions.find((version) => version?.id === selectedVersion?.id);
if (selected) {
setSelectedVersionForCreation(selected);
setVersionName(selected.name);
setVersionDescription(selected.description || '');
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
return;
}
}
// Fallback: if no version is selected or found, use the first development version
if (developmentVersions.length > 0) {
setSelectedVersionForCreation(developmentVersions[0]);
setVersionName(developmentVersions[0].name);
setVersionDescription(developmentVersions[0].description || '');
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [developmentVersions, versionId, showCreateAppVersion]);
const { t } = useTranslation();
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
const createVersion = async () => {
if (versionName.trim().length > 25) {
toast.error('Version name should not be longer than 25 characters');
return;
}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
if (versionDescription.trim().length > 500) {
toast.error('Version description should not be longer than 500 characters');
return;
}
if (versionName.trim() == '') {
toast.error('Version name should not be empty');
return;
}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
if (!selectedVersionForCreation) {
toast.error('Please wait while versions are loading...');
return;
}
setIsCreatingVersion(true);
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
try {
await appVersionService.save(appId, selectedVersionForCreation.id, {
name: versionName,
description: versionDescription,
// need to add commit changes logic here
status: 'PUBLISHED',
});
toast.success('Version Created successfully');
setVersionName('');
setVersionDescription('');
setSelectedVersionForCreation(null);
setIsCreatingVersion(false);
setShowCreateAppVersion(false);
// Fetch versions after creation
if (onVersionCreated) {
onVersionCreated();
}
// Refresh development versions to update the lock status
fetchDevelopmentVersions(appId);
// Switch to the newly created published version properly
// The newly created version will be in the draft's environment (development)
// but with PUBLISHED status. We may need to switch environment first.
try {
const newVersionData = await appVersionService.getAppVersionData(
appId,
selectedVersionForCreation.id,
currentMode
);
// Set editor freeze state based on should_freeze_editor
if (newVersionData.should_freeze_editor !== undefined) {
setIsEditorFreezed(newVersionData.should_freeze_editor);
}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
if (newVersionData.editing_version?.id) {
const newVersionEnvironmentId = newVersionData.editing_version.currentEnvironmentId;
const isDifferentEnvironment = newVersionEnvironmentId !== currentEnvironment?.id;
if (isDifferentEnvironment) {
// Need to switch environment first, then switch to the version
const targetEnvironment = environments.find((env) => env.id === newVersionEnvironmentId);
if (targetEnvironment) {
// First switch environment
await environmentChangedAction(targetEnvironment, () => {
// Then switch to the new version
changeEditorVersionAction(
appId,
newVersionData.editing_version.id,
() => {
console.log('Successfully switched environment and version');
handleCommitOnVersionCreation(newVersionData, selectedVersion);
},
(error) => {
console.error('Error switching to newly created version:', error);
toast.error('Version created but failed to switch to it');
}
);
});
}
} else {
// Same environment, just switch version
await changeEditorVersionAction(
appId,
newVersionData.editing_version.id,
() => {
handleCommitOnVersionCreation(newVersionData, selectedVersion);
},
(error) => {
console.error('Error switching to newly created version:', error);
toast.error('Version created but failed to switch to it');
}
);
}
}
} catch (error) {
console.error('Error getting new version data:', error);
toast.error('Version created but failed to switch to it');
}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
} catch (error) {
if (error?.data?.code === '23505') {
toast.error('Version name already exists.');
} else if (error?.error) {
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
toast.error(error?.error);
Enhance TypeScript support in frontend configuration (#15576) * test: verify pre-commit hook * fix: clean up code formatting and improve readability across multiple components * chore: update subproject commit reference in frontend/ee * chore: update eslint to version 9.26.0 and remove unused dependencies from package.json fix: update submodule reference in server/ee * chore: refactor ESLint configuration and add quiet linting script; update components to disable specific ESLint rules * chore: add GitHub Copilot review instructions for App Builder team Covers backward compatibility rules, styling conventions, state management, resolution system, widget definitions, and common review flags. * chore: add review instructions for App Builder, Data Migrations, Server Widget Config, Widget Components, and Widget Config * Enhance TypeScript support in frontend configuration - Added TypeScript parser and linting rules to ESLint configuration. - Updated Babel configuration to include TypeScript preset. - Modified package.json and package-lock.json to include TypeScript and related dependencies. - Introduced tsconfig.json for TypeScript compiler options. - Updated Webpack configuration to support .ts and .tsx file extensions. - Adjusted linting and formatting scripts to include TypeScript files. * chore: update TypeScript ESLint packages and subproject commits --------- Co-authored-by: kavinvenkatachalam <kavin.saratha@gmail.com> Co-authored-by: Johnson Cherian <johnsonc.dev@gmail.com>
2026-03-19 07:11:32 +00:00
} else {
toast.error('Error while creating version. Please try again.');
}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
} finally {
setIsCreatingVersion(false);
}
};
return (
<AlertDialog
show={showCreateAppVersion}
closeModal={() => {
setVersionName('');
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
setVersionDescription('');
setSelectedVersionForCreation(null);
setShowCreateAppVersion(false);
}}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
title={'Save version'}
customClassName="create-version-modal"
>
{fetchingOrgGit ? (
<div className="loader-container">
<div className="primary-spin-loader"></div>
</div>
) : (
<form
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
className="create-version-form"
onSubmit={(e) => {
e.preventDefault();
createVersion();
}}
>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
<div className="create-version-body mb-3">
<div className="col">
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
<label className="form-label mb-1 ms-1" data-cy="version-name-label">
{t('editor.appVersionManager.versionName', 'Version Name')}
</label>
<input
type="text"
onChange={(e) => setVersionName(e.target.value)}
className="form-control"
data-cy="version-name-input-field"
placeholder={t('editor.appVersionManager.enterVersionName', 'Enter version name')}
disabled={isCreatingVersion}
value={versionName}
autoFocus={true}
minLength="1"
maxLength="25"
/>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
<small className="version-name-helper-text" data-cy="version-name-helper-text">
{t('editor.appVersionManager.versionNameHelper', 'Version name must be unique and max 25 characters')}
</small>
</div>
<div className="col mt-2">
<label className="form-label mb-1 ms-1" data-cy="version-description-label">
{t('editor.appVersionManager.versionDescription', 'Version description')}
</label>
<textarea
type="text"
ref={textareaRef}
onInput={handleDescriptionInput}
onChange={(e) => setVersionDescription(e.target.value)}
className="form-control app-version-description"
data-cy="version-description-input-field"
placeholder={t('editor.appVersionManager.enterVersionDescription', 'Enter version description')}
disabled={isCreatingVersion}
value={versionDescription}
autoFocus={true}
minLength="0"
maxLength="500"
rows={1}
/>
<small className="version-description-helper-text" data-cy="version-description-helper-text">
{t('editor.appVersionManager.versionDescriptionHelper', 'Description must be max 500 characters')}
</small>
</div>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
{/* <div className="mb-4 pb-2 version-select">
<label className="form-label" data-cy="create-version-from-label">
{t('editor.appVersionManager.createVersionFrom', 'Create version from')}
</label>
<div className="ts-control" data-cy="create-version-from-input-field">
<Select
options={options}
value={selectedVersionForCreation}
onChange={(version) => {
setSelectedVersionForCreation(version);
}}
useMenuPortal={false}
width="100%"
maxMenuHeight={100}
/>
</div>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
</div> */}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
{isGitSyncEnabled && (
<div className="commit-changes mt-3">
<div>
<input
className="form-check-input"
checked={canCommit}
type="checkbox"
onChange={handleCommitEnableChange}
data-cy="git-commit-input"
/>
</div>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
<div>
<div className="tj-text tj-text-xsm" data-cy="commit-changes-label">
Commit changes
</div>
<div className="tj-text-xxsm" data-cy="commit-helper-text">
This will commit the creation of the new version to the git repo
</div>
</div>
</div>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
)}
<div className="mt-3">
<Alert placeSvgTop={true} svg="warning-icon" className="create-version-alert">
<div
className="d-flex align-items-center"
style={{
justifyContent: 'space-between',
flexWrap: 'wrap',
width: '100%',
}}
>
<div className="create-version-helper-text" data-cy="create-version-helper-text">
Saving the version will lock it. To make any edits afterwards, you&apos;ll need to create a draft
version.
</div>
</div>
</Alert>
</div>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
</div>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
<div className="create-version-footer">
<hr className="section-divider" style={{ marginLeft: '-1.5rem', marginRight: '-1.5rem' }} />
<div className="col d-flex justify-content-end">
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
<ButtonSolid
size="lg"
onClick={() => {
setVersionName('');
setVersionDescription('');
setShowCreateAppVersion(false);
}}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
variant="tertiary"
className="mx-2"
data-cy="create-version-cancel-button"
>
{t('globals.cancel', 'Cancel')}
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
</ButtonSolid>
<ButtonSolid
size="lg"
variant="primary"
className=""
type="submit"
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
disabled={!selectedVersionForCreation || isCreatingVersion}
data-cy="create-version-save-button"
>
Feature/draft versioning support (#14284) * added app_versions fields * added data migration for backward compatibility * added ce specific logic * fixed ce migration (need to dev-test) * moved to data migration * migration changes * added endpoint to create draft version * backend changes * added draft to app_import scenario * added version description * minor changes (needs improvement) * fixed breaking dropdown in editor * updated submodule commits * revert package.json * revert ui not used changes * submodule changes * reverting non used files * ui changes * ui changes * ui changes * ui changes * ui changes * copywriting changes * ui changes * ui changes * edit version modal changes * ui integration changes * added button solid and removed unused css * removed commented code from create version modal * updated button size to use large * ui changes * draft version modal changes * added sub-module commits to main * draft version endpoint changes * ui changes for draft version modal * fix breaking ui * ui changes for banner * minor ui changes * remove scss changes from themes file * removed unused components (cleanup) * removed unused components (pr cleanup) * draft version changes * create version modal changes * canvas banner fixes * comment creation logic * refactor: version dropdown * update endpoint changes * fix: promote logic * update submodule * fix: released version and create version modal * fix draft version creation * minor ui changes * minor backend fixes * tooltip changes * added all components in same folder * added minor comments * import fixes * refactor files * fix: overlay issues * fix: on version creation * fix ce bugs * bug fixes * bug fixes * bug fixes * bug fixes * base merge * feat: draft versioning support with UI enhancements and backend adjustments - Updated AppCanvas to conditionally render AppCanvasBanner based on edit mode. - Enhanced CreateDraftVersionModal to handle version selection and creation logic. - Modified CreateVersionModal to streamline version creation process and handle commits. - Improved ReleaseConfirmation to include development versions in release context. - Refactored CreateDraftButton and VersionDropdownItem for better UI consistency and dark mode support. - Updated VersionManagerDropdown to manage draft versions and improve version selection logic. - Enhanced version switcher and promote/release buttons with dark mode styling. - Adjusted server-side features and constants to support new draft versioning capabilities. - Updated styles across components for better visual consistency and responsiveness. * minor fixes * rebase * merge base * update submodule * Add data-cy attribute for draft version components * Update cypress test cases for draft version feature * Update failing test cases * Update draft version test cases * Skip older flow * migration changes * migration fixes * Update the failed test cases * removed multiple api calls * fix: version set on draft creation * fixes * fix: version update on save version * fixes * name fix * fix version lock banner styling * bump version to 3.20.50-lts across all components --------- Co-authored-by: Vijaykant Yadav <vjy239@gmail.com> Co-authored-by: ajith-k-v <ajith.jaban@gmail.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2025-12-05 16:43:00 +00:00
{t('editor.appVersionManager.saveVersion', 'Save version')}
</ButtonSolid>
</div>
</div>
</form>
)}
</AlertDialog>
);
};
2025-02-25 06:52:50 +00:00
export default CreateVersionModal;