Skip to content

[Feat/VB-499] Added resolved variants' permission communication and field disablement#500

Closed
csAyushDubey wants to merge 6 commits intodevelop_v4from
feature/VB-499-resolved-variant-perms
Closed

[Feat/VB-499] Added resolved variants' permission communication and field disablement#500
csAyushDubey wants to merge 6 commits intodevelop_v4from
feature/VB-499-resolved-variant-perms

Conversation

@csAyushDubey
Copy link
Copy Markdown
Contributor

No description provided.

@csAyushDubey csAyushDubey requested a review from a team as a code owner September 12, 2025 05:56
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 12, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 72.58% 9397 / 12947
🔵 Statements 72.58% 9397 / 12947
🔵 Functions 72.19% 335 / 464
🔵 Branches 84.23% 1197 / 1421
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/visualBuilder/components/FieldToolbar.tsx 77.35% 75% 37.5% 77.35% 64-112, 136, 176, 211-228, 249-252, 275-284, 313-321, 329-330, 333-334, 386-392, 409-410, 474, 511, 592-599
src/visualBuilder/components/fieldLabelWrapper.tsx 81.3% 72.58% 80% 81.3% 46-48, 56-58, 140-151, 154-158, 221-222, 226-231, 235, 300-302, 308-326, 331-343
src/visualBuilder/eventManager/useVariantsPostMessageEvent.ts 92.03% 89.65% 100% 92.03% 48-49, 98-104
src/visualBuilder/generators/generateToolbar.tsx 90.13% 86.66% 83.33% 90.13% 28-29, 92-97, 145-149, 192-193
src/visualBuilder/listeners/mouseClick.ts 76.1% 70% 90.9% 76.1% 88, 98-104, 109-110, 113-118, 131-159, 171-172, 185-186, 231, 290-296, 361-371
src/visualBuilder/listeners/mouseHover.ts 63.82% 43.24% 61.11% 63.82% 49-56, 73-74, 124-134, 140-141, 148-151, 154-156, 162, 176-177, 186-202, 209-211, 213-254, 262-264, 266-268, 276-284, 287-290, 292-294, 309-313, 377-378
src/visualBuilder/utils/fetchEntryPermissionsAndStageDetails.ts 75.8% 14.28% 100% 75.8% 42-46, 48-52, 54-58
src/visualBuilder/utils/getResolvedVariantPermissions.ts 100% 100% 100% 100%
src/visualBuilder/utils/handleIndividualFields.ts 100% 100% 100% 100%
src/visualBuilder/utils/isFieldDisabled.ts 98.34% 95.83% 100% 98.34% 121-122
src/visualBuilder/utils/updateFocussedState.ts 56.74% 60.71% 100% 56.74% 45, 57-59, 61-63, 65, 205-208, 210-241, 328-332, 335-352, 355-365, 368-385, 392-437, 444-466, 472-474
src/visualBuilder/utils/types/postMessage.types.ts 100% 100% 100% 100%
Generated in workflow #582 for commit f3d83b7 by the Vitest Coverage Report Action

Base automatically changed from develop_v4 to stage_v4 September 16, 2025 17:58
@KANE-99 KANE-99 requested a review from a team as a code owner September 16, 2025 17:58
Base automatically changed from stage_v4 to main September 18, 2025 12:12
@csAyushDubey csAyushDubey changed the base branch from main to develop_v4 October 26, 2025 17:56
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.

Can we please add test cases to check the order logic and other function how those interact with resolvedVariantPermissions

Comment on lines +45 to +50
for (let i = variantOrder.length-1; i >= 0; i--) {
if (dataCslp.includes(variantOrder[i])) {
indexOfDataCslp = i;
break;
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would have resolved the variant details for CSLP and would have used indexOf.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, done

Comment on lines +20 to +23
return {
update: true,
};
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If post message fails, we should consider this as older case where editing was not allowed.
I think it should be false, let me know if i am missing something.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I've added a logic to handle that in the latest commit

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.

2 participants