Skip to content

fix(VE-5361): update field event is not sent when input event does not occur in inline editable fields#422

Merged
faraazb merged 5 commits intodevelop_v3from
VE-5361-no-update-on-no-input
May 7, 2025
Merged

fix(VE-5361): update field event is not sent when input event does not occur in inline editable fields#422
faraazb merged 5 commits intodevelop_v3from
VE-5361-no-update-on-no-input

Conversation

@faraazb
Copy link
Copy Markdown
Contributor

@faraazb faraazb commented Apr 14, 2025

No description provided.

…n inline editable fields

A global state is used to track whether an input event was handled in the focussed field.
@faraazb faraazb requested a review from a team as a code owner April 14, 2025 11:57
@faraazb faraazb requested review from Copilot and hiteshshetty-dev and removed request for a team April 14, 2025 11:57
Copy link
Copy Markdown
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.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/visualBuilder/index.ts:52

  • [nitpick] Consider renaming 'focusFieldReceivedInput' to a shorter, more concise name (e.g. 'hasReceivedInput') for improved readability.
focusFieldReceivedInput: boolean;

src/visualBuilder/generators/generateOverlay.tsx:141

  • Ensure that resetting 'focusFieldReceivedInput' to false immediately after sending the field event does not inadvertently suppress subsequent events in asynchronous scenarios; consider deferring the reset until confirmation that the event has been processed.
VisualBuilder.VisualBuilderGlobalState.value.focusFieldReceivedInput = false;

Copy link
Copy Markdown
Contributor

@hiteshshetty-dev hiteshshetty-dev left a comment

Choose a reason for hiding this comment

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

LGTM!!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 70.74% 8243 / 11651
🔵 Statements 70.74% 8243 / 11651
🔵 Functions 69.24% 286 / 413
🔵 Branches 84.78% 1009 / 1190
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/visualBuilder/index.ts 56.86% 66.66% 42.85% 56.86% 94-101, 104-108, 111-123, 126-199, 205-237, 245-267, 318-321, 324-325
src/visualBuilder/generators/generateOverlay.tsx 89.94% 79.16% 100% 89.94% 131-140, 177, 195-198, 222-225
src/visualBuilder/utils/handleFieldMouseDown.ts 100% 92.85% 100% 100%
Generated in workflow #405 for commit 8e6a56d by the Vitest Coverage Report Action

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.
Base automatically changed from develop_v3 to stage_v3 April 22, 2025 13:00
Base automatically changed from stage_v3 to main April 24, 2025 10:05
@faraazb faraazb dismissed hiteshshetty-dev’s stale review April 24, 2025 10:05

The base branch was changed.

@faraazb faraazb changed the base branch from main to develop_v3 May 5, 2025 08:21
@faraazb faraazb changed the base branch from develop_v3 to main May 5, 2025 08:25
@faraazb faraazb changed the base branch from main to develop_v3 May 5, 2025 08:25
Copy link
Copy Markdown
Contributor

@hiteshshetty-dev hiteshshetty-dev left a comment

Choose a reason for hiding this comment

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

Changes look good to me!! Please add unit tests.

@faraazb faraazb requested a review from hiteshshetty-dev May 7, 2025 09:41
Copy link
Copy Markdown
Contributor

@hiteshshetty-dev hiteshshetty-dev left a comment

Choose a reason for hiding this comment

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

LGTM!!

@faraazb faraazb merged commit 6a2c5d8 into develop_v3 May 7, 2025
9 checks passed
@faraazb faraazb deleted the VE-5361-no-update-on-no-input branch May 7, 2025 10:29
@faraazb faraazb restored the VE-5361-no-update-on-no-input branch July 18, 2025 06:23
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.

4 participants