Skip to content

Commit 0d4fc07

Browse files
devvaannshabose
authored andcommitted
fix: description not properly visible issue
1 parent d1c6a4a commit 0d4fc07

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

src/extensionsIntegrated/CustomSnippets/helper.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,9 @@ define(function (require, exports, module) {
330330

331331
if (description && description.trim() !== "") {
332332
const fullDescription = description.trim();
333-
// truncate description if longer than 70 characters
333+
// truncate description if longer than 80 characters
334334
const displayDescription =
335-
fullDescription.length > 70 ? fullDescription.substring(0, 70) + "..." : fullDescription;
335+
fullDescription.length > 80 ? fullDescription.substring(0, 80) + "..." : fullDescription;
336336

337337
const $desc = $(`<span class="snippet-description">${displayDescription}</span>`);
338338
$hint.append($desc);
@@ -586,9 +586,9 @@ define(function (require, exports, module) {
586586
return;
587587
}
588588

589-
// Check for character limit (70 characters) - only for printable characters (spaces allowed)
589+
// Check for character limit (80 characters) - only for printable characters (spaces allowed)
590590
if (
591-
descBox.value.length >= 70 &&
591+
descBox.value.length >= 80 &&
592592
e.key.length === 1 &&
593593
e.key.match(/[a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\ ]/)
594594
) {
@@ -600,7 +600,7 @@ define(function (require, exports, module) {
600600
const wrapperId = isEditForm ? "edit-desc-box-wrapper" : "desc-box-wrapper";
601601
const errorId = isEditForm ? "edit-description-length-error" : "description-length-error";
602602

603-
UIHelper.showError(inputId, wrapperId, "Description cannot be more than 70 characters.", errorId);
603+
UIHelper.showError(inputId, wrapperId, "Description cannot be more than 80 characters.", errorId);
604604
}
605605
}
606606

@@ -693,12 +693,12 @@ define(function (require, exports, module) {
693693

694694
const clipboardData = (e.originalEvent || e).clipboardData.getData("text");
695695

696-
// Keep spaces but limit to 70 characters
696+
// Keep spaces but limit to 80 characters
697697
let sanitized = clipboardData;
698698
let wasTruncated = false;
699699

700-
if (sanitized.length > 70) {
701-
sanitized = sanitized.substring(0, 70);
700+
if (sanitized.length > 80) {
701+
sanitized = sanitized.substring(0, 80);
702702
wasTruncated = true;
703703
}
704704

@@ -708,14 +708,14 @@ define(function (require, exports, module) {
708708
const end = input.selectionEnd;
709709
const currentValue = input.value;
710710

711-
// Check if the final result would exceed 70 characters
711+
// Check if the final result would exceed 80 characters
712712
const beforeCursor = currentValue.substring(0, start);
713713
const afterCursor = currentValue.substring(end);
714714
const finalValue = beforeCursor + sanitized + afterCursor;
715715

716-
if (finalValue.length > 70) {
716+
if (finalValue.length > 80) {
717717
// Trim the sanitized content to fit within the limit
718-
const availableSpace = 70 - (beforeCursor.length + afterCursor.length);
718+
const availableSpace = 80 - (beforeCursor.length + afterCursor.length);
719719
if (availableSpace > 0) {
720720
sanitized = sanitized.substring(0, availableSpace);
721721
wasTruncated = true;
@@ -739,7 +739,7 @@ define(function (require, exports, module) {
739739
const wrapperId = isEditForm ? "edit-desc-box-wrapper" : "desc-box-wrapper";
740740
const errorId = isEditForm ? "edit-description-paste-length-error" : "description-paste-length-error";
741741

742-
UIHelper.showError(inputId, wrapperId, "Description cannot be more than 70 characters.", errorId);
742+
UIHelper.showError(inputId, wrapperId, "Description cannot be more than 80 characters.", errorId);
743743
}
744744

745745
// Determine which save button to toggle based on input field

src/styles/brackets_patterns_override.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,6 @@ a:focus {
788788
word-wrap: break-word;
789789
white-space: normal;
790790
max-height: 2.2em;
791-
overflow: hidden;
792791
box-sizing: border-box;
793792
text-overflow: ellipsis;
794793
line-height: 1em;
@@ -2519,4 +2518,4 @@ code {
25192518
margin-top: 8px;
25202519
}
25212520
}
2522-
}
2521+
}

0 commit comments

Comments
 (0)