Skip to content

Views and caching

Multiple views and data flow

The Posts list is not just a table. The view switcher in the header lets you pick how content renders. All views share the same data, filters, and stats. Only the presentation changes.

Available views

  • Table (default): the full data grid, with sorting, filtering, column management, inline editing, and row actions. Most feature-complete view.

  • Calendar: posts laid out by date on a calendar, good for spotting publishing gaps and planning.

  • Kanban: posts as cards in status columns (e.g. Draft → Published), good for editorial flow.

  • Card: a compact card layout.

Your choice is remembered per post type, and you can set a view as default when prompted. Views can also be linked directly via URL.

Which view to use

  • Use Table for sorting, filtering, inline editing, and quick actions (duplicate, delete, Edit with).

  • Use Calendar or Kanban when you prefer a date-based or status-based layout; not all grid actions are available in every view.

Choose the view that fits the task (spreadsheet-style vs timeline vs boards).

Caching, refresh, and data flow

Posts cache (usePostsCache)

  • The Posts list uses a client-side cache (e.g. usePostsCache) keyed by post type and status (and optionally filters). Fetched pages are stored with a TTL (e.g. 5 minutes) and a max entries (e.g. 20) so repeated visits or filter changes can be served from cache.

  • On delete: The post is removed from cache so the list updates without refetch. On update (inline or duplicate): The post is updated or added in cache. On explicit refresh: Cache can be invalidated and data refetched.

  • This reduces API calls and makes the list feel instant when switching status or returning to the page.

Refresh button

  • Refresh invalidates the relevant cache and refetches posts (and optionally stats and metadata). It shows loading/success/error and can offer retry. After approval or edits elsewhere, refresh keeps the list in sync.

Events

  • The page can listen for custom events (e.g. fleekdash:refresh-posts-grid) with a postType in the payload. If the type matches the current one, it triggers a refresh. So other parts of the app (e.g. AI-created post) can ask the grid to reload.

Inline updates and dashboard

  • When you change status, author, or date inline, the API is called and then onPostUpdated is run. The grid and cache update; optionally, a dashboard refresh event is fired so the dashboard KPIs and pending widget stay correct.

Fast list and fewer redundant requests, with explicit refresh when you want the latest data.

Shortcuts

When a calendar view is focused and you are not typing in a field:

KeyAction
N
Next period (day / week / month depending on view)
P
Previous period
T
Jump to today