chore(next): improve performance of a specific selector

This commit is contained in:
Elian Doran 2025-07-08 21:09:13 +03:00
parent decb0c702d
commit 2fac2a8c5e
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -1301,9 +1301,9 @@ div.promoted-attribute-cell .tn-checkbox {
height: 1cap; height: 1cap;
} }
/* The <div> containing the checkbox for a promoted boolean attribute */ /* Relocate the checkbox before the label */
div.promoted-attribute-cell div:has(input[type="checkbox"]) { div.promoted-attribute-cell.promoted-attribute-label-boolean > div:first-of-type {
order: -1; /* Relocate the checkbox before the label */ order: -1;
margin-right: 1.5em; margin-right: 1.5em;
} }

View File

@ -188,6 +188,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
.append($multiplicityCell); .append($multiplicityCell);
if (valueAttr.type === "label") { if (valueAttr.type === "label") {
$wrapper.addClass(`promoted-attribute-label-${definition.labelType}`);
if (definition.labelType === "text") { if (definition.labelType === "text") {
$input.prop("type", "text"); $input.prop("type", "text");