Skip to content

Commit

Permalink
- added partial support for dataset print options as kindly options
Browse files Browse the repository at this point in the history
  • Loading branch information
daslu committed May 24, 2024
1 parent 0d40d12 commit fc439af
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).

## [2-beta10] - unreleased
- add classes to elements that have styling applied to faciliate custom styles (#102)

- added classes to elements that have styling applied to faciliate custom styles (#102)
- added partial support for dataset print options as kindly options

## [2-beta9] - 2024-05-18
- extended the `kind/fn` semantics to a map spec
Expand Down
22 changes: 15 additions & 7 deletions src/scicloj/clay/v2/item.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
[scicloj.clay.v2.util.meta :as meta]
[hiccup.page]
[hiccup.core :as hiccup]
[clojure.string :as str]))
[clojure.string :as str]
[scicloj.kindly.v4.api :as kindly]))

(def *id (atom 0))

Expand Down Expand Up @@ -325,9 +326,16 @@
:deps [:highcharts]})

(defn dataset [{:as context
:keys [value]}]
(-> value
println
with-out-str
md
(merge {:item-class "clay-dataset"})))
:keys [value kindly/options]}]
(let [{:keys [dataset/default-table-row-print-length]} options
printed-string (if default-table-row-print-length
(binding [tech.v3.dataset.print/*default-table-row-print-length* default-table-row-print-length]
(-> value
println
with-out-str))
(-> value
println
with-out-str))]
(-> printed-string
md
(merge {:item-class "clay-dataset"}))))

0 comments on commit fc439af

Please sign in to comment.