feat: add recently viewed activity dashboard widget#16837
Open
GermanJablo wants to merge 1 commit into
Open
Conversation
Introduces an "activity" dashboard widget that lists the documents the current user has recently viewed in the admin, most recent first. - Adds a per-user `recently-viewed` preference (identity + timestamp only) recorded server-side in renderDocument when a collection document opens. - The widget computes display fields (title, type pill / thumbnail, absolute timestamp) at render time under access control, so deleted or now-forbidden documents drop out automatically. - Collection filtering uses an `excludedCollections` exclusion list, so new collections appear by default. - Adds i18n keys + translations, registers the widget, and covers it with a unit test for the merge/dedup/cap helper and an e2e test. Deferred to follow-ups: per-row remove (X) and a "recently edited" tab.
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on top of #16812.
Adds an
activitydashboard widget that lists the documents the current user has recently viewed in the admin, most recent first.recently-viewedpreference storing only identity + timestamp (collectionSlug,id,viewedAt), recorded server-side inrenderDocumentwhen a collection document is opened (full-page and drawer). The write is wrapped in try/catch + logger so it can never break a document view.useAsTitle, a collection type pill or an upload thumbnail, and an absolute localized timestamp) at render time, querying each collection under access control (overrideAccess: false). Deleted or now-forbidden documents drop out of the list automatically.excludedCollectionsexclusion list (widget field): empty by default, so newly added collections show up automatically.en.ts+clientKeys.tsand translated across all locales.Test plan
recentlyViewed.spec.ts).Deferred to follow-ups
Known limitations