Stage v3.2.2#433
Merged
hiteshshetty-dev merged 29 commits intostage_v3from May 14, 2025
Merged
Conversation
…n inline editable fields A global state is used to track whether an input event was handled in the focussed field.
If no input was received on the contenteditable, but the value updated through preview data, as noTrigger was false, we would revert the field value to the previous one through the else clause.
Clear field schema map on variant change as it contains a field - isUnlinkedVariant which depends on the current selected variant for its value
…d-variant-switch fix(VE-6191): clear field schema map on variant change
New tests for appendFieldToolbar, add tests to check if getEntryPermissionsCached and isFieldDisabled are used correctly in various functions
…n-disable-fields feat(VE-5851): disable fields of update restricted entries
fix(VE-5361): update field event is not sent when input event does not occur in inline editable fields
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR bumps the version to 3.2.2 while enhancing security with a new secrets scan workflow, updating documentation and tests, and refining component logic by incorporating entry permissions for improved functionality. Key changes include:
- Introducing async handling with getEntryPermissionsCached across multiple modules.
- Adding new tests and updating existing ones for improved coverage and reliability.
- Updating versioning, changelog, and configuration files for enhanced security and maintainability.
Reviewed Changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/visualBuilder/utils/test/fieldSchemaMap.test.ts | Added test for clearing the field schema promise map. |
| src/visualBuilder/listeners/mouseHover.ts | Integrated entry permission checks using getEntryPermissionsCached. |
| src/visualBuilder/listeners/mouseClick.ts | Updated field schema and entry permission handling with async/await. |
| src/visualBuilder/index.ts | Added a new state flag (focusFieldReceivedInput). |
| src/visualBuilder/generators/generateToolbar.tsx | Changed appendFieldToolbar to be async and pass entryPermissions. |
| src/visualBuilder/generators/generateOverlay.tsx | Updated state resets and field schema cache clearing on variant change. |
| Various test files | Updated tests to support async execution and proper prop passing. |
| package.json, README.md, CHANGELOG.md | Version bump and integrity updates. |
| .talismanrc & secrets-scan.yml | Added new secrets scanning configuration and workflow. |
Tests failed after adding finally and catch blocks in mouse hover function
…n-disable-fields fix(VE-5851): error handling for getEntryPermissionsCached
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes, including the addition of a secrets scanning workflow, updates to the
CHANGELOG.mdandpackage.jsonfiles, and modifications to theFieldToolbarandFieldRevertComponentcomponents. These changes aim to enhance security, improve documentation, and add functionality to the codebase.Security Enhancements:
secrets-scan.yml, to perform secrets scanning using Talisman. This includes downloading, verifying, and running the Talisman tool in a pre-commit hook. (.github/workflows/secrets-scan.yml).talismanrcconfiguration file to include file-specific ignore rules for the secrets scan. (.talismanrc)Documentation Updates:
CHANGELOG.mdto reflect the release of version 3.2.2, including new features, bug fixes, and housekeeping changes. (CHANGELOG.md) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]README.mdfile to reflect the new version (3.2.2) of the@contentstack/live-preview-utilspackage and its integrity hash. (README.md)Versioning:
package.jsonfrom 3.2.1 to 3.2.2 to signify the release of new features and fixes. (package.json)Component Enhancements:
FieldRevertComponentby adding adisabledprop to buttons, improving usability when actions are restricted. (src/visualBuilder/components/FieldRevert/FieldRevertComponent.tsx) [1] [2] [3]FieldToolbarcomponent to includeentryPermissionsas a prop and adjusted logic to disable field actions based on permissions. (src/visualBuilder/components/FieldToolbar.tsx) [1] [2] [3] [4] [5]