mirror of
https://github.com/penpot/penpot.git
synced 2026-09-30 07:46:16 +00:00
🐛 Show loader instead of empty state while libraries load (#11594)
The libraries dashboard rendered the "no shared libraries" placeholder while the shared files request was still in flight. On a slow connection this told the user their team had no libraries when it did. The page derived its file list eagerly, so an absent :shared-files entry in the state and a fetched-but-empty result both collapsed to an empty sequence. The grid could not tell the two apart. Keep the derived list nil until :shared-files is present. The grid already renders the pencil loader for a nil file list, so the loading and empty states now read differently. Closes #11452 AI-assisted-by: claude-opus-5 Claude-Session: https://claude.ai/code/session_01DB3Jtt1LJvp1vW9tA9DRGY Signed-off-by: Shreyash Agare <agareshreyash26@gmail.com> Co-authored-by: Shreyash Agare <agareshreyash26@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
711ec04598
commit
abb4e00746
@ -37,12 +37,15 @@
|
||||
can-edit
|
||||
(-> team :permissions :can-edit)
|
||||
|
||||
;; Keep nil until the shared files are fetched, so the grid can
|
||||
;; tell "still loading" apart from "there are no libraries".
|
||||
files
|
||||
(mf/with-memo [files team-id]
|
||||
(->> (vals files)
|
||||
(filter #(= team-id (:team-id %)))
|
||||
(sort-by :modified-at)
|
||||
(reverse)))
|
||||
(when (some? files)
|
||||
(->> (vals files)
|
||||
(filter #(= team-id (:team-id %)))
|
||||
(sort-by :modified-at)
|
||||
(reverse))))
|
||||
|
||||
selected-files
|
||||
(mf/deref ref:selected-files)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user