Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
## 2.29.4 (Unreleased)

#### Added
- `popover`: full `:parts` & `:theme` support for all five popover components (`popover-title`, `popover-border`, `popover-content-wrapper`, `popover-anchor-wrapper`, `popover-tooltip`). Closes the gap called out in the 2.29.0 changelog ("Full `:parts` & `:theme` support for most components (excluding `popover`, `v-table` and `simple-v-table`)"). The classic look is preserved verbatim — every legacy CSS class (`rc-popover-border`, `popover`, `rc-popover-title`, `rc-popover-arrow`, `rc-popover-content`, `rc-popover-anchor-wrapper`, `rc-point-wrapper`, `rc-popover-point`, `rc-popover-tooltip`, etc.) is still applied via `bootstrap` theme methods. Form-3 lifecycle behaviour (refs, `:component-did-mount`, `:component-did-update`, position-optimization atoms) is unchanged; `theme/comp` is composed once at mount time per component instance.
- `simple-v-table`: `:resizable-columns?` adds opt-in column-width resizing — drag a grip on each column's right edge. Off by default (existing tables unaffected). Per-column `:resizable? false` opts out and `:min-width` sets a floor; optional `:on-resize` callback. Adds the `:simple-column-header-resize-handle` part.
- `popover`: full `:parts` & `:theme` support for all five popover components (`popover-title`, `popover-border`, `popover-content-wrapper`, `popover-anchor-wrapper`, `popover-tooltip`).

#### Changed
- `popover-content-wrapper`: renamed the `:parts` key `:title` → `:title-bar` (disambiguates it from the `:title` text arg). **Breaking** for code styling the title via `:parts {:title ...}` — use `:parts {:title-bar ...}`.

#### Fixed
- `popover-anchor-wrapper`: `:popover` argument using positional-args calling style `[popover-fn arg1 arg2 ...]` no longer breaks `:showing-injected?`/`:position-injected` injection. Previously the non-keyword branch wrapped the call as a single map, causing the receiving fn's `[a b & {:keys [...]}]` destructure to bind `a` to the entire map and produce nil kwargs — visible as a 💥 in the "Complex Popover (dialog box)" demo. Map-style invocation `[popover-fn {props}]` continues to work. [#367](https://github.com/day8/re-com/issues/367)
- `re-com.debug`: validation logger now reports `:validate-fn-return` problems with the validator's actual error message instead of an unhelpful "Unknown problem reported". This affected any validator built on `validate-arg-against-set` (e.g. `position?`, `justify-style?`, `alert-type?`) when a value didn't match the expected set — the error string was being computed but never shown. [#368](https://github.com/day8/re-com/issues/368)
- `typeahead`: async `:data-source` is no longer racey. When multiple data-source callbacks were in flight, whichever resolved last won — so a slow response for an older query could overwrite a fresh one (e.g. typing `g`, `go`, `goo` slowly enough that the `g` callback returned last left the suggestions showing matches for `g` while the input still read `goo`). Each search now carries a monotonically-increasing id; stale callbacks become no-ops. [#361](https://github.com/day8/re-com/issues/361)
- `popover`: positional-args `:popover` calling style no longer breaks the auto-injected `:showing-injected?`/`:position-injected` args. [#367](https://github.com/day8/re-com/issues/367)
- `re-com.debug`: set-based validation errors (`position?`, `alert-type?`, etc.) now report the real message instead of "Unknown problem reported". [#368](https://github.com/day8/re-com/issues/368)
- `typeahead`: async `:data-source` no longer races — a slow response for an older query can't overwrite a newer one. [#361](https://github.com/day8/re-com/issues/361)

## 2.29.3 (2026-04-29)

Expand Down
2 changes: 1 addition & 1 deletion demo/re_demo/simple_v_table.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
[:li "Unlimited (virtualised) rows with an (optional) fixed row header at the left by simply specifying the number of columns to fix"]
[:li "Click on a column header to sort the rows in a column"]
[:li "Shift-click on a column header to sort multiple columns hierarchically."]
[:li "Opt in to column-width resizing with " [:code ":resizable-columns? true"] ". A draggable grip appears on each column's right edge. Off by default; per-column opt-out via " [:code ":resizable? false"] "."]
[:li "Most aspects of the table are stylable using the " [:code ":parts"] " argument that can set " [:code ":class"] " or " [:code ":style"] " attributes"]
[:li "Individual rows can be dynamically styled based on row data"]
[:li "Individual cells can be dynamically styled based on row data"]
[:li "Alt+Click on a row in the table to see the data object for that row in DevTools (works best in dev mode with cljs-devtools)"]]
[title3 "Not Implemented"]
[p "The following features common to other table widgets are not implemented. After all, this is 'simple' v-table."]
[:ul
[:li "Resizable columns; e.g. drag to resize columns"]
[:li "Re-orderable columns; e.g. drag to re-order columns"]
[:li "Hide/show columns"]
[:li "Selection of rows, columns and cells (as supported by v-table)"]
Expand Down
13 changes: 13 additions & 0 deletions demo/re_demo/simple_v_table_sales.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
fixed-column-count? (reagent/atom true)
fixed-column-count (reagent/atom 1)
striped? (reagent/atom false)
resizable-columns? (reagent/atom false)
parent-color "#BEEDFF"
parent-width? (reagent/atom false)
parent-width (reagent/atom 600)
Expand Down Expand Up @@ -197,6 +198,17 @@
[label
:src (at)
:label [:code ":striped?"]]]]
[h-box
:src (at)
:gap spacing7
:align :center
:children [[checkbox
:src (at)
:model resizable-columns?
:on-change #(reset! resizable-columns? %)]
[label
:src (at)
:label [:code ":resizable-columns?"]]]]
[gap
:src (at)
:size "0px"]
Expand Down Expand Up @@ -345,6 +357,7 @@

;; ===== Styling
:striped? @striped?
:resizable-columns? @resizable-columns?
:cell-style (fn [{:keys [sales] :as row} {:keys [id] :as column}]
(when (= :sales id)
{:background-color (cond
Expand Down
32 changes: 18 additions & 14 deletions src/re_com/popover.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,7 @@
:popover-color popover-color}}]
(part ::pb/wrapper
{:theme theme
:post-props (-> args
(select-keys [:class :style :attr])
(assoc-in [:attr :id] pop-id)
:post-props (-> {}
(tu/style (if @rendered-once
(when pop-id (calc-popover-pos orientation @p-width @p-height @pop-offset arrow-length arrow-gap))
{:top "-10000px" :left "-10000px"}))
Expand All @@ -351,6 +349,10 @@
:opacity (if @ready-to-show? "1" "0")
:max-width "none"
:padding "0px"})
(cond-> (:class args) (tu/class (:class args))
(:style args) (tu/style (:style args))
(:attr args) (update :attr merge (:attr args)))
(assoc-in [:attr :id] pop-id)
(debug/instrument args)
(assoc-in [:attr :ref] ref!))
:props {:re-com re-com
Expand Down Expand Up @@ -489,11 +491,13 @@
:showing? (deref-or-value showing-injected?)}}]
(part ::pcw/wrapper
{:theme theme
:post-props (-> args
(select-keys [:class :style :attr])
:post-props (-> {}
(cond-> no-clip? (tu/style {:position "fixed"
:left (px @left-offset)
:top (px @top-offset)}))
(cond-> (:class args) (tu/class (:class args))
(:style args) (tu/style (:style args))
(:attr args) (update :attr merge (:attr args)))
(debug/instrument args)
(assoc-in [:attr :ref] ref!))
:props {:re-com re-com
Expand Down Expand Up @@ -735,17 +739,17 @@
(part ::ptip/v-box
{:impl v-box
:theme theme
:post-props {:src (at)
:style (if (= status :info)
{:color "white"
:font-size "14px"
:padding "4px"}
{:color "white"
:font-size "12px"
:font-weight "bold"
:text-align "center"})}
:post-props {:src (at)}
:props
{:re-com re-com
:style (if (= status :info)
{:color "white"
:font-size "14px"
:padding "4px"}
{:color "white"
:font-size "12px"
:font-weight "bold"
:text-align "center"})
:children
[(when close-button?
(part ::ptip/close-button-container
Expand Down
Loading
Loading