Skip to content

feat: show each file's folder in the Office overview - #220

Open
thiagoneritorqueti wants to merge 1 commit into
nextcloud:mainfrom
thiagoneritorqueti:feat/overview-folder
Open

thiagoneritorqueti wants to merge 1 commit into
nextcloud:mainfrom
thiagoneritorqueti:feat/overview-folder

Conversation

@thiagoneritorqueti

Copy link
Copy Markdown

Summary

In the Office overview, "Recent" shows only the file name and the modification date. Two files with the same name in different folders (every supermarket has a dozen Pedido.xlsx) look identical, and the only way to tell them apart is to open each one.

This appends the file's folder to the date, in both the grid and the list view:

fevereiro de 2025 · /Obras/Materiais

A file at the root shows /.

How

  • OfficeOverview.vue: a small folderLabel(file) helper reads Node.dirname (already in the search result — nothing new is fetched) and both #subname slots render it after NcDateTime.
  • fixtures.ts: makeNode gains an optional dirname (defaults to the root, so existing callers are unchanged).
  • OfficeOverview.spec.ts: two cases, grid and list, pinning that the folder is rendered and that a root file shows /.

Reuse before you write

Option 4 (existing pattern in src/): the folder is read from the @nextcloud/files Node the overview already holds, and rendered through the existing #subname slot next to NcDateTime. No new component or dependency.

Notes for review

  • js/ and css/ are not included — /compile is still needed.
  • The folder is shown as a plain path rather than breadcrumbs to keep the subname on one line; happy to switch to a ·-separated last-folder-only form if the full path is too long for the card.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MhzEzra157kFTkV9ukxmRa

The "Recent" grid and list render only the file name and its modification
date, so two files with the same name in different folders — a common case
for anything named "Budget" or "Report" — look identical and the user has
to open each one to tell them apart.

Append the file's folder to the date in both views: "January 2024 · /Projects/2024",
or "/" for a file at the root. The folder comes from the Node's dirname, which
the search already returns; nothing new is fetched.

The makeNode fixture gains an optional dirname so a spec can place a file in a
subfolder; it defaults to the root, so existing callers are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhzEzra157kFTkV9ukxmRa
Signed-off-by: Thiago Neri Torqueti <thiago.torqueti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant