Skip to content

Enhance LoadSelectCms and LoadUploadFile components to preserve exist…#955

Open
sauravraw wants to merge 16 commits intodevfrom
bugfix/CMG-792
Open

Enhance LoadSelectCms and LoadUploadFile components to preserve exist…#955
sauravraw wants to merge 16 commits intodevfrom
bugfix/CMG-792

Conversation

@sauravraw
Copy link
Contributor

…ing file details during validation failures. Merge config data with Redux state to maintain user input integrity. Update Migration page logic to ensure non-empty values are prioritized, improving overall data consistency.

…ing file details during validation failures. Merge config data with Redux state to maintain user input integrity. Update Migration page logic to ensure non-empty values are prioritized, improving overall data consistency.
@sauravraw sauravraw requested a review from a team as a code owner February 13, 2026 07:35
…e modules. Upgrade axios to version 1.13.5 and jsonpath to version 1.2.0. Clean up package.json and package-lock.json files by removing deprecated and unnecessary entries to enhance project maintainability.
…grade @contentstack/cli-utilities to version 1.17.1, axios to version 1.13.5, and qs to version 6.14.2. Add new dependencies and ensure all packages are up-to-date for improved functionality and security.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances data preservation logic in the migration workflow to prevent loss of user-entered file details during validation failures. The changes modify three React components (LoadSelectCms, LoadUploadFile, and Migration page) to merge configuration data with existing Redux state, ensuring that non-empty user inputs are retained when validation fails or when configuration returns empty values.

Changes:

  • Enhanced LoadSelectCms and LoadUploadFile components to preserve existing file_details from Redux when validation fails or config data is unavailable
  • Updated Migration page to implement data merging logic that prioritizes non-empty values over potentially empty config values
  • Reorganized package dependencies across multiple package.json files, moving helmet from devDependencies to dependencies in upload-api, and removing unused dependencies

Reviewed changes

Copilot reviewed 8 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ui/src/pages/Migration/index.tsx Added logic to merge config data with existing Redux state when file validation fails, with fallback to preserve user input
ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx Modified file validation handler to preserve existing file_details when validation fails (status !== 200)
ui/src/components/LegacyCms/Actions/LoadSelectCms.tsx Updated CMS selection to merge config data with existing file_details, preserving non-empty values
upload-api/package.json Moved helmet from devDependencies to dependencies, removed unused packages
upload-api/package-lock.json Updated lock file to reflect package.json changes
upload-api/migration-contentful/package.json Updated jsonpath from ^1.1.1 to ^1.2.0
ui/package.json Removed unused testing and UI dependencies
package.json Removed unused root-level dependencies
api/package.json Removed unused dependencies, added lodash to dependencies
Files not reviewed (4)
  • api/package-lock.json: Language not supported
  • ui/package-lock.json: Language not supported
  • upload-api/migration-contentful/package-lock.json: Language not supported
  • upload-api/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ponent logic to prioritize non-empty config values over existing Redux state during file uploads. This enhances data integrity and consistency in the migration process.
…ge-lock.json across multiple modules for improved functionality and security. Additionally, add new qs dependency in upload-api for enhanced compatibility.
…ious dependencies, including @babel packages and axios, to their latest versions for improved functionality and security. Remove deprecated migration-related packages to streamline the project structure.
…Contentful, Sitecore, and WordPress. Each file specifies dependencies and versions to ensure consistent environments across migrations, enhancing functionality and maintainability.
…pment-only by adding "dev": true. Remove the ui package-lock.json file to streamline the project structure and eliminate unused dependencies.
…es. Update package.json and package-lock.json in upload-api to include new dependencies: fs-readdir-recursive, lodash, mkdirp, and moment for enhanced functionality. Clean up unused dependencies to streamline project structure.
…ge-lock.json files across multiple modules. Add new dependencies for improved functionality, including @types/uuid in the upload-api module. Introduce a new ui package-lock.json file to manage dependencies for the UI component of the migration project.
…ing 'qs' to version 6.14.2 and 'tmp' to version 0.2.5. Remove deprecated 'os-tmpdir' dependency and clean up package-lock.json files to streamline project structure and enhance maintainability.
…lob' dependency and add several new development dependencies, including 'brace-expansion', 'glob', 'minimatch', 'inflight', and 'path-is-absolute', enhancing project functionality and maintainability.
…endency management while retaining 'diff' version specification for compatibility.
…ency from overrides and add 'webpack-dev-server' to enhance development capabilities. Additionally, new dependencies for @jsonjoy.com modules are introduced in package-lock.json to improve functionality and maintainability.
…to streamline project dependencies. Refactor contentful.service.ts to eliminate reliance on 'jsonpath' by implementing direct item-level processing for arrays, enhancing code clarity and maintainability.
…ersion 6.14.2 across multiple modules, enhancing functionality. Clean up package structure by ensuring consistency in dependency management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant