+
+ <<%= header_type.to_string() %> class="text-center <%= header_type.to_string() %> d-flex gap-3">
+
+ <%= value %>
+
+
+ border_color
+
+ <%= header_type.to_string() %>>
+
+
+
"
+ data-inputs-text-editable-title-target="input"
+ <%- input_target %> >
+
\ No newline at end of file
diff --git a/pgml-dashboard/src/components/inputs/text/mod.rs b/pgml-dashboard/src/components/inputs/text/mod.rs
new file mode 100644
index 000000000..8c9f97913
--- /dev/null
+++ b/pgml-dashboard/src/components/inputs/text/mod.rs
@@ -0,0 +1,6 @@
+// This file is automatically generated.
+// You shouldn't modify it manually.
+
+// src/components/inputs/text/editable_title
+pub mod editable_title;
+pub use editable_title::EditableTitle;
diff --git a/pgml-dashboard/static/css/modules.scss b/pgml-dashboard/static/css/modules.scss
index 9196a2486..86f405dd1 100644
--- a/pgml-dashboard/static/css/modules.scss
+++ b/pgml-dashboard/static/css/modules.scss
@@ -3,6 +3,7 @@
@import "../../src/components/dropdown/dropdown.scss";
@import "../../src/components/inputs/range_group/range_group.scss";
+@import "../../src/components/inputs/text/editable_title/editable_title.scss";
@import "../../src/components/left_nav_menu/left_nav_menu.scss";
@import "../../src/components/left_nav_web_app/left_nav_web_app.scss";
@import "../../src/components/modal/modal.scss";
diff --git a/pgml-dashboard/templates/content/playground.html b/pgml-dashboard/templates/content/playground.html
index 760583639..4dda9889d 100644
--- a/pgml-dashboard/templates/content/playground.html
+++ b/pgml-dashboard/templates/content/playground.html
@@ -2,6 +2,7 @@
use crate::components::tables::large::*;
use crate::components::navigation::tabs::*;
use crate::components::inputs::range_group::RangeGroup;
+use crate::components::inputs::text::editable_title::{EditableTitle, Headers, StimulusTarget};
%>
+ <%+ EditableTitle::new()
+ .value("Size H1")
+ .header_type(Headers::H1) %>
+
+ this is a thing that takes up space
+
+
+
+ <%+ EditableTitle::new()
+ .value("Size H2")
+ .header_type(Headers::H2) %>
+
+ this is a thing that takes up space
+
+
+
+ <%+ EditableTitle::new()
+ .value("Size H3")
+ .header_type(Headers::H3)
+ .input_name("title")
+ .input_target(
+ StimulusTarget::new()
+ .controller("some-existing-controller")
+ .target_name("desired-target-name")
+ ) %>
+
+ this is a thing that takes up space
+
+
+
From 26b6524224d154a3d088a7ca8e9c16579bba78bb Mon Sep 17 00:00:00 2001
From: Dan <39170265+chillenberger@users.noreply.github.com>
Date: Wed, 20 Sep 2023 17:34:44 -0600
Subject: [PATCH 2/7] newlines
---
.../components/inputs/text/editable_title/editable_title.scss | 2 +-
.../inputs/text/editable_title/editable_title_controller.js | 2 +-
.../src/components/inputs/text/editable_title/template.html | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss b/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
index bff24a4e1..c9ae12057 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
+++ b/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
@@ -15,4 +15,4 @@ div[data-controller="inputs-text-editable-title"] {
}
-}
\ No newline at end of file
+}
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title_controller.js b/pgml-dashboard/src/components/inputs/text/editable_title/editable_title_controller.js
index f21a79958..d55ec0190 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title_controller.js
+++ b/pgml-dashboard/src/components/inputs/text/editable_title/editable_title_controller.js
@@ -27,4 +27,4 @@ export default class extends Controller {
this.titleContainerTarget.style.display = "flex"
}
}
-}
\ No newline at end of file
+}
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/template.html b/pgml-dashboard/src/components/inputs/text/editable_title/template.html
index 2df89574c..a74529633 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/template.html
+++ b/pgml-dashboard/src/components/inputs/text/editable_title/template.html
@@ -16,4 +16,4 @@
name="<%= input_name.unwrap_or_else(|| "".to_string()) %>"
data-inputs-text-editable-title-target="input"
<%- input_target %> >
-
\ No newline at end of file
+
From 69dc0289dcaf0f426667910d72ddc66c873f09e7 Mon Sep 17 00:00:00 2001
From: Dan <39170265+chillenberger@users.noreply.github.com>
Date: Wed, 20 Sep 2023 17:38:12 -0600
Subject: [PATCH 3/7] cleanup
---
.../components/inputs/text/editable_title/editable_title.scss | 2 --
1 file changed, 2 deletions(-)
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss b/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
index c9ae12057..9aefcf3f0 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
+++ b/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
@@ -12,7 +12,5 @@ div[data-controller="inputs-text-editable-title"] {
color: #{$slate-shade-300}
}
}
-
-
}
}
From c9673a02dd14720d48f32c40d1374ef82d456652 Mon Sep 17 00:00:00 2001
From: Dan <39170265+chillenberger@users.noreply.github.com>
Date: Wed, 20 Sep 2023 17:41:45 -0600
Subject: [PATCH 4/7] scss name change
---
.../components/inputs/text/editable_title/editable_title.scss | 2 +-
.../src/components/inputs/text/editable_title/template.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss b/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
index 9aefcf3f0..540cfcd14 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
+++ b/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
@@ -1,5 +1,5 @@
div[data-controller="inputs-text-editable-title"] {
- .title-edit {
+ .editable-header-container {
span.material-symbols-outlined {
color: #{$slate-shade-500};
margin: auto;
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/template.html b/pgml-dashboard/src/components/inputs/text/editable_title/template.html
index a74529633..f7a5c2dfc 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/template.html
+++ b/pgml-dashboard/src/components/inputs/text/editable_title/template.html
@@ -1,5 +1,5 @@
-
<<%= header_type.to_string() %> class="text-center <%= header_type.to_string() %> d-flex gap-3">
From b94878c5511e85cfce971764e4025a7717c0acb9 Mon Sep 17 00:00:00 2001
From: Dan <39170265+chillenberger@users.noreply.github.com>
Date: Wed, 20 Sep 2023 17:43:56 -0600
Subject: [PATCH 5/7] clean up quote markes
---
.../src/components/inputs/text/editable_title/template.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/template.html b/pgml-dashboard/src/components/inputs/text/editable_title/template.html
index f7a5c2dfc..40d1625da 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/template.html
+++ b/pgml-dashboard/src/components/inputs/text/editable_title/template.html
@@ -13,7 +13,7 @@
"
+ name='<%= input_name.unwrap_or_else(|| "".to_string()) %>'
data-inputs-text-editable-title-target="input"
<%- input_target %> >
From b578d1d8cc4c2595fcba6e45f57ee48a7a3e6afb Mon Sep 17 00:00:00 2001
From: Dan <39170265+chillenberger@users.noreply.github.com>
Date: Wed, 20 Sep 2023 17:55:26 -0600
Subject: [PATCH 6/7] rename component
---
.../editable_header.scss} | 2 +-
.../editable_header_controller.js} | 0
.../text/{editable_title => editable_header}/mod.rs | 12 ++++++------
.../template.html | 2 +-
pgml-dashboard/src/components/inputs/text/mod.rs | 6 +++---
pgml-dashboard/static/css/modules.scss | 2 +-
pgml-dashboard/templates/content/playground.html | 8 ++++----
7 files changed, 16 insertions(+), 16 deletions(-)
rename pgml-dashboard/src/components/inputs/text/{editable_title/editable_title.scss => editable_header/editable_header.scss} (87%)
rename pgml-dashboard/src/components/inputs/text/{editable_title/editable_title_controller.js => editable_header/editable_header_controller.js} (100%)
rename pgml-dashboard/src/components/inputs/text/{editable_title => editable_header}/mod.rs (92%)
rename pgml-dashboard/src/components/inputs/text/{editable_title => editable_header}/template.html (93%)
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss b/pgml-dashboard/src/components/inputs/text/editable_header/editable_header.scss
similarity index 87%
rename from pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
rename to pgml-dashboard/src/components/inputs/text/editable_header/editable_header.scss
index 540cfcd14..eaa3abd6b 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title.scss
+++ b/pgml-dashboard/src/components/inputs/text/editable_header/editable_header.scss
@@ -1,4 +1,4 @@
-div[data-controller="inputs-text-editable-title"] {
+div[data-controller="inputs-text-editable-header"] {
.editable-header-container {
span.material-symbols-outlined {
color: #{$slate-shade-500};
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/editable_title_controller.js b/pgml-dashboard/src/components/inputs/text/editable_header/editable_header_controller.js
similarity index 100%
rename from pgml-dashboard/src/components/inputs/text/editable_title/editable_title_controller.js
rename to pgml-dashboard/src/components/inputs/text/editable_header/editable_header_controller.js
diff --git a/pgml-dashboard/src/components/inputs/text/editable_title/mod.rs b/pgml-dashboard/src/components/inputs/text/editable_header/mod.rs
similarity index 92%
rename from pgml-dashboard/src/components/inputs/text/editable_title/mod.rs
rename to pgml-dashboard/src/components/inputs/text/editable_header/mod.rs
index ff78f946d..36e0626d7 100644
--- a/pgml-dashboard/src/components/inputs/text/editable_title/mod.rs
+++ b/pgml-dashboard/src/components/inputs/text/editable_header/mod.rs
@@ -64,17 +64,17 @@ impl Render for StimulusTarget {
}
#[derive(TemplateOnce)]
-#[template(path = "inputs/text/editable_title/template.html")]
-pub struct EditableTitle {
+#[template(path = "inputs/text/editable_header/template.html")]
+pub struct EditableHeader {
value: String,
header_type: Headers,
input_target: StimulusTarget,
input_name: Option