Skip to content

v3.2.1#430

Merged
faraazb merged 21 commits intomainfrom
stage_v3
Apr 24, 2025
Merged

v3.2.1#430
faraazb merged 21 commits intomainfrom
stage_v3

Conversation

@faraazb
Copy link
Copy Markdown
Contributor

@faraazb faraazb commented Apr 22, 2025

This pull request includes several changes aimed at improving the functionality and robustness of the VisualBuilder module, primarily focusing on handling duplicate elements, enhancing test coverage, and refining the behavior of content-editable elements. Below is a summary of the most important changes:

Fixes

Handling Duplicate Elements

  • Introduced a mechanism to assign unique IDs (data-cslp-unique-id) to elements with duplicate data-cslp attributes, enabling more precise identification and interaction. This impacts the handleBuilderInteraction and updateFocussedState functions. [1] [2] [3]

Enhancements to Content-Editable Fields

  • Updated the handleFieldKeyDown function to handle the Space key more effectively in button elements and their nested content-editable children. This ensures proper space insertion and synchronization of field data. [1] [2]

Testing

  • Added new test cases for handling keydown events in content-editable fields, including scenarios for button and span elements. These tests validate space insertion and event synchronization. [1] [2]

sairajchouhan and others added 15 commits April 14, 2025 13:22
fix(VE-4232): implement data-cslp mutation observer to manage unique IDs for elements
…ed path

If there is a button element on the composed path, then the browser will send a click
event on the button when space key is pressed. stopPropagation does not work as this
is not a propagated event but something done by the browser. So, whenever a button
is detected on the event's composed path, use custom space key handling.
…nside-button

fix: space key handling for editable elements inside button
…nside-button

fix(VE-5803): sync field after custom space handling
@faraazb faraazb requested a review from a team as a code owner April 22, 2025 13:33
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 22, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 70.1% 8157 / 11635
🔵 Statements 70.1% 8157 / 11635
🔵 Functions 68.03% 281 / 413
🔵 Branches 84.57% 987 / 1167
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/index.ts 38.88% 50% 10% 38.88% 17-22, 25-33, 36-37, 40-41, 44-45, 48-58, 61-62, 66, 69-70, 77
src/logger/logger.ts 100% 100% 100% 100%
src/visualBuilder/index.ts 56.2% 66.66% 42.85% 56.2% 92-99, 102-106, 109-121, 124-197, 203-237, 245-267, 318-321, 324-325
src/visualBuilder/listeners/mouseClick.ts 75.1% 82.05% 90.9% 75.1% 102-103, 106-111, 124-152, 178-179, 224, 282-288, 308-314, 332-342
src/visualBuilder/utils/collabUtils.ts 73.05% 84.21% 71.42% 73.05% 35, 85-108, 163-165, 174-201, 204-206, 294, 296-297, 300, 302-303
src/visualBuilder/utils/handleFieldMouseDown.ts 100% 92.59% 100% 100%
src/visualBuilder/utils/updateFocussedState.ts 53.95% 59.61% 100% 53.95% 43, 55-57, 59-61, 63, 178-181, 183-214, 301-305, 308-325, 328-338, 341-358, 365-410, 417-439, 445-447
Generated in workflow #400 for commit dab1ddd by the Vitest Coverage Report Action

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 49261f6 into main Apr 24, 2025
9 checks passed
@faraazb faraazb deleted the stage_v3 branch April 24, 2025 10:05
@hiteshshetty-dev hiteshshetty-dev restored the stage_v3 branch May 13, 2025 09:05
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.

7 participants