Repository: zhiburt/tabled
Pull request #324 (2023-04-10 14:30:59)

Add ron to table


Patch:
diff --git a/Cargo.toml b/Cargo.toml
index 9ea8491..60602f2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,6 +5,7 @@ members = [
     "tabled_derive",
     "json_to_table",
     "csv_to_table",
+    "ron_to_table",
     "static_table",
     "table_to_html",
 ]
diff --git a/papergrid/src/colors.rs b/papergrid/src/colors.rs
index d735dcb..f671ec0 100644
--- a/papergrid/src/colors.rs
+++ b/papergrid/src/colors.rs
@@ -23,7 +23,6 @@ where
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<C> Colors for std::collections::HashMap<Position, C>
 where
     C: Color,
@@ -36,7 +35,6 @@ where
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<C> Colors for std::collections::BTreeMap<Position, C>
 where
     C: Color,
@@ -49,7 +47,6 @@ where
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<C> Colors for crate::config::spanned::EntityMap<Option<C>>
 where
     C: Color,
diff --git a/papergrid/src/grid/compact.rs b/papergrid/src/grid/compact.rs
index 66f3930..82a4245 100644
--- a/papergrid/src/grid/compact.rs
+++ b/papergrid/src/grid/compact.rs
@@ -69,9 +69,9 @@ impl<R, D, G, C> CompactGrid<R, D, G, C> {
     /// Builds a table into string.
     ///
     /// Notice that it consumes self.
-    #[allow(clippy::inherent_to_string)]
     #[cfg(feature = "std")]
     #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
+    #[allow(clippy::inherent_to_string)]
     pub fn to_string(self) -> String
     where
         R: Records,
diff --git a/papergrid/src/records/exact_records.rs b/papergrid/src/records/exact_records.rs
index 62e62e7..6564502 100644
--- a/papergrid/src/records/exact_records.rs
+++ b/papergrid/src/records/exact_records.rs
@@ -16,7 +16,6 @@ where
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<T> ExactRecords for Vec<T> {
     fn count_rows(&self) -> usize {
         self.len()
diff --git a/papergrid/src/util/string.rs b/papergrid/src/util/string.rs
index 1cbb6d7..bfa5e02 100644
--- a/papergrid/src/util/string.rs
+++ b/papergrid/src/util/string.rs
@@ -113,7 +113,6 @@ pub struct Lines<'a> {
     inner: ansi_str::AnsiSplit<'a>,
 }
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<'a> Iterator for Lines<'a> {
     type Item = std::borrow::Cow<'a, str>;
 
diff --git a/ron_to_table/Cargo.toml b/ron_to_table/Cargo.toml
new file mode 100644
index 0000000..613a719
--- /dev/null
+++ b/ron_to_table/Cargo.toml
@@ -0,0 +1,20 @@
+[package]
+name = "ron_to_table"
+version = "0.1.0"
+edition = "2018"
+authors = ["Maxim Zhiburt <zhiburt@gmail.com>"]
+repository = "https://github.com/zhiburt/tabled"
+homepage = "https://github.com/zhiburt/tabled"
+documentation = "https://docs.rs/ron_to_table"
+keywords = ["table", "print", "pretty-table", "format", "ron"]
+categories = ["text-processing", "visualization"]
+readme = "README.md"
+description = "A library for pretty print RON as a table"
+license = "MIT"
+
+[features]
+color = ["tabled/color"]
+
+[dependencies]
+ron = "0.8"
+tabled = { path = "../tabled", features = ["std"], default-features = false }
diff --git a/ron_to_table/LICENSE-MIT b/ron_to_table/LICENSE-MIT
new file mode 100644
index 0000000..6077b9d
--- /dev/null
+++ b/ron_to_table/LICENSE-MIT
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Maxim Zhiburt
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/ron_to_table/README.md b/ron_to_table/README.md
new file mode 100644
index 0000000..13cae74
--- /dev/null
+++ b/ron_to_table/README.md
@@ -0,0 +1,137 @@
+# A library for converting `ron` to a table.
+
+It uses [`tabled`](https://github.com/zhiburt/tabled) as a rendering backend.
+
+## Get started
+
+The library supports 2 modes for a table embeded and collapsed.
+It also provides with a list of options to modify the table, such as style, alignment, padding and more.
+
+You can change an orientation of a `map` and `sequence` via `Orientation`.
+
+You'll find to examples for the modes bellow.
+
+## Usage
+
+Add the library to a dependency list.
+
+```toml
+[dependencies]
+ron_to_table = "0.1.0"
+```
+
+<table>
+<tr>
+<th> Example (embeded) </th>
+<th> Result </th>
+</tr>
+<tr>
+<td>
+
+```rust
+let data = r#"Scene(
+    materials: {
+        "metal": (reflectivity: 1.0),
+        "plastic": (reflectivity: 0.5),
+    },
+    entities: [
+        (name: "hero", material: "metal"),
+        (name: "monster", material: "plastic"),
+    ],
+)"#;
+let scene = ron::from_str(data).unwrap();
+
+let table = ron_to_table::to_string(&scene);
+
+println!("{}", table);
+```
+
+</td>
+<td style="vertical-align: top;">
+
+```text
++-------------+--------------------------------------------+
+|  entities   | +----------------------------+             |
+|             | | +------------+---------+   |             |
+|             | | |  material  |  metal  |   |             |
+|             | | +------------+---------+   |             |
+|             | | |  name      |  hero   |   |             |
+|             | | +------------+---------+   |             |
+|             | +----------------------------+             |
+|             | | +------------+-----------+ |             |
+|             | | |  material  |  plastic  | |             |
+|             | | +------------+-----------+ |             |
+|             | | |  name      |  monster  | |             |
+|             | | +------------+-----------+ |             |
+|             | +----------------------------+             |
++-------------+--------------------------------------------+
+|  materials  | +-----------+----------------------------+ |
+|             | |  metal    | +----------------+-----+   | |
+|             | |           | |  reflectivity  |  1  |   | |
+|             | |           | +----------------+-----+   | |
+|             | +-----------+----------------------------+ |
+|             | |  plastic  | +----------------+-------+ | |
+|             | |           | |  reflectivity  |  0.5  | | |
+|             | |           | +----------------+-------+ | |
+|             | +-----------+----------------------------+ |
++-------------+--------------------------------------------+
+```
+
+</td>
+</tr>
+</table>
+
+<table>
+<tr>
+<th> Example (collapsed) </th>
+<th> Result </th>
+</tr>
+<tr>
+<td>
+
+```rust
+use ron_to_table::RonTable;
+use tabled::settings::Style;
+
+let scene = ron::from_str(
+    r#"
+    Scene(
+        materials: {
+            "metal": (reflectivity: 1.0),
+            "plastic": (reflectivity: 0.5),
+        },
+        entities: [
+            (name: "hero", material: "metal"),
+            (name: "monster", material: "plastic"),
+        ],
+    )
+"#,
+)
+.unwrap();
+
+let table = RonTable::default()
+    .collapse()
+    .with(Style::extended())
+    .build(&scene);
+
+println!("{table}");
+```
+
+</td>
+<td style="vertical-align: top;">
+
+```text
+╔═══════════╦══════════╦═══════════════════╗
+║ entities  ║ material ║ metal             ║
+║           ╠══════════╬═══════════════════╣
+║           ║ name     ║ hero              ║
+║           ╠══════════╬═══════════════════╣
+║           ║ material ║ plastic           ║
+║           ╠══════════╬═══════════════════╣
+║           ║ name     ║ monster           ║
+╠═══════════╬═════════╦╩═════════════╦═════╣
+║ materials ║ metal   ║ reflectivity ║ 1   ║
+║           ╠═════════╬══════════════╬═════╣
+║           ║ plastic ║ reflectivity ║ 0.5 ║
+╚═══════════╩═════════╩══════════════╩═════╝
+```
diff --git a/ron_to_table/examples/collapse.rs b/ron_to_table/examples/collapse.rs
new file mode 100644
index 0000000..aa1df79
--- /dev/null
+++ b/ron_to_table/examples/collapse.rs
@@ -0,0 +1,29 @@
+//! This example demonstrates usage of [`ron_to_table::RonTable`].
+
+use ron_to_table::RonTable;
+use tabled::settings::Style;
+
+fn main() {
+    let scene = ron::from_str(
+        r#"
+        Scene(
+            materials: {
+                "metal": (reflectivity: 1.0),
+                "plastic": (reflectivity: 0.5),
+            },
+            entities: [
+                (name: "hero", material: "metal"),
+                (name: "monster", material: "plastic"),
+            ],
+        )
+    "#,
+    )
+    .unwrap();
+
+    let table = RonTable::default()
+        .collapse()
+        .with(Style::extended())
+        .build(&scene);
+
+    println!("{table}");
+}
diff --git a/ron_to_table/examples/plain.rs b/ron_to_table/examples/plain.rs
new file mode 100644
index 0000000..8c32b6d
--- /dev/null
+++ b/ron_to_table/examples/plain.rs
@@ -0,0 +1,21 @@
+//! This example demonstrates usage of [`ron_to_table::to_string`].
+
+fn main() {
+    let scene = ron::from_str(
+        r#"
+        Scene(
+            materials: {
+                "metal": (reflectivity: 1.0),
+                "plastic": (reflectivity: 0.5),
+            },
+            entities: [
+                (name: "hero", material: "metal"),
+                (name: "monster", material: "plastic"),
+            ],
+        )
+    "#,
+    )
+    .unwrap();
+
+    println!("{}", ron_to_table::to_string(&scene));
+}
diff --git a/ron_to_table/src/lib.rs b/ron_to_table/src/lib.rs
new file mode 100644
index 0000000..0f8eeca
--- /dev/null
+++ b/ron_to_table/src/lib.rs
@@ -0,0 +1,189 @@
+//! The library creates pretty table out of a [`ron`] object.
+//!
+//! The are 2 types of tables you can create.
+//!     1. Embeded (default)
+//!     2. Collapsed
+//!
+//! # Examples
+//!
+//! Embeded table.
+//!
+//! ```
+//! let data = r#"GameConfig(
+//!     window_size: (800, 600),
+//!     window_title: "PAC-MAN",
+//!     fullscreen: false,
+//!     
+//!     mouse_sensitivity: 1.4,
+//!     key_bindings: {
+//!         "up": Up,
+//!         "down": Down,
+//!         "left": Left,
+//!         "right": Right,
+//!     },
+//!     
+//!     difficulty_options: (
+//!         start_difficulty: Easy,
+//!         adaptive: false,
+//!     ),
+//! )"#;
+//! let scene = ron::from_str(data).unwrap();
+//!
+//! assert_eq!(
+//!     ron_to_table::to_string(&scene),
+//!     "+----------------------+----------------------------------+\n\
+//!      |  difficulty_options  | +--------------------+---------+ |\n\
+//!      |                      | |  adaptive          |  false  | |\n\
+//!      |                      | +--------------------+---------+ |\n\
+//!      |                      | |  start_difficulty  |         | |\n\
+//!      |                      | +--------------------+---------+ |\n\
+//!      +----------------------+----------------------------------+\n\
+//!      |  fullscreen          |  false                           |\n\
+//!      +----------------------+----------------------------------+\n\
+//!      |  key_bindings        | +---------+--+                   |\n\
+//!      |                      | |  down   |  |                   |\n\
+//!      |                      | +---------+--+                   |\n\
+//!      |                      | |  left   |  |                   |\n\
+//!      |                      | +---------+--+                   |\n\
+//!      |                      | |  right  |  |                   |\n\
+//!      |                      | +---------+--+                   |\n\
+//!      |                      | |  up     |  |                   |\n\
+//!      |                      | +---------+--+                   |\n\
+//!      +----------------------+----------------------------------+\n\
+//!      |  mouse_sensitivity   |  1.4                             |\n\
+//!      +----------------------+----------------------------------+\n\
+//!      |  window_size         | +-------+                        |\n\
+//!      |                      | |  800  |                        |\n\
+//!      |                      | +-------+                        |\n\
+//!      |                      | |  600  |                        |\n\
+//!      |                      | +-------+                        |\n\
+//!      +----------------------+----------------------------------+\n\
+//!      |  window_title        |  PAC-MAN                         |\n\
+//!      +----------------------+----------------------------------+"
+//! );
+//! ```
+//!
+//! Collapsed table.
+//!
+//! ```
+//! let data = r#"GameConfig(
+//!     window_size: (800, 600),
+//!     window_title: "PAC-MAN",
+//!     fullscreen: false,
+//!     
+//!     mouse_sensitivity: 1.4,
+//!     key_bindings: {
+//!         "up": Up,
+//!         "down": Down,
+//!         "left": Left,
+//!         "right": Right,
+//!     },
+//!     
+//!     difficulty_options: (
+//!         start_difficulty: Easy,
+//!         adaptive: false,
+//!     ),
+//! )"#;
+//! let scene = ron::from_str(data).unwrap();
+//!
+//! use ron_to_table::RonTable;
+//! use tabled::settings::Style;
+//! let table = RonTable::default().collapse().with(Style::modern()).build(&scene);
+//!
+//! assert_eq!(
+//!     table,
+//!     "┌────────────────────┬──────────────────┬───────┐\n\
+//!      │ difficulty_options │ adaptive         │ false │\n\
+//!      │                    ├──────────────────┼───────┤\n\
+//!      │                    │ start_difficulty │       │\n\
+//!      ├────────────────────┼──────────────────┴───────┤\n\
+//!      │ fullscreen         │ false                    │\n\
+//!      ├────────────────────┼───────┬──────────────────┤\n\
+//!      │ key_bindings       │ down  │                  │\n\
+//!      │                    ├───────┼──────────────────┤\n\
+//!      │                    │ left  │                  │\n\
+//!      │                    ├───────┼──────────────────┤\n\
+//!      │                    │ right │                  │\n\
+//!      │                    ├───────┼──────────────────┤\n\
+//!      │                    │ up    │                  │\n\
+//!      ├────────────────────┼───────┴──────────────────┤\n\
+//!      │ mouse_sensitivity  │ 1.4                      │\n\
+//!      ├────────────────────┼──────────────────────────┤\n\
+//!      │ window_size        │ 800                      │\n\
+//!      │                    ├──────────────────────────┤\n\
+//!      │                    │ 600                      │\n\
+//!      ├────────────────────┼──────────────────────────┤\n\
+//!      │ window_title       │ PAC-MAN                  │\n\
+//!      └────────────────────┴──────────────────────────┘",
+//! );
+//! ```
+
+#![deny(unused_must_use)]
+#![warn(
+    missing_docs,
+    rust_2018_idioms,
+    missing_debug_implementations,
+    unreachable_pub
+)]
+#![allow(clippy::uninlined_format_args)]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/zhiburt/tabled/86ac146e532ce9f7626608d7fd05072123603a2e/assets/tabled-gear.svg"
+)]
+
+use ron::Value;
+
+pub use orientation::Orientation;
+pub use table::RonTable;
+
+mod orientation;
+mod table;
+
+/// The function converts a given [`Value`] to a pretty table.
+///
+/// ```
+/// let data = r#"Scene(
+///     materials: {
+///         "metal": (reflectivity: 1.0),
+///         "plastic": (reflectivity: 0.5),
+///     },
+///     entities: [
+///         (name: "hero", material: "metal"),
+///         (name: "monster", material: "plastic"),
+///     ],
+/// )"#;
+/// let scene = ron::from_str(data).unwrap();
+///
+/// assert_eq!(
+///     ron_to_table::to_string(&scene),
+///     concat!(
+///         "+-------------+--------------------------------------------+\n",
+///         "|  entities   | +----------------------------+             |\n",
+///         "|             | | +------------+---------+   |             |\n",
+///         "|             | | |  material  |  metal  |   |             |\n",
+///         "|             | | +------------+---------+   |             |\n",
+///         "|             | | |  name      |  hero   |   |             |\n",
+///         "|             | | +------------+---------+   |             |\n",
+///         "|             | +----------------------------+             |\n",
+///         "|             | | +------------+-----------+ |             |\n",
+///         "|             | | |  material  |  plastic  | |             |\n",
+///         "|             | | +------------+-----------+ |             |\n",
+///         "|             | | |  name      |  monster  | |             |\n",
+///         "|             | | +------------+-----------+ |             |\n",
+///         "|             | +----------------------------+             |\n",
+///         "+-------------+--------------------------------------------+\n",
+///         "|  materials  | +-----------+----------------------------+ |\n",
+///         "|             | |  metal    | +----------------+-----+   | |\n",
+///         "|             | |           | |  reflectivity  |  1  |   | |\n",
+///         "|             | |           | +----------------+-----+   | |\n",
+///         "|             | +-----------+----------------------------+ |\n",
+///         "|             | |  plastic  | +----------------+-------+ | |\n",
+///         "|             | |           | |  reflectivity  |  0.5  | | |\n",
+///         "|             | |           | +----------------+-------+ | |\n",
+///         "|             | +-----------+----------------------------+ |\n",
+///         "+-------------+--------------------------------------------+",
+///     )
+/// );
+/// ```
+pub fn to_string(value: &Value) -> String {
+    RonTable::default().build(value)
+}
diff --git a/ron_to_table/src/orientation.rs b/ron_to_table/src/orientation.rs
new file mode 100644
index 0000000..7127c89
--- /dev/null
+++ b/ron_to_table/src/orientation.rs
@@ -0,0 +1,9 @@
+/// The structure represents a table mode for a given entity,
+/// either it will be rendered vertically or horizontally.
+#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord)]
+pub enum Orientation {
+    /// Vertical mode (from top to bottom).
+    Row,
+    /// Horizontal mode (from left to right).
+    Column,
+}
diff --git a/ron_to_table/src/table.rs b/ron_to_table/src/table.rs
new file mode 100644
index 0000000..edd6008
--- /dev/null
+++ b/ron_to_table/src/table.rs
@@ -0,0 +1,449 @@
+use std::{
+    cmp,
+    iter::{repeat, FromIterator},
+};
+
+use ron::{Number, Value};
+use tabled::{
+    builder::Builder,
+    grid::{
+        config::{
+            AlignmentHorizontal, AlignmentVertical, CompactMultilineConfig, Indent, Sides,
+            SpannedConfig,
+        },
+        dimension::{CompleteDimension, DimensionPriority, PoolTableDimension},
+        records::EmptyRecords,
+        util::string::{count_lines, get_lines, string_width, string_width_multiline},
+    },
+    settings::{style::Style, TableOption},
+    tables::{PoolTable, TableValue},
+    Table,
+};
+
+use crate::Orientation;
+
+/// Converter of [`Value`] to a table,
+/// with a set of configurations.
+#[derive(Debug, Clone)]
+pub struct RonTable {
+    cfg: CompactMultilineConfig,
+    plain: bool,
+    object_orientation: Orientation,
+    array_orientation: Orientation,
+}
+
+impl Default for RonTable {
+    fn default() -> Self {
+        Self {
+            plain: true,
+            cfg: configure_grid(),
+            array_orientation: Orientation::Column,
+            object_orientation: Orientation::Column,
+        }
+    }
+}
+
+impl RonTable {
+    /// Creates a default ron configuration.
+    pub fn new() -> Self {
+        Self::default()
+    }
+
+    /// Collapse tables out instead of tables within tables.
+    pub fn collapse(&mut self) -> &mut Self {
+        self.plain = false;
+        self
+    }
+
+    /// Set a table mode for a [`serde_json::Value::Object`].
+    pub fn map_orientation(&mut self, mode: Orientation) -> &mut Self {
+        self.object_orientation = mode;
+        self
+    }
+
+    /// Set a table mode for a [`serde_json::Value::Array`].
+    pub fn seq_orientation(&mut self, mode: Orientation) -> &mut Self {
+        self.array_orientation = mode;
+        self
+    }
+
+    /// Apply settings to the table.
+    pub fn with<O>(&mut self, mut option: O) -> &mut Self
+    where
+        O: TableOption<EmptyRecords, CompleteDimension<'static>, CompactMultilineConfig>,
+    {
+        let mut records = EmptyRecords::default();
+        let mut dims = CompleteDimension::default();
+        option.change(&mut records, &mut self.cfg, &mut dims);
+
+        self
+    }
+
+    /// Build a table.
+    pub fn build(&self, value: &Value) -> String {
+        match self.plain {
+            true => plain_table(value, self),
+            false => collapsed_table(value, self),
+        }
+    }
+}
+
+fn configure_grid() -> CompactMultilineConfig {
+    let pad = Sides::new(
+        Indent::spaced(1),
+        Indent::spaced(1),
+        Indent::default(),
+        Indent::default(),
+    );
+
+    CompactMultilineConfig::default()
+        .set_padding(pad)
+        .set_alignment_horizontal(AlignmentHorizontal::Left)
+        .set_borders(*Style::ascii().get_borders())
+}
+
+#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord)]
+struct CollapseCtx {
+    map_orientation: Orientation,
+    list_orientation: Orientation,
+    has_horizontal: bool,
+    has_vertical: bool,
+    alignment_horizontal: AlignmentHorizontal,
+    alignment_vertical: AlignmentVertical,
+}
+
+fn collapsed_table(value: &Value, cfg: &RonTable) -> String {
+    let ctx = CollapseCtx {
+        map_orientation: cfg.object_orientation,
+        list_orientation: cfg.array_orientation,
+        has_horizontal: cfg.cfg.get_borders().has_top(),
+        has_vertical: cfg.cfg.get_borders().has_left(),
+        alignment_horizontal: cfg.cfg.get_alignment_horizontal(),
+        alignment_vertical: cfg.cfg.get_alignment_vertical(),
+    };
+    let value = convert_value_to_table_value(value, ctx);
+
+    PoolTable::from(value)
+        .with(cfg.cfg)
+        .with(PoolTableDimension::new(
+            DimensionPriority::Last,
+            DimensionPriority::Last,
+        ))
+        .to_string()
+}
+
+fn convert_value_to_table_value(value: &Value, ctx: CollapseCtx) -> TableValue {
+    match value {
+        Value::Map(map) => match ctx.map_orientation {
+            Orientation::Row => convert_map_to_row(map, ctx),
+            Orientation::Column => convert_map_to_column(map, ctx),
+        },
+        Value::Option(opt) => match opt {
+            Some(value) => convert_value_to_table_value(value, ctx),
+            None => TableValue::Cell(String::new()),
+        },
+        Value::Seq(list) => convert_list(list, ctx),
+        Value::Bool(value) => TableValue::Cell(value.to_string()),
+        Value::Char(char) => TableValue::Cell(char.to_string()),
+        Value::Number(Number::Integer(number)) => TableValue::Cell(number.to_string()),
+        Value::Number(Number::Float(number)) => TableValue::Cell(number.get().to_string()),
+        Value::String(text) => TableValue::Cell(text.to_owned()),
+        Value::Unit => TableValue::Cell(String::new()),
+    }
+}
+
+fn convert_list(list: &[Value], ctx: CollapseCtx) -> TableValue {
+    let list = list
+        .iter()
+        .map(|value| convert_value_to_table_value(value, ctx))
+        .collect();
+
+    match ctx.list_orientation {
+        Orientation::Row => TableValue::Row(list),
+        Orientation::Column => TableValue::Column(list),
+    }
+}
+
+fn convert_map_to_column(map: &ron::Map, ctx: CollapseCtx) -> TableValue {
+    let mut keys = map
+        .keys()
+        .map(|key| convert_value_to_table_value(key, ctx))
+        .map(|key| {
+            let width = table_value_width(&key, ctx.has_vertical);
+            (key, width)
+        })
+        .collect::<Vec<_>>();
+
+    let key_width = keys.iter().map(|v| v.1).max().unwrap_or(0);
+
+    keys.iter_mut().for_each(|(key, width)| {
+        let left = key_width - *width;
+        if left > 0 {
+            table_value_increase_width(key, left, ctx.alignment_horizontal);
+        }
+    });
+
+    let data = keys
+        .into_iter()
+        .zip(map.values())
+        .map(|((key, _), value)| (key, convert_value_to_table_value(value, ctx)))
+        .map(|(key, value)| TableValue::Row(vec![key, value]))
+        .collect();
+
+    TableValue::Column(data)
+}
+
+fn convert_map_to_row(map: &ron::Map, ctx: CollapseCtx) -> TableValue {
+    let mut keys = map
+        .keys()
+        .map(|key| convert_value_to_table_value(key, ctx))
+        .map(|key| {
+            let height = table_value_height(&key, ctx.has_horizontal);
+            (key, height)
+        })
+        .collect::<Vec<_>>();
+
+    let key_height = keys.iter().map(|v| v.1).max().unwrap_or(0);
+
+    keys.iter_mut().for_each(|(key, width)| {
+        let left = key_height - *width;
+        if left > 0 {
+            table_value_increase_height(key, left, ctx.alignment_vertical);
+        }
+    });
+
+    let data = keys
+        .into_iter()
+        .zip(map.values())
+        .map(|((key, _), value)| (key, convert_value_to_table_value(value, ctx)))
+        .map(|(key, value)| TableValue::Column(vec![key, value]))
+        .collect();
+
+    TableValue::Row(data)
+}
+
+fn table_value_width(value: &TableValue, has_vertical: bool) -> usize {
+    match value {
+        TableValue::Row(list) => {
+            list.iter()
+                .map(|value| table_value_width(value, has_vertical))
+                .sum::<usize>()
+                + (cmp::max(list.len(), 1) - 1) * has_vertical as usize
+        }
+        TableValue::Column(list) => list
+            .iter()
+            .map(|value| table_value_width(value, has_vertical))
+            .max()
+            .unwrap_or(0),
+        TableValue::Cell(string) => string_width_multiline(string),
+    }
+}
+
+fn table_value_height(value: &TableValue, has_horizontal: bool) -> usize {
+    match value {
+        TableValue::Row(list) => list
+            .iter()
+            .map(|value| table_value_width(value, has_horizontal))
+            .max()
+            .unwrap_or(0),
+        TableValue::Column(list) => {
+            list.iter()
+                .map(|value| table_value_height(value, has_horizontal))
+                .sum::<usize>()
+                + (cmp::max(list.len(), 1) - 1) * has_horizontal as usize
+        }
+        TableValue::Cell(string) => count_lines(string),
+    }
+}
+
+fn table_value_increase_width(value: &mut TableValue, by: usize, ah: AlignmentHorizontal) {
+    match value {
+        TableValue::Row(list) => {
+            let mut left = by;
+            while left > 0 {
+                for value in list.iter_mut() {
+                    left -= 1;
+                    table_value_increase_width(value, 1, ah);
+                }
+            }
+        }
+        TableValue::Column(list) => {
+            for value in list.iter_mut() {
+                table_value_increase_width(value, by, ah);
+            }
+        }
+        TableValue::Cell(string) => *string = increase_string_width(string, by, ah),
+    }
+}
+
+fn table_value_increase_height(value: &mut TableValue, by: usize, av: AlignmentVertical) {
+    match value {
+        TableValue::Row(list) => {
+            for value in list.iter_mut() {
+                table_value_increase_height(value, by, av);
+            }
+        }
+        TableValue::Column(list) => {
+            let mut left = by;
+            while left > 0 {
+                for value in list.iter_mut() {
+                    left -= 1;
+                    table_value_increase_height(value, 1, av);
+                }
+            }
+        }
+        TableValue::Cell(string) => *string = increase_string_height(string, by, av),
+    }
+}
+
+fn increase_string_width(text: &str, by: usize, ah: AlignmentHorizontal) -> String {
+    let mut out = Vec::new();
+
+    for line in get_lines(text) {
+        let w = string_width(&line);
+        let (left, right) = indent_horizontal(ah, w + by, w);
+
+        let mut buf = String::new();
+        buf.extend(repeat(' ').take(left));
+        buf.push_str(&line);
+        buf.extend(repeat(' ').take(right));
+
+        out.push(buf);
+    }
+
+    out.join("\n")
+}
+
+fn increase_string_height(text: &str, by: usize, av: AlignmentVertical) -> String {
+    let mut out = Vec::new();
+
+    let count_lines = count_lines(text);
+
+    let (top, bottom) = indent_vertical(av, count_lines + by, count_lines);
+
+    out.extend(repeat(String::new()).take(top));
+
+    for line in get_lines(text) {
+        out.push(line.into_owned());
+    }
+
+    out.extend(repeat(String::new()).take(bottom));
+
+    out.join("\n")
+}
+
+fn indent_vertical(al: AlignmentVertical, available: usize, real: usize) -> (usize, usize) {
+    let top = indent_top(al, available, real);
+    let bottom = available - real - top;
+    (top, bottom)
+}
+
+fn indent_horizontal(al: AlignmentHorizontal, available: usize, real: usize) -> (usize, usize) {
+    let top = indent_left(al, available, real);
+    let right = available - real - top;
+    (top, right)
+}
+
+fn indent_top(al: AlignmentVertical, available: usize, real: usize) -> usize {
+    match al {
+        AlignmentVertical::Top => 0,
+        AlignmentVertical::Bottom => available - real,
+        AlignmentVertical::Center => (available - real) / 2,
+    }
+}
+
+fn indent_left(al: AlignmentHorizontal, available: usize, real: usize) -> usize {
+    match al {
+        AlignmentHorizontal::Left => 0,
+        AlignmentHorizontal::Right => available - real,
+        AlignmentHorizontal::Center => (available - real) / 2,
+    }
+}
+
+fn plain_table(value: &Value, cfg: &RonTable) -> String {
+    _plain_table(value, cfg, true)
+}
+
+fn _plain_table(value: &Value, cfg: &RonTable, outer: bool) -> String {
+    let config: SpannedConfig = cfg.cfg.into();
+
+    match value {
+        Value::Seq(arr) => match cfg.array_orientation {
+            Orientation::Column => seq_column_table(arr, cfg, &config),
+            Orientation::Row => seq_row_table(arr, cfg, &config),
+        },
+        Value::Map(map) => match cfg.object_orientation {
+            Orientation::Column => map_column_table(map, cfg, &config),
+            Orientation::Row => map_row_table(map, cfg, &config),
+        },
+        Value::Option(opt) => match opt {
+            Some(value) => _plain_table(value, cfg, outer),
+            None => String::new(),
+        },
+        Value::Unit => String::new(),
+        Value::String(text) => string_table(text.to_owned(), config, outer),
+        Value::Bool(val) => string_table(val.to_string(), config, outer),
+        Value::Char(char) => string_table(char.to_string(), config, outer),
+        Value::Number(Number::Integer(num)) => string_table(num.to_string(), config, outer),
+        Value::Number(Number::Float(num)) => string_table(num.get().to_string(), config, outer),
+    }
+}
+
+fn seq_column_table(arr: &Vec<Value>, cfg: &RonTable, config: &SpannedConfig) -> String {
+    let mut buf = Builder::with_capacity(1);
+    buf.hint_column_size(1);
+    for value in arr {
+        let val = _plain_table(value, cfg, false);
+        buf.push_record([val]);
+    }
+
+    buf.build().with(config).to_string()
+}
+
+fn seq_row_table(arr: &Vec<Value>, cfg: &RonTable, config: &SpannedConfig) -> String {
+    let mut buf = Vec::with_capacity(arr.len());
+    for value in arr {
+        let val = _plain_table(value, cfg, false);
+        buf.push(val);
+    }
+
+    Builder::from(vec![buf]).build().with(config).to_string()
+}
+
+fn map_column_table(map: &ron::Map, cfg: &RonTable, config: &SpannedConfig) -> String {
+    let mut buf = Builder::with_capacity(map.len());
+    for (key, value) in map.iter() {
+        let key = _plain_table(key, cfg, false);
+        let val = _plain_table(value, cfg, false);
+        buf.push_record([key, val]);
+    }
+
+    buf.build().with(config).to_string()
+}
+
+fn map_row_table(map: &ron::Map, cfg: &RonTable, config: &SpannedConfig) -> String {
+    let mut keys = Vec::with_capacity(map.len());
+    let mut vals = Vec::with_capacity(map.len());
+    for (key, value) in map.iter() {
+        let key = _plain_table(key, cfg, false);
+        let val = _plain_table(value, cfg, false);
+        vals.push(val);
+        keys.push(key);
+    }
+
+    Builder::from(vec![keys, vals])
+        .build()
+        .with(config)
+        .to_string()
+}
+
+fn string_table(val: String, config: SpannedConfig, outer: bool) -> String {
+    let mut table = Table::from_iter([[val]]);
+    table.with(config);
+
+    if !outer {
+        table.with(Style::empty());
+    }
+
+    table.to_string()
+}
diff --git a/tabled/src/grid/compact_multiline_config.rs b/tabled/src/grid/compact_multiline_config.rs
index cc9af07..1e8e790 100644
--- a/tabled/src/grid/compact_multiline_config.rs
+++ b/tabled/src/grid/compact_multiline_config.rs
@@ -1,7 +1,7 @@
-use core::ops::{Deref, DerefMut};
-
-use papergrid::config::compact::CompactConfig;
-use papergrid::config::AlignmentVertical;
+use crate::grid::color::StaticColor;
+use crate::grid::config::{
+    AlignmentHorizontal, AlignmentVertical, Borders, CompactConfig, Indent, Line, Sides,
+};
 
 /// A [`Table`] configuration.
 #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
@@ -26,6 +26,107 @@ impl CompactMultilineConfig {
     pub const fn get_alignment_vertical(&self) -> AlignmentVertical {
         self.alignment_vertical
     }
+
+    /// Set grid margin.
+    pub const fn set_margin(mut self, margin: Sides<Indent>) -> Self {
+        self.config = self.config.set_margin(margin);
+        self
+    }
+
+    /// Returns a grid margin.
+    pub const fn get_margin(&self) -> &Sides<Indent> {
+        self.config.get_margin()
+    }
+
+    /// Set the [`Borders`] value as correct one.
+    pub const fn set_borders(mut self, borders: Borders<char>) -> Self {
+        self.config = self.config.set_borders(borders);
+        self
+    }
+
+    /// Set the first horizontal line.
+    ///
+    /// It ignores the [`Borders`] horizontal value if set for 1st row.
+    pub const fn set_first_horizontal_line(mut self, line: Line<char>) -> Self {
+        self.config = self.config.set_first_horizontal_line(line);
+        self
+    }
+
+    /// Set the first horizontal line.
+    ///
+    /// It ignores the [`Borders`] horizontal value if set for 1st row.
+    pub const fn get_first_horizontal_line(&self) -> Option<Line<char>> {
+        self.config.get_first_horizontal_line()
+    }
+
+    /// Returns a current [`Borders`] structure.
+    pub const fn get_borders(&self) -> &Borders<char> {
+        self.config.get_borders()
+    }
+
+    /// Returns a current [`Borders`] structure.
+    pub const fn get_borders_color(&self) -> &Borders<StaticColor> {
+        self.config.get_borders_color()
+    }
+
+    /// Set a padding to a given cells.
+    pub const fn set_padding(mut self, padding: Sides<Indent>) -> Self {
+        self.config = self.config.set_padding(padding);
+        self
+    }
+
+    /// Get a padding for a given.
+    pub const fn get_padding(&self) -> &Sides<Indent> {
+        self.config.get_padding()
+    }
+
+    /// Set a horizontal alignment.
+    pub const fn set_alignment_horizontal(mut self, alignment: AlignmentHorizontal) -> Self {
+        self.config = self.config.set_alignment_horizontal(alignment);
+        self
+    }
+
+    /// Get a alignment horizontal.
+    pub const fn get_alignment_horizontal(&self) -> AlignmentHorizontal {
+        self.config.get_alignment_horizontal()
+    }
+
+    /// Sets colors of border carcass on the grid.
+    pub const fn set_borders_color(mut self, borders: Borders<StaticColor>) -> Self {
+        self.config = self.config.set_borders_color(borders);
+        self
+    }
+
+    /// Set colors for a margin.
+    pub const fn set_margin_color(mut self, color: Sides<StaticColor>) -> Self {
+        self.config = self.config.set_margin_color(color);
+        self
+    }
+
+    /// Returns a margin color.
+    pub const fn get_margin_color(&self) -> Sides<StaticColor> {
+        self.config.get_margin_color()
+    }
+
+    /// Set a padding to a given cells.
+    pub const fn set_padding_color(mut self, color: Sides<StaticColor>) -> Self {
+        self.config = self.config.set_padding_color(color);
+        self
+    }
+
+    /// Set a padding to a given cells.
+    pub const fn get_padding_color(&self) -> Sides<StaticColor> {
+        self.config.get_padding_color()
+    }
+}
+
+impl Default for CompactMultilineConfig {
+    fn default() -> Self {
+        Self {
+            config: Default::default(),
+            alignment_vertical: AlignmentVertical::Top,
+        }
+    }
 }
 
 impl From<CompactConfig> for CompactMultilineConfig {
@@ -37,26 +138,18 @@ impl From<CompactConfig> for CompactMultilineConfig {
     }
 }
 
-impl Deref for CompactMultilineConfig {
-    type Target = CompactConfig;
-
-    fn deref(&self) -> &Self::Target {
+impl AsRef<CompactConfig> for CompactMultilineConfig {
+    fn as_ref(&self) -> &CompactConfig {
         &self.config
     }
 }
 
-impl DerefMut for CompactMultilineConfig {
-    fn deref_mut(&mut self) -> &mut Self::Target {
+impl AsMut<CompactConfig> for CompactMultilineConfig {
+    fn as_mut(&mut self) -> &mut CompactConfig {
         &mut self.config
     }
 }
 
-impl AsRef<CompactConfig> for CompactMultilineConfig {
-    fn as_ref(&self) -> &CompactConfig {
-        &self.config
-    }
-}
-
 #[cfg(feature = "std")]
 impl From<CompactMultilineConfig> for crate::grid::config::SpannedConfig {
     fn from(compact: CompactMultilineConfig) -> Self {
diff --git a/tabled/src/grid/dimension/mod.rs b/tabled/src/grid/dimension/mod.rs
index 38e2fae..2192c3e 100644
--- a/tabled/src/grid/dimension/mod.rs
+++ b/tabled/src/grid/dimension/mod.rs
@@ -1,6 +1,7 @@
 //! Module contains a list of implementations of [`Estimate`] and [`Dimension`].
 
 mod const_dimension;
+mod pool_table_dimension;
 
 #[cfg(feature = "std")]
 mod complete_dimension;
@@ -18,6 +19,7 @@ pub use self::{
 };
 pub use const_dimension::{ConstDimension, ConstSize};
 pub use papergrid::dimension::{Dimension, Estimate};
+pub use pool_table_dimension::{DimensionPriority, PoolTableDimension};
 
 #[cfg(feature = "std")]
 #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
diff --git a/tabled/src/grid/dimension/pool_table_dimension.rs b/tabled/src/grid/dimension/pool_table_dimension.rs
new file mode 100644
index 0000000..9909c66
--- /dev/null
+++ b/tabled/src/grid/dimension/pool_table_dimension.rs
@@ -0,0 +1,36 @@
+/// PoolTableDimension is a dimension resolve strategy for [`PoolTable`]
+///
+/// [`PoolTable`]: crate::tables::PoolTable
+#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
+pub struct PoolTableDimension {
+    width: DimensionPriority,
+    height: DimensionPriority,
+}
+
+impl PoolTableDimension {
+    /// Creates a new object.
+    pub fn new(width: DimensionPriority, height: DimensionPriority) -> Self {
+        Self { width, height }
+    }
+
+    /// Return a width priority.
+    pub fn width(&self) -> DimensionPriority {
+        self.width
+    }
+
+    /// Return a height priority.
+    pub fn height(&self) -> DimensionPriority {
+        self.height
+    }
+}
+
+/// A control of width/height logic for situations where we must increase some cell to align columns/row.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+pub enum DimensionPriority {
+    /// Increase first cell width/height in a row/column.
+    First,
+    /// Increase last cell width/height in a row/column.
+    Last,
+    /// Increase cells width/height 1 by 1 in a row/column.
+    List,
+}
diff --git a/tabled/src/lib.rs b/tabled/src/lib.rs
index 1c7d8a1..a00a375 100644
--- a/tabled/src/lib.rs
+++ b/tabled/src/lib.rs
@@ -288,7 +288,6 @@
 #![allow(clippy::uninlined_format_args)]
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 mod tabled;
 
 #[cfg(feature = "std")]
diff --git a/tabled/src/settings/alignment/mod.rs b/tabled/src/settings/alignment/mod.rs
index f708920..d08058a 100644
--- a/tabled/src/settings/alignment/mod.rs
+++ b/tabled/src/settings/alignment/mod.rs
@@ -51,8 +51,6 @@
 //! [`Table`]: crate::Table
 //! [`AlignmentStrategy`]: crate::settings::formatting::AlignmentStrategy
 
-use core::ops::DerefMut;
-
 use crate::{
     grid::config::CompactConfig,
     grid::config::{AlignmentHorizontal, AlignmentVertical, CompactMultilineConfig, Entity},
@@ -151,7 +149,6 @@ impl Alignment {
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R> crate::settings::CellOption<R, ColoredConfig> for Alignment {
     fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, entity: Entity) {
         match self.inner {
@@ -162,7 +159,6 @@ impl<R> crate::settings::CellOption<R, ColoredConfig> for Alignment {
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R, D> TableOption<R, D, ColoredConfig> for Alignment {
     fn change(&mut self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
         match self.inner {
@@ -183,7 +179,7 @@ impl<R, D> TableOption<R, D, CompactConfig> for Alignment {
 impl<R, D> TableOption<R, D, CompactMultilineConfig> for Alignment {
     fn change(&mut self, _: &mut R, cfg: &mut CompactMultilineConfig, _: &mut D) {
         match self.inner {
-            Horizontal(a) => *cfg.deref_mut() = cfg.set_alignment_horizontal(a),
+            Horizontal(a) => *cfg = cfg.set_alignment_horizontal(a),
             Vertical(a) => *cfg = cfg.set_alignment_vertical(a),
         }
     }
diff --git a/tabled/src/settings/cell_option.rs b/tabled/src/settings/cell_option.rs
index c82584b..e4392c1 100644
--- a/tabled/src/settings/cell_option.rs
+++ b/tabled/src/settings/cell_option.rs
@@ -25,7 +25,6 @@ where
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R, C> CellOption<R, C> for String
 where
     R: Records + ExactRecords + RecordsMut<String>,
diff --git a/tabled/src/settings/margin/mod.rs b/tabled/src/settings/margin/mod.rs
index 4bd043d..d97b0de 100644
--- a/tabled/src/settings/margin/mod.rs
+++ b/tabled/src/settings/margin/mod.rs
@@ -26,8 +26,6 @@
 //!
 //! [`Table`]: crate::Table
 
-use core::ops::DerefMut;
-
 use crate::{
     grid::{
         color::StaticColor,
@@ -93,7 +91,6 @@ impl<Color> Margin<Color> {
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R, D, C> TableOption<R, D, ColoredConfig> for Margin<C>
 where
     C: Into<AnsiColor<'static>> + Clone,
@@ -135,6 +132,6 @@ where
     C: Into<StaticColor> + Clone,
 {
     fn change(&mut self, records: &mut R, cfg: &mut CompactMultilineConfig, dimension: &mut D) {
-        self.change(records, cfg.deref_mut(), dimension)
+        self.change(records, cfg.as_mut(), dimension)
     }
 }
diff --git a/tabled/src/settings/padding/mod.rs b/tabled/src/settings/padding/mod.rs
index 4c73f0a..6676182 100644
--- a/tabled/src/settings/padding/mod.rs
+++ b/tabled/src/settings/padding/mod.rs
@@ -35,8 +35,6 @@
 //!
 //! [`Table`]: crate::Table
 
-use core::ops::DerefMut;
-
 use crate::{
     grid::{
         color::StaticColor,
@@ -131,7 +129,6 @@ where
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R, D, C> TableOption<R, D, ColoredConfig> for Padding<C>
 where
     C: Into<AnsiColor<'static>> + Clone,
@@ -160,6 +157,6 @@ where
     C: Into<StaticColor> + Clone,
 {
     fn change(&mut self, records: &mut R, cfg: &mut CompactMultilineConfig, dimension: &mut D) {
-        self.change(records, cfg.deref_mut(), dimension)
+        self.change(records, cfg.as_mut(), dimension)
     }
 }
diff --git a/tabled/src/settings/panel/vertical_panel.rs b/tabled/src/settings/panel/vertical_panel.rs
index 9eb7c8d..73a3348 100644
--- a/tabled/src/settings/panel/vertical_panel.rs
+++ b/tabled/src/settings/panel/vertical_panel.rs
@@ -37,7 +37,6 @@ where
         let is_intersect_horizontal_span = (0..=records.count_rows())
             .any(|row| cfg.is_cell_covered_by_column_span((row, self.col)));
 
-        println!("{is_intersect_horizontal_span} {}", self.col);
         if is_intersect_horizontal_span {
             return;
         }
diff --git a/tabled/src/settings/settings_list.rs b/tabled/src/settings/settings_list.rs
index 68853ff..f58991e 100644
--- a/tabled/src/settings/settings_list.rs
+++ b/tabled/src/settings/settings_list.rs
@@ -30,7 +30,6 @@ impl<A, B> Settings<A, B> {
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R, C, A, B> super::CellOption<R, C> for Settings<A, B>
 where
     A: super::CellOption<R, C>,
@@ -58,7 +57,6 @@ where
 pub struct EmptySettings;
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<R, C> super::CellOption<R, C> for EmptySettings {
     fn change(&mut self, _: &mut R, _: &mut C, _: Entity) {}
 }
diff --git a/tabled/src/settings/style/border_color.rs b/tabled/src/settings/style/border_color.rs
index cde8067..37329dd 100644
--- a/tabled/src/settings/style/border_color.rs
+++ b/tabled/src/settings/style/border_color.rs
@@ -20,7 +20,6 @@ use crate::{
 ///     .with(Style::ascii())
 ///     .with(Modify::new(Rows::single(0)).with(BorderColor::default().top(Color::FG_RED)));
 /// ```
-#[cfg_attr(docsrs, doc(cfg(feature = "color")))]
 #[derive(Debug, Clone, Default, Eq, PartialEq)]
 pub struct BorderColor(Border<AnsiColor<'static>>);
 
diff --git a/tabled/src/settings/style/builder.rs b/tabled/src/settings/style/builder.rs
index 5edeaef..35d4ff0 100644
--- a/tabled/src/settings/style/builder.rs
+++ b/tabled/src/settings/style/builder.rs
@@ -1,6 +1,6 @@
 //! This module contains a compile time style builder [`Style`].
 
-use core::{marker::PhantomData, ops::DerefMut};
+use core::marker::PhantomData;
 
 use crate::{
     grid::config::{Borders, CompactConfig, CompactMultilineConfig},
@@ -8,7 +8,6 @@ use crate::{
 };
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 use crate::grid::config::ColoredConfig;
 
 use super::{HorizontalLine, Line, VerticalLine};
@@ -1045,7 +1044,6 @@ impl<T, B, L, R, H, V, HLines, VLines> Style<T, B, L, R, H, V, HLines, VLines> {
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl<T, B, L, R, H, V, HLines, VLines, I, D> TableOption<I, D, ColoredConfig>
     for Style<T, B, L, R, H, V, HLines, VLines>
 where
@@ -1088,7 +1086,7 @@ where
     HLines: IntoIterator<Item = HorizontalLine> + Clone,
 {
     fn change(&mut self, records: &mut I, cfg: &mut CompactMultilineConfig, dimension: &mut D) {
-        self.change(records, cfg.deref_mut(), dimension)
+        self.change(records, cfg.as_mut(), dimension)
     }
 }
 
diff --git a/tabled/src/settings/style/horizontal_line.rs b/tabled/src/settings/style/horizontal_line.rs
index 647d2a6..a57e1bc 100644
--- a/tabled/src/settings/style/horizontal_line.rs
+++ b/tabled/src/settings/style/horizontal_line.rs
@@ -1,5 +1,3 @@
-use core::ops::DerefMut;
-
 use crate::{
     grid::config::{CompactConfig, CompactMultilineConfig},
     settings::TableOption,
@@ -65,6 +63,6 @@ impl<R, D> TableOption<R, D, CompactConfig> for HorizontalLine {
 
 impl<R, D> TableOption<R, D, CompactMultilineConfig> for HorizontalLine {
     fn change(&mut self, records: &mut R, cfg: &mut CompactMultilineConfig, dimension: &mut D) {
-        self.change(records, cfg.deref_mut(), dimension)
+        self.change(records, cfg.as_mut(), dimension)
     }
 }
diff --git a/tabled/src/settings/style/line.rs b/tabled/src/settings/style/line.rs
index 50ecf5b..10b3895 100644
--- a/tabled/src/settings/style/line.rs
+++ b/tabled/src/settings/style/line.rs
@@ -1,5 +1,4 @@
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 use crate::grid::config::{HorizontalLine, VerticalLine};
 
 /// The structure represent a vertical or horizontal line.
@@ -57,7 +56,6 @@ impl Line {
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl From<Line> for HorizontalLine {
     fn from(l: Line) -> Self {
         Self {
@@ -70,7 +68,6 @@ impl From<Line> for HorizontalLine {
 }
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 impl From<Line> for VerticalLine {
     fn from(l: Line) -> Self {
         Self {
diff --git a/tabled/src/settings/style/mod.rs b/tabled/src/settings/style/mod.rs
index 508fc59..bce6c6d 100644
--- a/tabled/src/settings/style/mod.rs
+++ b/tabled/src/settings/style/mod.rs
@@ -95,25 +95,18 @@
 //! [`RawStyle`]: crate::raw_style::RawStyle
 
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 mod border;
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 mod border_char;
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 mod border_color;
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 mod border_text;
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 mod offset;
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 mod raw_style;
 #[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
 mod span_border_correction;
 
 mod builder;
diff --git a/tabled/src/settings/width/wrap.rs b/tabled/src/settings/width/wrap.rs
index 2800c36..a774816 100644
--- a/tabled/src/settings/width/wrap.rs
+++ b/tabled/src/settings/width/wrap.rs
@@ -896,19 +896,6 @@ mod tests {
     fn split_by_line_keeping_words_color_3_test() {
         let split_keeping_words = |text, width| split_keeping_words(text, width, "", "");
 
-        println!(
-            "{}",
-            split_keeping_words("\u{1b}[37mthis is a long sentence\u{1b}[0m", 7)
-        );
-
-        println!(
-            "{}",
-            split_keeping_words(
-                "\u{1b}[37m🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻\u{1b}[0m",
-                3,
-            ),
-        );
-
         assert_eq!(
             split_keeping_words(
                 "\u{1b}[37m🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻🚵🏻\u{1b}[0m",
diff --git a/tabled/src/tables/table_pool.rs b/tabled/src/tables/table_pool.rs
index ed19abc..6889e1c 100644
--- a/tabled/src/tables/table_pool.rs
+++ b/tabled/src/tables/table_pool.rs
@@ -1,7 +1,7 @@
 use crate::{
     grid::{
-        config::{AlignmentHorizontal, CompactConfig, CompactMultilineConfig, Indent, Sides},
-        dimension::CompleteDimension,
+        config::{AlignmentHorizontal, CompactMultilineConfig, Indent, Sides},
+        dimension::{DimensionPriority, PoolTableDimension},
         records::EmptyRecords,
         records::IntoRecords,
     },
@@ -52,9 +52,9 @@ use crate::{
 ///
 /// assert_eq!(
 ///     table,
-///     "+----------+--------+----+\n\
-///      | Hello    | World  | !  |\n\
-///      +----------+--------+----+\n\
+///     "+---------+---------+----+\n\
+///      | Hello   | World   | !  |\n\
+///      +---------+---------+----+\n\
 ///      | Salve, mondo!          |\n\
 ///      +------+-------+--+--+---+\n\
 ///      | Hola | mundo |  |  | ! |\n\
@@ -107,6 +107,7 @@ use crate::{
 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
 pub struct PoolTable {
     config: CompactMultilineConfig,
+    dims: PoolTableDimension,
     value: TableValue,
 }
 
@@ -129,6 +130,7 @@ impl PoolTable {
 
         Self {
             config: configure_grid(),
+            dims: PoolTableDimension::new(DimensionPriority::List, DimensionPriority::List),
             value,
         }
     }
@@ -165,11 +167,10 @@ impl PoolTable {
     /// ```
     pub fn with<O>(&mut self, mut option: O) -> &mut Self
     where
-        O: TableOption<EmptyRecords, CompleteDimension<'static>, CompactMultilineConfig>,
+        O: TableOption<EmptyRecords, PoolTableDimension, CompactMultilineConfig>,
     {
         let mut records = EmptyRecords::default();
-        let mut dims = CompleteDimension::default();
-        option.change(&mut records, &mut self.config, &mut dims);
+        option.change(&mut records, &mut self.config, &mut self.dims);
 
         self
     }
@@ -179,6 +180,7 @@ impl From<TableValue> for PoolTable {
     fn from(value: TableValue) -> Self {
         Self {
             config: configure_grid(),
+            dims: PoolTableDimension::new(DimensionPriority::List, DimensionPriority::List),
             value,
         }
     }
@@ -186,7 +188,7 @@ impl From<TableValue> for PoolTable {
 
 impl std::fmt::Display for PoolTable {
     fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-        print::build_table(&self.value, &self.config).fmt(f)
+        print::build_table(&self.value, &self.config, self.dims).fmt(f)
     }
 }
 
@@ -202,19 +204,29 @@ pub enum TableValue {
 }
 
 fn configure_grid() -> CompactMultilineConfig {
-    let default_padding = Sides::new(
+    let pad = Sides::new(
         Indent::spaced(1),
         Indent::spaced(1),
         Indent::default(),
         Indent::default(),
     );
 
-    CompactMultilineConfig::from(
-        CompactConfig::default()
-            .set_padding(default_padding)
-            .set_alignment_horizontal(AlignmentHorizontal::Left)
-            .set_borders(*Style::ascii().get_borders()),
-    )
+    CompactMultilineConfig::default()
+        .set_padding(pad)
+        .set_alignment_horizontal(AlignmentHorizontal::Left)
+        .set_borders(*Style::ascii().get_borders())
+}
+
+impl<R, C> TableOption<R, PoolTableDimension, C> for PoolTableDimension {
+    fn change(&mut self, _: &mut R, _: &mut C, dimension: &mut PoolTableDimension) {
+        *dimension = *self;
+    }
+}
+
+impl<R, D> TableOption<R, D, CompactMultilineConfig> for CompactMultilineConfig {
+    fn change(&mut self, _: &mut R, config: &mut CompactMultilineConfig, _: &mut D) {
+        *config = *self;
+    }
 }
 
 mod print {
@@ -230,7 +242,7 @@ mod print {
                 AlignmentHorizontal, AlignmentVertical, ColoredConfig, CompactMultilineConfig,
                 Offset,
             },
-            dimension::{Dimension, Estimate},
+            dimension::{Dimension, DimensionPriority, Estimate, PoolTableDimension},
             records::Records,
             util::string::{count_lines, get_lines, string_dimension, string_width},
         },
@@ -278,7 +290,11 @@ mod print {
         }
     }
 
-    pub(super) fn build_table(val: &TableValue, cfg: &CompactMultilineConfig) -> String {
+    pub(super) fn build_table(
+        val: &TableValue,
+        cfg: &CompactMultilineConfig,
+        dims_priority: PoolTableDimension,
+    ) -> String {
         let dims = collect_table_dimensions(val, cfg);
         let ctx = PrintContext {
             is_last_col: true,
@@ -289,7 +305,7 @@ mod print {
             ..Default::default()
         };
 
-        let data = _build_table(val, cfg, &dims, ctx);
+        let data = _build_table(val, cfg, &dims, dims_priority, ctx);
 
         data.content
     }
@@ -298,6 +314,7 @@ mod print {
         val: &TableValue,
         cfg: &CompactMultilineConfig,
         dims: &Dimensions,
+        priority: PoolTableDimension,
         ctx: PrintContext,
     ) -> CellData {
         match val {
@@ -307,14 +324,14 @@ mod print {
                     return generate_value_cell("", cfg, ctx);
                 }
 
-                generate_table_row(list, cfg, dims, ctx)
+                generate_table_row(list, cfg, dims, priority, ctx)
             }
             TableValue::Column(list) => {
                 if list.is_empty() {
                     return generate_value_cell("", cfg, ctx);
                 }
 
-                generate_table_column(list, cfg, dims, ctx)
+                generate_table_column(list, cfg, dims, priority, ctx)
             }
         }
     }
@@ -323,13 +340,14 @@ mod print {
         list: &Vec<TableValue>,
         cfg: &CompactMultilineConfig,
         dims: &Dimensions,
+        priority: PoolTableDimension,
         ctx: PrintContext,
     ) -> CellData {
         let array_dims = dims.arrays.get(&ctx.pos).unwrap();
 
         let height = dims.all.get(&ctx.pos).unwrap().height;
         let additional_height = ctx.size.height - height;
-        let (chunk_height, rest_height) = split_value(additional_height, list.len());
+        let (chunk_height, mut rest_height) = split_value(additional_height, list.len());
 
         let mut intersections_horizontal = ctx.intersections_horizontal;
         let mut intersections_vertical = ctx.intersections_vertical;
@@ -340,10 +358,28 @@ mod print {
         for (i, val) in list.iter().enumerate() {
             let val_pos = *array_dims.index.get(&i).unwrap();
 
-            let mut height = dims.all.get(&val_pos).unwrap().height + chunk_height;
-            if i == 0 {
-                height += rest_height;
+            let mut height = dims.all.get(&val_pos).unwrap().height;
+            match priority.height() {
+                DimensionPriority::First => {
+                    if i == 0 {
+                        height += additional_height;
+                    }
+                }
+                DimensionPriority::Last => {
+                    if i + 1 == list.len() {
+                        height += additional_height;
+                    }
+                }
+                DimensionPriority::List => {
+                    height += chunk_height;
+
+                    if rest_height > 0 {
+                        height += 1;
+                        rest_height -= 1; // must be safe
+                    }
+                }
             }
+
             let size = Dim::new(ctx.size.width, height);
 
             let (split, intersections_vertical) =
@@ -373,7 +409,7 @@ mod print {
                 size,
             };
 
-            let data = _build_table(val, cfg, dims, valctx);
+            let data = _build_table(val, cfg, dims, priority, valctx);
             intersections_horizontal = data.intersections_horizontal;
             next_intersections_vertical.extend(data.intersections_vertical);
 
@@ -393,13 +429,14 @@ mod print {
         list: &Vec<TableValue>,
         cfg: &CompactMultilineConfig,
         dims: &Dimensions,
+        priority: PoolTableDimension,
         ctx: PrintContext,
     ) -> CellData {
         let array_dims = dims.arrays.get(&ctx.pos).unwrap();
 
         let list_width = dims.all.get(&ctx.pos).unwrap().width;
         let additional_width = ctx.size.width - list_width;
-        let (chunk_width, rest_width) = split_value(additional_width, list.len());
+        let (chunk_width, mut rest_width) = split_value(additional_width, list.len());
 
         let mut intersections_horizontal = ctx.intersections_horizontal;
         let mut intersections_vertical = ctx.intersections_vertical;
@@ -410,10 +447,28 @@ mod print {
         for (i, val) in list.iter().enumerate() {
             let val_pos = *array_dims.index.get(&i).unwrap();
 
-            let mut width = dims.all.get(&val_pos).unwrap().width + chunk_width;
-            if i == 0 {
-                width += rest_width;
+            let mut width = dims.all.get(&val_pos).unwrap().width;
+            match priority.width() {
+                DimensionPriority::First => {
+                    if i == 0 {
+                        width += additional_width;
+                    }
+                }
+                DimensionPriority::Last => {
+                    if i + 1 == list.len() {
+                        width += additional_width;
+                    }
+                }
+                DimensionPriority::List => {
+                    width += chunk_width;
+
+                    if rest_width > 0 {
+                        width += 1;
+                        rest_width -= 1; // must be safe
+                    }
+                }
             }
+
             let size = Dim::new(width, ctx.size.height);
 
             let (split, intersections_horizontal) =
@@ -443,7 +498,7 @@ mod print {
                 size,
             };
 
-            let val = _build_table(val, cfg, dims, valctx);
+            let val = _build_table(val, cfg, dims, priority, valctx);
             intersections_vertical = val.intersections_vertical;
             new_intersections_horizontal.extend(val.intersections_horizontal.iter());
             let value = val.content;


Test patch:
diff --git a/csv_to_table/tests/csv_table.rs b/csv_to_table/tests/csv_table.rs
index ddf1da0..d22ab7f 100644
--- a/csv_to_table/tests/csv_table.rs
+++ b/csv_to_table/tests/csv_table.rs
@@ -28,8 +28,6 @@ fn test_0() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
diff --git a/json_to_table/tests/test_orientation_modes.rs b/json_to_table/tests/test_orientation_modes.rs
index 24fcb55..6b1b723 100644
--- a/json_to_table/tests/test_orientation_modes.rs
+++ b/json_to_table/tests/test_orientation_modes.rs
@@ -1092,49 +1092,3 @@ fn collapse_object_array_orientation_test_7() {
         )
     );
 }
-
-// #[test]
-// fn orientation_collapse_test_1() {
-//     let value = json!(
-//         {"widget": {
-//             "debug": "on",
-//             "text": {
-//                 "data": ["Click Here", "asda", "123132"],
-//                 "size": 36,
-//                 "style": "bold",
-//                 "name": "text1",
-//                 "hOffset": 250,
-//                 "vOffset": 100,
-//                 "alignment": "center",
-//                 "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
-//             }
-//         }}
-//     );
-
-//     let table = json_to_table(&value)
-//         .set_style(Style::extended())
-//         .collapse()
-//         .set_object_mode(Orientation::Column)
-//         .to_string();
-
-//     println!("{table}");
-
-//     assert_eq!(
-//         table,
-//         concat!(
-//             "╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗\n",
-//             "║ widget                                                                                                                                                                                                                                                                   ║\n",
-//             "╠══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣\n",
-//             "║ ╔═══════╦═══════════════════════════════════════════════════════════════╦══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╦═══════════════════════════════════════════════════════════════════╗ ║\n",
-//             "║ ║ debug ║ image                                                         ║ text                                                                                                                     ║ window                                                            ║ ║\n",
-//             "║ ╠═══════╬═══════════════════════════════════════════════════════════════╬══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╬═══════════════════════════════════════════════════════════════════╣ ║\n",
-//             "║ ║  on   ║ ╔═══════════╦═════════╦════════╦══════════════════╦═════════╗ ║ ╔═══════════╦══════════════╦═════════╦═════════╦═════════════════════════════════════════════╦══════╦════════╦═════════╗ ║ ╔════════╦═══════════════╦══════════════════════════════╦═══════╗ ║ ║\n",
-//             "║ ║       ║ ║ alignment ║ hOffset ║ name   ║ src              ║ vOffset ║ ║ ║ alignment ║ data         ║ hOffset ║ name    ║ onMouseUp                                   ║ size ║ style  ║ vOffset ║ ║ ║ height ║ name          ║ title                        ║ width ║ ║ ║\n",
-//             "║ ║       ║ ╠═══════════╬═════════╬════════╬══════════════════╬═════════╣ ║ ╠═══════════╬══════════════╬═════════╬═════════╬═════════════════════════════════════════════╬══════╬════════╬═════════╣ ║ ╠════════╬═══════════════╬══════════════════════════════╬═══════╣ ║ ║\n",
-//             "║ ║       ║ ║  center   ║  250    ║  sun1  ║  Images/Sun.png  ║  250    ║ ║ ║  center   ║  Click Here  ║  250    ║  text1  ║  sun1.opacity = (sun1.opacity / 100) * 90;  ║  36  ║  bold  ║  100    ║ ║ ║  500   ║  main_window  ║  Sample Konfabulator Widget  ║  500  ║ ║ ║\n",
-//             "║ ║       ║ ╚═══════════╩═════════╩════════╩══════════════════╩═════════╝ ║ ╚═══════════╩══════════════╩═════════╩═════════╩═════════════════════════════════════════════╩══════╩════════╩═════════╝ ║ ╚════════╩═══════════════╩══════════════════════════════╩═══════╝ ║ ║\n",
-//             "║ ╚═══════╩═══════════════════════════════════════════════════════════════╩══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╩═══════════════════════════════════════════════════════════════════╝ ║\n",
-//             "╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝",
-//         )
-//     );
-// }
diff --git a/json_to_table/tests/test_table.rs b/json_to_table/tests/test_table.rs
index 22f6ee4..2d7a07b 100644
--- a/json_to_table/tests/test_table.rs
+++ b/json_to_table/tests/test_table.rs
@@ -520,8 +520,6 @@ fn aray_split_test() {
         .collapse()
         .to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -552,8 +550,6 @@ fn aray_split_test2() {
         .collapse()
         .to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -641,8 +637,6 @@ fn array_split_3_test() {
         .collapse()
         .to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -886,8 +880,6 @@ fn test_list_empty_entity_collapsed_1() {
         .collapse()
         .to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -1345,8 +1337,6 @@ fn test_multiline_key_height_less_then_value() {
         .collapse()
         .to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
diff --git a/papergrid/tests/format_configuration.rs b/papergrid/tests/format_configuration.rs
index 84280b2..c2a0868 100644
--- a/papergrid/tests/format_configuration.rs
+++ b/papergrid/tests/format_configuration.rs
@@ -784,8 +784,6 @@ fn formatting_test() {
         .change_cell((2, 1), "...");
 
     for (i, test) in tests.iter().enumerate() {
-        let expected = test.3;
-
         let table = grid
             .clone()
             .config(|cfg| {
@@ -796,6 +794,7 @@ fn formatting_test() {
             .clone()
             .build();
 
+        let expected = test.3;
         assert_eq!(table, expected, "test case #{i:?} failed");
     }
 }
diff --git a/papergrid/tests/row_span.rs b/papergrid/tests/row_span.rs
index b5b242d..f46efe4 100644
--- a/papergrid/tests/row_span.rs
+++ b/papergrid/tests/row_span.rs
@@ -1045,8 +1045,6 @@ test_table!(
 //     grid.set(Entity::Cell(0, 1), Settings::new().span(2));
 //     grid.set(Entity::Cell(0, 2), Settings::new().span(2));
 
-//     println!("{}", grid);
-
 //     assert_eq!(
 //         grid.to_string(),
 //         concat!(
diff --git a/ron_to_table/tests/collapse_tests.rs b/ron_to_table/tests/collapse_tests.rs
new file mode 100644
index 0000000..dc4c38d
--- /dev/null
+++ b/ron_to_table/tests/collapse_tests.rs
@@ -0,0 +1,615 @@
+use std::iter::FromIterator;
+
+use ron::{value::Float, Map, Number, Value};
+use ron_to_table::{Orientation, RonTable};
+use tabled::settings::Alignment;
+
+#[test]
+fn test_unit() {
+    let table = build_ron_table(Value::Unit);
+    assert_eq!(table, "+--+\n|  |\n+--+");
+}
+
+#[test]
+fn test_string() {
+    let table = build_ron_table(Value::String(String::from("123456789")));
+    assert_eq!(table, "+-----------+\n| 123456789 |\n+-----------+");
+}
+
+#[test]
+fn test_bool() {
+    let table = build_ron_table(Value::Bool(true));
+    assert_eq!(table, "+------+\n| true |\n+------+");
+
+    let table = build_ron_table(Value::Bool(false));
+    assert_eq!(table, "+-------+\n| false |\n+-------+");
+}
+
+#[test]
+fn test_char() {
+    let table = build_ron_table(Value::Char('a'));
+    assert_eq!(table, "+---+\n| a |\n+---+");
+}
+
+#[test]
+fn test_number() {
+    let table = build_ron_table(Value::Number(Number::Integer(123456789)));
+    assert_eq!(table, "+-----------+\n| 123456789 |\n+-----------+");
+
+    let table = build_ron_table(Value::Number(Number::Float(Float::new(123.456789))));
+    assert_eq!(table, "+------------+\n| 123.456789 |\n+------------+");
+}
+
+#[test]
+fn test_sequence_0() {
+    let table = build_ron_table(Value::Seq(vec![
+        Value::String(String::from("Hello")),
+        Value::String(String::from("World")),
+    ]));
+    assert_eq!(
+        table,
+        "+-------+\n| Hello |\n+-------+\n| World |\n+-------+"
+    );
+}
+
+#[test]
+fn test_sequence_1() {
+    let table = build_ron_table(Value::Seq(vec![
+        Value::Seq(vec![
+            Value::String(String::from("Hello")),
+            Value::String(String::from("World")),
+        ]),
+        Value::String(String::from("Hello")),
+        Value::Seq(vec![
+            Value::String(String::from("Hello")),
+            Value::String(String::from("World")),
+        ]),
+        Value::String(String::from("World")),
+        Value::Seq(vec![
+            Value::String(String::from("Hello")),
+            Value::String(String::from("World")),
+        ]),
+    ]));
+    assert_eq!(
+        table,
+        "+-------+\n\
+         | Hello |\n\
+         +-------+\n\
+         | World |\n\
+         +-------+\n\
+         | Hello |\n\
+         +-------+\n\
+         | Hello |\n\
+         +-------+\n\
+         | World |\n\
+         +-------+\n\
+         | World |\n\
+         +-------+\n\
+         | Hello |\n\
+         +-------+\n\
+         | World |\n\
+         +-------+"
+    );
+}
+
+#[test]
+fn test_sequence_0_row() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::String(String::from("Hello")),
+            Value::String(String::from("World")),
+        ]),
+        Orientation::Row,
+        Orientation::Column,
+    );
+    assert_eq!(
+        table,
+        "+-------+-------+\n\
+         | Hello | World |\n\
+         +-------+-------+"
+    );
+}
+
+#[test]
+fn test_sequence_1_row() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Seq(vec![
+                Value::String(String::from("Hello")),
+                Value::String(String::from("World")),
+            ]),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Hello")),
+                Value::String(String::from("World")),
+            ]),
+            Value::String(String::from("World")),
+            Value::Seq(vec![
+                Value::String(String::from("Hello")),
+                Value::String(String::from("World")),
+            ]),
+        ]),
+        Orientation::Row,
+        Orientation::Column,
+    );
+    assert_eq!(
+        table,
+        "+-------+-------+-------+-------+-------+-------+-------+-------+\n\
+         | Hello | World | Hello | Hello | World | World | Hello | World |\n\
+         +-------+-------+-------+-------+-------+-------+-------+-------+"
+    );
+}
+
+#[test]
+fn test_map_0() {
+    let table = build_ron_table(Value::Map(Map::from_iter([
+        (
+            Value::String(String::from("Hello Key")),
+            Value::String(String::from("World Value")),
+        ),
+        (
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Value 1")),
+        ),
+    ])));
+
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         | Hello Key   | World Value |\n\
+         +-------------+-------------+\n\
+         | Hello Key 2 | Value 1     |\n\
+         +-------------+-------------+",
+    );
+}
+
+#[test]
+fn test_map_1() {
+    let table = build_ron_table(Value::Map(Map::from_iter([
+        (
+            Value::String(String::from("Hello Key")),
+            Value::String(String::from("World Value")),
+        ),
+        (
+            Value::String(String::from("Hello Key 2")),
+            Value::Seq(vec![
+                Value::String(String::from("Hello")),
+                Value::String(String::from("World")),
+            ]),
+        ),
+    ])));
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         | Hello Key   | World Value |\n\
+         +-------------+-------------+\n\
+         | Hello Key 2 | Hello       |\n\
+         |             +-------------+\n\
+         |             | World       |\n\
+         +-------------+-------------+"
+    );
+}
+
+#[test]
+fn test_map_0_row() {
+    let table = build_ron_table_orientation(
+        Value::Map(Map::from_iter([
+            (
+                Value::String(String::from("Hello Key")),
+                Value::String(String::from("World Value")),
+            ),
+            (
+                Value::String(String::from("Hello Key 2")),
+                Value::String(String::from("Value 1")),
+            ),
+        ])),
+        Orientation::Row,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         | Hello Key   | Hello Key 2 |\n\
+         +-------------+-------------+\n\
+         | World Value | Value 1     |\n\
+         +-------------+-------------+"
+    );
+}
+
+#[test]
+fn test_map_1_row() {
+    let table = build_ron_table_orientation(
+        Value::Map(Map::from_iter([
+            (
+                Value::String(String::from("Hello Key")),
+                Value::String(String::from("World Value")),
+            ),
+            (
+                Value::String(String::from("Hello Key 2")),
+                Value::Seq(vec![
+                    Value::String(String::from("Hello")),
+                    Value::String(String::from("World")),
+                ]),
+            ),
+        ])),
+        Orientation::Row,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+-------------+---------------+\n\
+         | Hello Key   | Hello Key 2   |\n\
+         +-------------+-------+-------+\n\
+         | World Value | Hello | World |\n\
+         +-------------+-------+-------+"
+    );
+}
+
+#[test]
+fn test_map_1_row_column() {
+    let table = build_ron_table_orientation(
+        Value::Map(Map::from_iter([
+            (
+                Value::String(String::from("Hello Key")),
+                Value::String(String::from("World Value")),
+            ),
+            (
+                Value::String(String::from("Hello Key 2")),
+                Value::Seq(vec![
+                    Value::String(String::from("Hello")),
+                    Value::String(String::from("World")),
+                ]),
+            ),
+        ])),
+        Orientation::Column,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         | Hello Key   | Hello Key 2 |\n\
+         +-------------+-------------+\n\
+         | World Value | Hello       |\n\
+         |             +-------------+\n\
+         |             | World       |\n\
+         +-------------+-------------+"
+    );
+}
+
+#[test]
+fn test_sequence_row_column() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]),
+        Orientation::Column,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         | Hello Key   | Hello Key 2 |\n\
+         +-------------+-------------+\n\
+         | World Value | Hello       |\n\
+         |             +-------------+\n\
+         |             | World       |\n\
+         +-------------+-------------+\n\
+         | Hello Key 2               |\n\
+         +---------------------------+\n\
+         | Hello                     |\n\
+         +---------------------------+\n\
+         | Wold                      |\n\
+         +---------------------------+\n\
+         | Wod                       |\n\
+         +---------------------------+\n\
+         | Wo                        |\n\
+         +---------------------------+\n\
+         | Wo                        |\n\
+         +---------------------------+"
+    );
+}
+
+#[test]
+fn test_sequence_row_column_1() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]),
+        Orientation::Row,
+        Orientation::Column,
+    );
+    assert_eq!(
+        table,
+        "+-------------+---------------+-------------+-------+------+-----+----+----+\n\
+         | Hello Key   | World Value   | Hello Key 2 | Hello | Wold | Wod | Wo | Wo |\n\
+         +-------------+-------+-------+             |       |      |     |    |    |\n\
+         | Hello Key 2 | Hello | World |             |       |      |     |    |    |\n\
+         +-------------+-------+-------+-------------+-------+------+-----+----+----+"
+    );
+}
+
+#[test]
+fn test_sequence_row_column_2() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]),
+        Orientation::Row,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+-------------+---------------+-------------+-------+------+-----+----+----+\n\
+         | Hello Key   | Hello Key 2   | Hello Key 2 | Hello | Wold | Wod | Wo | Wo |\n\
+         +-------------+-------+-------+             |       |      |     |    |    |\n\
+         | World Value | Hello | World |             |       |      |     |    |    |\n\
+         +-------------+-------+-------+-------------+-------+------+-----+----+----+"
+    );
+}
+
+#[test]
+fn test_sequence_row_column_3() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]),
+        Orientation::Column,
+        Orientation::Column,
+    );
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         | Hello Key   | World Value |\n\
+         +-------------+-------------+\n\
+         | Hello Key 2 | Hello       |\n\
+         |             +-------------+\n\
+         |             | World       |\n\
+         +-------------+-------------+\n\
+         | Hello Key 2               |\n\
+         +---------------------------+\n\
+         | Hello                     |\n\
+         +---------------------------+\n\
+         | Wold                      |\n\
+         +---------------------------+\n\
+         | Wod                       |\n\
+         +---------------------------+\n\
+         | Wo                        |\n\
+         +---------------------------+\n\
+         | Wo                        |\n\
+         +---------------------------+"
+    );
+}
+
+#[test]
+fn test_option_0() {
+    let table = build_ron_table(Value::Option(Some(Box::new(Value::String(String::from(
+        "123",
+    ))))));
+
+    assert_eq!(
+        table,
+        "+-----+\n\
+         | 123 |\n\
+         +-----+",
+    );
+}
+
+#[test]
+fn test_option_1() {
+    let table = build_ron_table(Value::Option(None));
+
+    assert_eq!(
+        table,
+        "+--+\n\
+         |  |\n\
+         +--+",
+    );
+}
+
+#[test]
+fn test_option_2() {
+    let table = build_ron_table(Value::Map(Map::from_iter([
+        (
+            Value::String(String::from("Hello Key")),
+            Value::String(String::from("World Value")),
+        ),
+        (
+            Value::String(String::from("Hello")),
+            Value::Option(Some(Box::new(Value::Seq(vec![
+                Value::String(String::from("123")),
+                Value::String(String::from("1")),
+                Value::String(String::from("xasdasd")),
+            ])))),
+        ),
+        (
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Value 1")),
+        ),
+    ])));
+
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         | Hello       | 123         |\n\
+         |             +-------------+\n\
+         |             | 1           |\n\
+         |             +-------------+\n\
+         |             | xasdasd     |\n\
+         +-------------+-------------+\n\
+         | Hello Key   | World Value |\n\
+         +-------------+-------------+\n\
+         | Hello Key 2 | Value 1     |\n\
+         +-------------+-------------+"
+    );
+}
+
+#[test]
+fn test_option_3() {
+    let table = build_ron_table(Value::Map(Map::from_iter([
+        (
+            Value::String(String::from("Hello Key")),
+            Value::String(String::from("World Value")),
+        ),
+        (Value::String(String::from("Hello")), Value::Option(None)),
+        (
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Value 1")),
+        ),
+    ])));
+
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         | Hello       |             |\n\
+         +-------------+-------------+\n\
+         | Hello Key   | World Value |\n\
+         +-------------+-------------+\n\
+         | Hello Key 2 | Value 1     |\n\
+         +-------------+-------------+"
+    );
+}
+
+#[test]
+fn test_alignment_center() {
+    let table = RonTable::default()
+        .with(Alignment::center_vertical())
+        .with(Alignment::center())
+        .collapse()
+        .build(&Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]));
+    assert_eq!(
+        table,
+        "+-------------+-------------+\n\
+         |  Hello Key  | World Value |\n\
+         +-------------+-------------+\n\
+         |             |    Hello    |\n\
+         | Hello Key 2 +-------------+\n\
+         |             |    World    |\n\
+         +-------------+-------------+\n\
+         |        Hello Key 2        |\n\
+         +---------------------------+\n\
+         |           Hello           |\n\
+         +---------------------------+\n\
+         |           Wold            |\n\
+         +---------------------------+\n\
+         |            Wod            |\n\
+         +---------------------------+\n\
+         |            Wo             |\n\
+         +---------------------------+\n\
+         |            Wo             |\n\
+         +---------------------------+"
+    );
+}
+
+fn build_ron_table(value: Value) -> String {
+    RonTable::default().collapse().build(&value)
+}
+
+fn build_ron_table_orientation(value: Value, seq: Orientation, map: Orientation) -> String {
+    RonTable::default()
+        .collapse()
+        .seq_orientation(seq)
+        .map_orientation(map)
+        .build(&value)
+}
diff --git a/ron_to_table/tests/plain_tests.rs b/ron_to_table/tests/plain_tests.rs
new file mode 100644
index 0000000..84a6efd
--- /dev/null
+++ b/ron_to_table/tests/plain_tests.rs
@@ -0,0 +1,654 @@
+use std::iter::FromIterator;
+
+use ron::{value::Float, Map, Number, Value};
+use ron_to_table::{Orientation, RonTable};
+use tabled::settings::Alignment;
+
+#[test]
+fn test_unit() {
+    let table = build_ron_table(Value::Unit);
+    assert_eq!(table, "");
+}
+
+#[test]
+fn test_string() {
+    let table = build_ron_table(Value::String(String::from("123456789")));
+    assert_eq!(table, "+-----------+\n| 123456789 |\n+-----------+");
+}
+
+#[test]
+fn test_bool() {
+    let table = build_ron_table(Value::Bool(true));
+    assert_eq!(table, "+------+\n| true |\n+------+");
+
+    let table = build_ron_table(Value::Bool(false));
+    assert_eq!(table, "+-------+\n| false |\n+-------+");
+}
+
+#[test]
+fn test_char() {
+    let table = build_ron_table(Value::Char('a'));
+    assert_eq!(table, "+---+\n| a |\n+---+");
+}
+
+#[test]
+fn test_number() {
+    let table = build_ron_table(Value::Number(Number::Integer(123456789)));
+    assert_eq!(table, "+-----------+\n| 123456789 |\n+-----------+");
+
+    let table = build_ron_table(Value::Number(Number::Float(Float::new(123.456789))));
+    assert_eq!(table, "+------------+\n| 123.456789 |\n+------------+");
+}
+
+#[test]
+fn test_sequence_0() {
+    let table = build_ron_table(Value::Seq(vec![
+        Value::String(String::from("Hello")),
+        Value::String(String::from("World")),
+    ]));
+    assert_eq!(
+        table,
+        "+---------+\n\
+         |  Hello  |\n\
+         +---------+\n\
+         |  World  |\n\
+         +---------+"
+    );
+}
+
+#[test]
+fn test_sequence_1() {
+    let table = build_ron_table(Value::Seq(vec![
+        Value::Seq(vec![
+            Value::String(String::from("Hello")),
+            Value::String(String::from("World")),
+        ]),
+        Value::String(String::from("Hello")),
+        Value::Seq(vec![
+            Value::String(String::from("Hello")),
+            Value::String(String::from("World")),
+        ]),
+        Value::String(String::from("World")),
+        Value::Seq(vec![
+            Value::String(String::from("Hello")),
+            Value::String(String::from("World")),
+        ]),
+    ]));
+    assert_eq!(
+        table,
+        "+-------------+\n\
+         | +---------+ |\n\
+         | |  Hello  | |\n\
+         | +---------+ |\n\
+         | |  World  | |\n\
+         | +---------+ |\n\
+         +-------------+\n\
+         |  Hello      |\n\
+         +-------------+\n\
+         | +---------+ |\n\
+         | |  Hello  | |\n\
+         | +---------+ |\n\
+         | |  World  | |\n\
+         | +---------+ |\n\
+         +-------------+\n\
+         |  World      |\n\
+         +-------------+\n\
+         | +---------+ |\n\
+         | |  Hello  | |\n\
+         | +---------+ |\n\
+         | |  World  | |\n\
+         | +---------+ |\n\
+         +-------------+"
+    );
+}
+
+#[test]
+fn test_sequence_0_row() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::String(String::from("Hello")),
+            Value::String(String::from("World")),
+        ]),
+        Orientation::Row,
+        Orientation::Column,
+    );
+    assert_eq!(
+        table,
+        "+---------+---------+\n\
+         |  Hello  |  World  |\n\
+         +---------+---------+"
+    );
+}
+
+#[test]
+fn test_sequence_1_row() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Seq(vec![
+                Value::String(String::from("Hello")),
+                Value::String(String::from("World")),
+            ]),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Hello")),
+                Value::String(String::from("World")),
+            ]),
+            Value::String(String::from("World")),
+            Value::Seq(vec![
+                Value::String(String::from("Hello")),
+                Value::String(String::from("World")),
+            ]),
+        ]),
+        Orientation::Row,
+        Orientation::Column,
+    );
+    assert_eq!(
+        table,
+        "+-----------------------+---------+-----------------------+---------+-----------------------+\n\
+         | +---------+---------+ |  Hello  | +---------+---------+ |  World  | +---------+---------+ |\n\
+         | |  Hello  |  World  | |         | |  Hello  |  World  | |         | |  Hello  |  World  | |\n\
+         | +---------+---------+ |         | +---------+---------+ |         | +---------+---------+ |\n\
+         +-----------------------+---------+-----------------------+---------+-----------------------+"
+    );
+}
+
+#[test]
+fn test_map_0() {
+    let table = build_ron_table(Value::Map(Map::from_iter([
+        (
+            Value::String(String::from("Hello Key")),
+            Value::String(String::from("World Value")),
+        ),
+        (
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Value 1")),
+        ),
+    ])));
+
+    assert_eq!(
+        table,
+        "+---------------+---------------+\n\
+         |  Hello Key    |  World Value  |\n\
+         +---------------+---------------+\n\
+         |  Hello Key 2  |  Value 1      |\n\
+         +---------------+---------------+",
+    );
+}
+
+#[test]
+fn test_map_1() {
+    let table = build_ron_table(Value::Map(Map::from_iter([
+        (
+            Value::String(String::from("Hello Key")),
+            Value::String(String::from("World Value")),
+        ),
+        (
+            Value::String(String::from("Hello Key 2")),
+            Value::Seq(vec![
+                Value::String(String::from("Hello")),
+                Value::String(String::from("World")),
+            ]),
+        ),
+    ])));
+    assert_eq!(
+        table,
+        "+---------------+---------------+\n\
+         |  Hello Key    |  World Value  |\n\
+         +---------------+---------------+\n\
+         |  Hello Key 2  | +---------+   |\n\
+         |               | |  Hello  |   |\n\
+         |               | +---------+   |\n\
+         |               | |  World  |   |\n\
+         |               | +---------+   |\n\
+         +---------------+---------------+"
+    );
+}
+
+#[test]
+fn test_map_0_row() {
+    let table = build_ron_table_orientation(
+        Value::Map(Map::from_iter([
+            (
+                Value::String(String::from("Hello Key")),
+                Value::String(String::from("World Value")),
+            ),
+            (
+                Value::String(String::from("Hello Key 2")),
+                Value::String(String::from("Value 1")),
+            ),
+        ])),
+        Orientation::Row,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+---------------+---------------+\n\
+         |  Hello Key    |  Hello Key 2  |\n\
+         +---------------+---------------+\n\
+         |  World Value  |  Value 1      |\n\
+         +---------------+---------------+"
+    );
+}
+
+#[test]
+fn test_map_1_row() {
+    let table = build_ron_table_orientation(
+        Value::Map(Map::from_iter([
+            (
+                Value::String(String::from("Hello Key")),
+                Value::String(String::from("World Value")),
+            ),
+            (
+                Value::String(String::from("Hello Key 2")),
+                Value::Seq(vec![
+                    Value::String(String::from("Hello")),
+                    Value::String(String::from("World")),
+                ]),
+            ),
+        ])),
+        Orientation::Row,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+---------------+-----------------------+\n\
+         |  Hello Key    |  Hello Key 2          |\n\
+         +---------------+-----------------------+\n\
+         |  World Value  | +---------+---------+ |\n\
+         |               | |  Hello  |  World  | |\n\
+         |               | +---------+---------+ |\n\
+         +---------------+-----------------------+"
+    );
+}
+
+#[test]
+fn test_map_1_row_column() {
+    let table = build_ron_table_orientation(
+        Value::Map(Map::from_iter([
+            (
+                Value::String(String::from("Hello Key")),
+                Value::String(String::from("World Value")),
+            ),
+            (
+                Value::String(String::from("Hello Key 2")),
+                Value::Seq(vec![
+                    Value::String(String::from("Hello")),
+                    Value::String(String::from("World")),
+                ]),
+            ),
+        ])),
+        Orientation::Column,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+---------------+---------------+\n\
+         |  Hello Key    |  Hello Key 2  |\n\
+         +---------------+---------------+\n\
+         |  World Value  | +---------+   |\n\
+         |               | |  Hello  |   |\n\
+         |               | +---------+   |\n\
+         |               | |  World  |   |\n\
+         |               | +---------+   |\n\
+         +---------------+---------------+"
+    );
+}
+
+#[test]
+fn test_sequence_row_column() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]),
+        Orientation::Column,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+-----------------------------------+\n\
+         | +---------------+---------------+ |\n\
+         | |  Hello Key    |  Hello Key 2  | |\n\
+         | +---------------+---------------+ |\n\
+         | |  World Value  | +---------+   | |\n\
+         | |               | |  Hello  |   | |\n\
+         | |               | +---------+   | |\n\
+         | |               | |  World  |   | |\n\
+         | |               | +---------+   | |\n\
+         | +---------------+---------------+ |\n\
+         +-----------------------------------+\n\
+         |  Hello Key 2                      |\n\
+         +-----------------------------------+\n\
+         |  Hello                            |\n\
+         +-----------------------------------+\n\
+         | +--------+                        |\n\
+         | |  Wold  |                        |\n\
+         | +--------+                        |\n\
+         | |  Wod   |                        |\n\
+         | +--------+                        |\n\
+         | |  Wo    |                        |\n\
+         | +--------+                        |\n\
+         | |  Wo    |                        |\n\
+         | +--------+                        |\n\
+         +-----------------------------------+"
+    );
+}
+
+#[test]
+fn test_sequence_row_column_1() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]),
+        Orientation::Row,
+        Orientation::Column,
+    );
+    assert_eq!(
+        table,
+        "+-------------------------------------------+---------------+---------+----------------------------------+\n\
+         | +---------------+-----------------------+ |  Hello Key 2  |  Hello  | +--------+-------+------+------+ |\n\
+         | |  Hello Key    |  World Value          | |               |         | |  Wold  |  Wod  |  Wo  |  Wo  | |\n\
+         | +---------------+-----------------------+ |               |         | +--------+-------+------+------+ |\n\
+         | |  Hello Key 2  | +---------+---------+ | |               |         |                                  |\n\
+         | |               | |  Hello  |  World  | | |               |         |                                  |\n\
+         | |               | +---------+---------+ | |               |         |                                  |\n\
+         | +---------------+-----------------------+ |               |         |                                  |\n\
+         +-------------------------------------------+---------------+---------+----------------------------------+"
+    );
+}
+
+#[test]
+fn test_sequence_row_column_2() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]),
+        Orientation::Row,
+        Orientation::Row,
+    );
+    assert_eq!(
+        table,
+        "+-------------------------------------------+---------------+---------+----------------------------------+\n\
+         | +---------------+-----------------------+ |  Hello Key 2  |  Hello  | +--------+-------+------+------+ |\n\
+         | |  Hello Key    |  Hello Key 2          | |               |         | |  Wold  |  Wod  |  Wo  |  Wo  | |\n\
+         | +---------------+-----------------------+ |               |         | +--------+-------+------+------+ |\n\
+         | |  World Value  | +---------+---------+ | |               |         |                                  |\n\
+         | |               | |  Hello  |  World  | | |               |         |                                  |\n\
+         | |               | +---------+---------+ | |               |         |                                  |\n\
+         | +---------------+-----------------------+ |               |         |                                  |\n\
+         +-------------------------------------------+---------------+---------+----------------------------------+"
+    );
+}
+
+#[test]
+fn test_sequence_row_column_3() {
+    let table = build_ron_table_orientation(
+        Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]),
+        Orientation::Column,
+        Orientation::Column,
+    );
+    assert_eq!(
+        table,
+        "+-----------------------------------+\n\
+         | +---------------+---------------+ |\n\
+         | |  Hello Key    |  World Value  | |\n\
+         | +---------------+---------------+ |\n\
+         | |  Hello Key 2  | +---------+   | |\n\
+         | |               | |  Hello  |   | |\n\
+         | |               | +---------+   | |\n\
+         | |               | |  World  |   | |\n\
+         | |               | +---------+   | |\n\
+         | +---------------+---------------+ |\n\
+         +-----------------------------------+\n\
+         |  Hello Key 2                      |\n\
+         +-----------------------------------+\n\
+         |  Hello                            |\n\
+         +-----------------------------------+\n\
+         | +--------+                        |\n\
+         | |  Wold  |                        |\n\
+         | +--------+                        |\n\
+         | |  Wod   |                        |\n\
+         | +--------+                        |\n\
+         | |  Wo    |                        |\n\
+         | +--------+                        |\n\
+         | |  Wo    |                        |\n\
+         | +--------+                        |\n\
+         +-----------------------------------+"
+    );
+}
+
+#[test]
+fn test_option_0() {
+    let table = build_ron_table(Value::Option(Some(Box::new(Value::String(String::from(
+        "123",
+    ))))));
+
+    assert_eq!(
+        table,
+        "+-----+\n\
+         | 123 |\n\
+         +-----+",
+    );
+}
+
+#[test]
+fn test_option_1() {
+    let table = build_ron_table(Value::Option(None));
+
+    assert_eq!(table, "");
+}
+
+#[test]
+fn test_option_2() {
+    let table = build_ron_table(Value::Map(Map::from_iter([
+        (
+            Value::String(String::from("Hello Key")),
+            Value::String(String::from("World Value")),
+        ),
+        (
+            Value::String(String::from("Hello")),
+            Value::Option(Some(Box::new(Value::Seq(vec![
+                Value::String(String::from("123")),
+                Value::String(String::from("1")),
+                Value::String(String::from("xasdasd")),
+            ])))),
+        ),
+        (
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Value 1")),
+        ),
+    ])));
+
+    assert_eq!(
+        table,
+        "+---------------+---------------+\n\
+         |  Hello        | +-----------+ |\n\
+         |               | |  123      | |\n\
+         |               | +-----------+ |\n\
+         |               | |  1        | |\n\
+         |               | +-----------+ |\n\
+         |               | |  xasdasd  | |\n\
+         |               | +-----------+ |\n\
+         +---------------+---------------+\n\
+         |  Hello Key    |  World Value  |\n\
+         +---------------+---------------+\n\
+         |  Hello Key 2  |  Value 1      |\n\
+         +---------------+---------------+"
+    );
+}
+
+#[test]
+fn test_option_3() {
+    let table = build_ron_table(Value::Map(Map::from_iter([
+        (
+            Value::String(String::from("Hello Key")),
+            Value::String(String::from("World Value")),
+        ),
+        (Value::String(String::from("Hello")), Value::Option(None)),
+        (
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Value 1")),
+        ),
+    ])));
+
+    assert_eq!(
+        table,
+        "+---------------+---------------+\n\
+         |  Hello        |               |\n\
+         +---------------+---------------+\n\
+         |  Hello Key    |  World Value  |\n\
+         +---------------+---------------+\n\
+         |  Hello Key 2  |  Value 1      |\n\
+         +---------------+---------------+"
+    );
+}
+
+#[test]
+fn test_alignment_center() {
+    let table = RonTable::default()
+        .with(Alignment::center_vertical())
+        .with(Alignment::center())
+        .build(&Value::Seq(vec![
+            Value::Map(Map::from_iter([
+                (
+                    Value::String(String::from("Hello Key")),
+                    Value::String(String::from("World Value")),
+                ),
+                (
+                    Value::String(String::from("Hello Key 2")),
+                    Value::Seq(vec![
+                        Value::String(String::from("Hello")),
+                        Value::String(String::from("World")),
+                    ]),
+                ),
+            ])),
+            Value::String(String::from("Hello Key 2")),
+            Value::String(String::from("Hello")),
+            Value::Seq(vec![
+                Value::String(String::from("Wold")),
+                Value::String(String::from("Wod")),
+                Value::String(String::from("Wo")),
+                Value::String(String::from("Wo")),
+            ]),
+        ]));
+    assert_eq!(
+        table,
+        "+-----------------------------------+\n\
+         | +---------------+---------------+ |\n\
+         | |   Hello Key   |  World Value  | |\n\
+         | +---------------+---------------+ |\n\
+         | |               |  +---------+  | |\n\
+         | |               |  |  Hello  |  | |\n\
+         | |  Hello Key 2  |  +---------+  | |\n\
+         | |               |  |  World  |  | |\n\
+         | |               |  +---------+  | |\n\
+         | +---------------+---------------+ |\n\
+         +-----------------------------------+\n\
+         |            Hello Key 2            |\n\
+         +-----------------------------------+\n\
+         |               Hello               |\n\
+         +-----------------------------------+\n\
+         |            +--------+             |\n\
+         |            |  Wold  |             |\n\
+         |            +--------+             |\n\
+         |            |  Wod   |             |\n\
+         |            +--------+             |\n\
+         |            |   Wo   |             |\n\
+         |            +--------+             |\n\
+         |            |   Wo   |             |\n\
+         |            +--------+             |\n\
+         +-----------------------------------+"
+    );
+}
+
+fn build_ron_table(value: Value) -> String {
+    RonTable::default().build(&value)
+}
+
+fn build_ron_table_orientation(value: Value, seq: Orientation, map: Orientation) -> String {
+    RonTable::default()
+        .seq_orientation(seq)
+        .map_orientation(map)
+        .build(&value)
+}
diff --git a/static_table/tests/static_table.rs b/static_table/tests/static_table.rs
index 43778d9..01eb8f4 100644
--- a/static_table/tests/static_table.rs
+++ b/static_table/tests/static_table.rs
@@ -551,3 +551,23 @@ fn static_table_with_theme_padding_margin() {
     );
     assert_eq!(table, expected);
 }
+
+#[test]
+fn static_table_pool_0() {
+    #[rustfmt::skip]
+    let table = static_table!([
+        [{{"Hello"}}, "World"],
+        ["123", "456"],
+        [{{"7"}}, "8"],
+    ]);
+    assert_eq!(
+        table,
+        "+-------+-------+\n\
+         | Hello | World |\n\
+         +-------+-------+\n\
+         | 123   | 456   |\n\
+         +-------+-------+\n\
+         | 7     | 8     |\n\
+         +-------+-------+"
+    );
+}
diff --git a/table_to_html/tests/table.rs b/table_to_html/tests/table.rs
index e3345f6..f526ccd 100644
--- a/table_to_html/tests/table.rs
+++ b/table_to_html/tests/table.rs
@@ -5,8 +5,6 @@ use tabled::Table;
 fn table_iter_fmt() {
     let table = HtmlTable::new([["123", "324", "zxc"], ["123", "324", "zxc"]]).to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -69,8 +67,6 @@ fn table_fmt() {
     let builder = Table::builder([["123", "324", "zxc"], ["123", "324", "zxc"]]);
     let table = HtmlTable::from(builder).to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -161,8 +157,6 @@ fn table_fmt_multiline() {
     ]);
     let table = HtmlTable::from(builder).to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -280,8 +274,6 @@ fn table_padding_cell() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
             table,
             concat!(
@@ -380,8 +372,6 @@ fn table_padding_row() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -480,8 +470,6 @@ fn table_padding_column() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -580,8 +568,6 @@ fn table_padding_global() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -680,8 +666,6 @@ fn table_alignment_left() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -777,8 +761,6 @@ fn table_span_column() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -869,8 +851,6 @@ fn table_span_row() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -962,8 +942,6 @@ fn table_span_row_and_span_col() {
 
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -1053,8 +1031,6 @@ fn table_margin() {
     table.set_margin(Margin::new(5, 4, 3, 2));
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
@@ -1152,8 +1128,6 @@ fn table_border() {
     table.set_border(10);
     let table = table.to_string();
 
-    println!("{table}");
-
     assert_eq!(
         table,
         concat!(
diff --git a/tabled/tests/pool_table.rs b/tabled/tests/pool_table.rs
index c5950fa..889f73c 100644
--- a/tabled/tests/pool_table.rs
+++ b/tabled/tests/pool_table.rs
@@ -3,6 +3,7 @@
 mod util;
 
 use tabled::{
+    grid::dimension::{DimensionPriority, PoolTableDimension},
     settings::{Alignment, Margin, Padding, Style},
     tables::{PoolTable, TableValue},
 };
@@ -154,13 +155,13 @@ test_table!(
     "┌─────┬──────┬──────┬──────┬──────┐"
     "│ 0-0 │ 2-01 │ 2-02 │ 2-03 │ 2-01 │"
     "│     ├──────┴──────┴──────┤      │"
-    "│     │ 2-01               │      │"
-    "├─────┼────────────────────┼──────┤"
-    "│ 0-1 │ 2-02               │ 2-02 │"
-    "│     ├────────────────────┼──────┤"
-    "│     │ 2-03               │ 2-03 │"
-    "├─────┼────────────────────┼──────┤"
-    "│ 0-2 │ 1-1                │ 2-1  │"
+    "│     │ 2-01               ├──────┤"
+    "├─────┼────────────────────┤ 2-02 │"
+    "│ 0-1 │ 2-02               ├──────┤"
+    "│     ├────────────────────┤ 2-03 │"
+    "│     │ 2-03               ├──────┤"
+    "├─────┼────────────────────┤ 2-1  │"
+    "│ 0-2 │ 1-1                │      │"
     "│     ├────────────────────┼──────┤"
     "│     │ 1-2                │ 2-2  │"
     "└─────┴────────────────────┴──────┘"
@@ -189,17 +190,17 @@ test_table!(
     "│ 0-0 │ 2-01 │ 2-02 │ 2-03 │ 2-   │"
     "│     │      │      │      │ 0    │"
     "│     │      │      │      │ 1    │"
-    "│     │      │      │      ├──────┤"
-    "│     │      │      │      │ 2    │"
-    "│     ├──────┴──────┴──────┤ -    │"
-    "│     │ 2-01               │ 0    │"
-    "├─────┤                    │ 2    │"
-    "│ 0-1 ├────────────────────┼──────┤"
-    "│     │ 2-02               │ 2-03 │"
-    "│     ├────────────────────┼──────┤"
-    "│     │ 2-03               │ 2-1  │"
-    "│     ├────────────────────┼──────┤"
-    "│     │ 1-1                │ 2-0  │"
+    "│     ├──────┴──────┴──────┼──────┤"
+    "│     │ 2-01               │ 2    │"
+    "│     │                    │ -    │"
+    "│     ├────────────────────┤ 0    │"
+    "├─────┤ 2-02               │ 2    │"
+    "│ 0-1 │                    ├──────┤"
+    "│     ├────────────────────┤ 2-03 │"
+    "│     │ 2-03               ├──────┤"
+    "│     ├────────────────────┤ 2-1  │"
+    "│     │ 1-1                ├──────┤"
+    "│     │                    │ 2-0  │"
     "├─────┤                    │ 1    │"
     "│ 0-2 ├──────┬──────┬──────┼──────┤"
     "│     │ 2-01 │ 2-02 │ 2-03 │ 2-02 │"
@@ -238,11 +239,11 @@ test_table!(
     },
     "┌─────────────┬─────────────┬─────────────┐"
     "│ Hello World │ Hello World │ Hello World │"
-    "├─────────────┴──┬─────────┬┴─────────────┤"
-    "│     Hello      │         │    Hello     │"
-    "├─────────┬──────┴┬───────┬┴──────┬───────┤"
-    "│    W    │   o   │   r   │   l   │   d   │"
-    "└─────────┴───────┴───────┴───────┴───────┘"
+    "├─────────────┴─┬──────────┬┴─────────────┤"
+    "│     Hello     │          │    Hello     │"
+    "├────────┬──────┴─┬───────┬┴──────┬───────┤"
+    "│   W    │   o    │   r   │   l   │   d   │"
+    "└────────┴────────┴───────┴───────┴───────┘"
 );
 
 test_table!(
@@ -458,3 +459,51 @@ test_table!(
     "│ 2-0 │ 2-1 │ 2-2 │"
     "├─────┴─────┴─────┤"
 );
+
+test_table!(
+    pool_table_dim_ctrl_0,
+    PoolTable::from(TableValue::Row(vec![
+        TableValue::Column(vec![TableValue::Cell(String::from("0-0")), TableValue::Cell(String::from("0-1")), TableValue::Cell(String::from("0-2"))]),
+        TableValue::Column(vec![TableValue::Cell(String::from("1-0")), TableValue::Cell(String::from("1-1")), TableValue::Cell(String::from("1-2"))]),
+        TableValue::Column(vec![
+            TableValue::Column(vec![TableValue::Cell(String::from("2-01")), TableValue::Cell(String::from("2-02")), TableValue::Cell(String::from("2-03"))]),
+            TableValue::Cell(String::from("2-1")),
+            TableValue::Cell(String::from("2-2")),
+        ]),
+    ]))
+    .with(PoolTableDimension::new(DimensionPriority::Last, DimensionPriority::Last)),
+    "+-----+-----+------+"
+    "| 0-0 | 1-0 | 2-01 |"
+    "+-----+-----+------+"
+    "| 0-1 | 1-1 | 2-02 |"
+    "+-----+-----+------+"
+    "| 0-2 | 1-2 | 2-03 |"
+    "|     |     +------+"
+    "|     |     | 2-1  |"
+    "|     |     +------+"
+    "|     |     | 2-2  |"
+    "+-----+-----+------+"
+);
+
+test_table!(
+    pool_table_dim_ctrl_1,
+    PoolTable::new([
+        ["1                     ", "2\n2       ", "3\n3\n3"],
+        ["3\n3\n3", "2\n2", "1"],
+        ["1", "3\n3\n3                   ", "2\n2"]
+    ])
+    .with(PoolTableDimension::new(DimensionPriority::List, DimensionPriority::List)),
+    "+------------------------+----------+---+"
+    "| 1                      | 2        | 3 |"
+    "|                        | 2        | 3 |"
+    "|                        |          | 3 |"
+    "+-------------+----------+-+--------+---+"
+    "| 3           | 2          | 1          |"
+    "| 3           | 2          |            |"
+    "| 3           |            |            |"
+    "+------+------+------------+-----+------+"
+    "| 1    | 3                       | 2    |"
+    "|      | 3                       | 2    |"
+    "|      | 3                       |      |"
+    "+------+-------------------------+------+"
+);
diff --git a/tabled/tests/width_test.rs b/tabled/tests/width_test.rs
index 627c440..bccacaf 100644
--- a/tabled/tests/width_test.rs
+++ b/tabled/tests/width_test.rs
@@ -2302,8 +2302,6 @@ fn wrap_keeping_words_0() {
         .with(Width::wrap(8).keep_words())
         .to_string();
 
-    println!("{table}");
-
     assert_eq!(
         tabled::grid::util::string::string_width_multiline(&table),
         8