aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-02-23 01:03:51 +0000
committerHayleigh Thompson <me@hayleigh.dev>2024-02-23 01:03:51 +0000
commitd91fd0b0dc50773dd106d0111790465d5735456d (patch)
tree0512598cc282548af5c4b720ebd382552260b4c1
parent16d8c583f7b42a8789d04d4b3b0f0bf0282832fa (diff)
downloadlustre-d91fd0b0dc50773dd106d0111790465d5735456d.tar.gz
lustre-d91fd0b0dc50773dd106d0111790465d5735456d.zip
:memo: Add a note reminding users this is a release candidate.
-rw-r--r--src/lustre.gleam11
-rw-r--r--src/lustre/attribute.gleam16
-rw-r--r--src/lustre/effect.gleam5
-rw-r--r--src/lustre/element.gleam5
-rw-r--r--src/lustre/element/html.gleam6
-rw-r--r--src/lustre/element/svg.gleam6
-rw-r--r--src/lustre/event.gleam6
-rw-r--r--src/lustre/server.gleam11
8 files changed, 54 insertions, 12 deletions
diff --git a/src/lustre.gleam b/src/lustre.gleam
index a2c2fe2..884b6f5 100644
--- a/src/lustre.gleam
+++ b/src/lustre.gleam
@@ -1,3 +1,8 @@
+//// > **Note**: this is a _release candidate_ for v4.0.0 and documentation is still
+//// > a work in progress. If you spot an issue with docs or the library, or would
+//// > like to get involved, please [open an issue](https://github.com/lustre-labs/lustre/issues/new)
+//// > or a pull request.
+////
//// Lustre is a framework for rendering Web applications and components using
//// Gleam. This module contains the core API for constructing and communicating
//// with Lustre applications. If you're new to Lustre or frontend development in
@@ -306,9 +311,9 @@ pub type Error {
/// Take a look at the [`simple`](#simple) application constructor if you want to
/// build something interactive.
///
-/// **Note**: Just because an element doesn't have its own update loop, doesn't
-/// mean its content is always static! An element application may render a client
-/// or server component that has its own encapsulated update loop!
+/// > **Note**: Just because an element doesn't have its own update loop, doesn't
+/// > mean its content is always static! An element application may render a client
+/// > or server component that has its own encapsulated update loop!
///
pub fn element(html: Element(msg)) -> App(Nil, Nil, msg) {
let init = fn(_) { #(Nil, effect.none()) }
diff --git a/src/lustre/attribute.gleam b/src/lustre/attribute.gleam
index 7d49b18..3889aa7 100644
--- a/src/lustre/attribute.gleam
+++ b/src/lustre/attribute.gleam
@@ -1,3 +1,9 @@
+//// > **Note**: this is a _release candidate_ for v4.0.0 and documentation is still
+//// > a work in progress. If you spot an issue with docs or the library, or would
+//// > like to get involved, please [open an issue](https://github.com/lustre-labs/lustre/issues/new)
+//// > or a pull request.
+////
+
// IMPORTS ---------------------------------------------------------------------
import gleam/dynamic.{type Dynamic}
@@ -58,9 +64,9 @@ pub fn map(attr: Attribute(a), f: fn(a) -> b) -> Attribute(b) {
///
///
-/// **Note**: unlike most attributes, multiple `style` attributes are merged
-/// with any existing other styles on an element. Styles added _later_ in the
-/// list will override styles added earlier.
+/// > **Note**: unlike most attributes, multiple `style` attributes are merged
+/// > with any existing other styles on an element. Styles added _later_ in the
+/// > list will override styles added earlier.
///
pub fn style(properties: List(#(String, String))) -> Attribute(msg) {
attribute("style", {
@@ -71,8 +77,8 @@ pub fn style(properties: List(#(String, String))) -> Attribute(msg) {
///
///
-/// **Note**: unlike most attributes, multiple `class` attributes are merged
-/// with any existing other classes on an element.
+/// > **Note**: unlike most attributes, multiple `class` attributes are merged
+/// > with any existing other classes on an element.
///
pub fn class(name: String) -> Attribute(msg) {
attribute("class", name)
diff --git a/src/lustre/effect.gleam b/src/lustre/effect.gleam
index 38f809f..47c1da3 100644
--- a/src/lustre/effect.gleam
+++ b/src/lustre/effect.gleam
@@ -1,3 +1,8 @@
+//// > **Note**: this is a _release candidate_ for v4.0.0 and documentation is still
+//// > a work in progress. If you spot an issue with docs or the library, or would
+//// > like to get involved, please [open an issue](https://github.com/lustre-labs/lustre/issues/new)
+//// > or a pull request.
+////
//// In other frameworks it's common for components to perform side effects
//// whenever the need them. An event handler might make an HTTP request, or a
//// component might reach into the DOM to focus an input.
diff --git a/src/lustre/element.gleam b/src/lustre/element.gleam
index fc92ccd..d82d5c9 100644
--- a/src/lustre/element.gleam
+++ b/src/lustre/element.gleam
@@ -1,3 +1,8 @@
+//// > **Note**: this is a _release candidate_ for v4.0.0 and documentation is still
+//// > a work in progress. If you spot an issue with docs or the library, or would
+//// > like to get involved, please [open an issue](https://github.com/lustre-labs/lustre/issues/new)
+//// > or a pull request.
+////
//// Lustre wouldn't be much use as a frontend framework if it didn't provide a
//// way to create HTML elements. This module contains the basic functions
//// necessary to construct and manipulate different HTML elements.
diff --git a/src/lustre/element/html.gleam b/src/lustre/element/html.gleam
index 426c65b..9665dcb 100644
--- a/src/lustre/element/html.gleam
+++ b/src/lustre/element/html.gleam
@@ -1,3 +1,9 @@
+//// > **Note**: this is a _release candidate_ for v4.0.0 and documentation is still
+//// > a work in progress. If you spot an issue with docs or the library, or would
+//// > like to get involved, please [open an issue](https://github.com/lustre-labs/lustre/issues/new)
+//// > or a pull request.
+////
+
// IMPORTS ---------------------------------------------------------------------
import lustre/element.{type Element, element, namespaced}
diff --git a/src/lustre/element/svg.gleam b/src/lustre/element/svg.gleam
index 1979c2a..8f68f53 100644
--- a/src/lustre/element/svg.gleam
+++ b/src/lustre/element/svg.gleam
@@ -1,3 +1,9 @@
+//// > **Note**: this is a _release candidate_ for v4.0.0 and documentation is still
+//// > a work in progress. If you spot an issue with docs or the library, or would
+//// > like to get involved, please [open an issue](https://github.com/lustre-labs/lustre/issues/new)
+//// > or a pull request.
+////
+
// IMPORTS ---------------------------------------------------------------------
import lustre/element.{type Element, namespaced, text as inline_text}
diff --git a/src/lustre/event.gleam b/src/lustre/event.gleam
index 1658504..2250057 100644
--- a/src/lustre/event.gleam
+++ b/src/lustre/event.gleam
@@ -1,3 +1,9 @@
+//// > **Note**: this is a _release candidate_ for v4.0.0 and documentation is still
+//// > a work in progress. If you spot an issue with docs or the library, or would
+//// > like to get involved, please [open an issue](https://github.com/lustre-labs/lustre/issues/new)
+//// > or a pull request.
+////
+
// IMPORTS ---------------------------------------------------------------------
import gleam/dynamic.{type DecodeError, type Dynamic}
diff --git a/src/lustre/server.gleam b/src/lustre/server.gleam
index 35e1ecb..841f897 100644
--- a/src/lustre/server.gleam
+++ b/src/lustre/server.gleam
@@ -1,8 +1,11 @@
+//// > **Note**: this is a _release candidate_ for v4.0.0 and documentation is still
+//// > a work in progress. If you spot an issue with docs or the library, or would
+//// > like to get involved, please [open an issue](https://github.com/lustre-labs/lustre/issues/new)
+//// > or a pull request.
////
-////
-//// **Note**: while Lustre v4 is in release candidate status, server components
-//// **will not reliably work on Gleam's JavaScript target**. Until this message
-//// goes away, consider server components as being supported **only** on Erlang.
+//// > **Note**: while Lustre v4 is in release candidate status, server components
+//// > **will not reliably work on Gleam's JavaScript target**. Until this message
+//// > goes away, consider server components as being supported **only** on Erlang.
////
// IMPORTS ---------------------------------------------------------------------