";
+ $lines[] = "";
+ $lines[] = "The rendered element becomes:";
+ $lines[] = " ";
+ $lines[] = "";
+ $lines[] = "TO FIX:";
+ $lines[] = " 1. Remove the redundant class from the Define tag:";
+ $lines[] = " ";
+ $lines[] = "";
+ $lines[] = " 2. Update any CSS/SCSS selectors to use the component class:";
+ $lines[] = " .{$component_name} { ... } // Instead of .{$redundant_class}";
+ $lines[] = "";
+ $lines[] = " 3. Update any JavaScript selectors:";
+ $lines[] = " \$('.{$component_name}') // Instead of \$('.{$redundant_class}')";
+
+ return implode("\n", $lines);
+ }
+
+ /**
+ * Remove a class from the class attribute string
+ */
+ private function remove_class_from_attribute(string $class_attribute, string $class_to_remove): string
+ {
+ $cleaned = preg_replace('/\b' . preg_quote($class_to_remove, '/') . '\b\s*/', '', $class_attribute);
$cleaned = preg_replace('/\s+/', ' ', $cleaned);
-
- // Trim leading/trailing spaces
return trim($cleaned);
}
}
diff --git a/app/RSpade/Core/Debug/JS_Tree_Debug_Node.jqhtml b/app/RSpade/Core/Debug/JS_Tree_Debug_Node.jqhtml
index ff51fbcf2..afdc997e3 100755
--- a/app/RSpade/Core/Debug/JS_Tree_Debug_Node.jqhtml
+++ b/app/RSpade/Core/Debug/JS_Tree_Debug_Node.jqhtml
@@ -9,7 +9,7 @@ $expand_depth - How many levels deep to expand
$label - Optional key/index label for this node
$show_class_names - If true, display class names for named object instances
--%>
-
+
<%
const class_name = this.args.show_class_names ? JS_Tree_Debug_Node.get_class_name(this.args.data) : null;
const relationships = JS_Tree_Debug_Node.get_object_relationships(this.args.data);
diff --git a/app/RSpade/Core/Debug/js_tree_debug_component.scss b/app/RSpade/Core/Debug/js_tree_debug_component.scss
index b7895965a..f3266a21d 100755
--- a/app/RSpade/Core/Debug/js_tree_debug_component.scss
+++ b/app/RSpade/Core/Debug/js_tree_debug_component.scss
@@ -13,7 +13,8 @@
border-radius: 4px;
background: #fafafa;
- .js-tree-debug-node {
+ .js-tree-debug-node,
+ .JS_Tree_Debug_Node {
margin-left: 0;
}