Skip to content

Duplicating - Replace "Copy of" #2850

Closed
Closed

Description

@virgile-dev

Duplicating a doc with sub-docs: titles and icons are not preserved

Follow-up to #2584 (duplicate with sub-docs).

Problem

User feedback after duplicating a doc together with its sub-docs:

  1. Every copied doc is renamed. "Copy of" is added to the title of every doc in the copied tree, so users have to rename each sub-doc by hand. Untitled docs end up named just "Copy of".
  2. Icons stop working. A doc's icon is the emoji at the start of its title. Adding "Copy of" in front pushes the emoji out of first place, so it shows as plain text instead of the doc icon.

Users are left with a lot of manual work to get back an exact copy of the doc and its sub-docs.

Proposal

  • Only the top duplicated doc is marked as a copy. Sub-docs keep their titles exactly as they were, icons included, it avoids manual work
  • Mark the copy at the end of the title: Roadmap (copy) instead of Copy of Roadmap to avoid removing the emoji
  • If the duplicated doc has no title, name the copy "Untitled document (copy)".

This behaviour should apply also when a document is copied alone.

Duplicating a doc with sub-docs

Original Copy
Handbook Handbook (copy)
└ 🚀 Onboarding └ 🚀 Onboarding
└ (untitled) └ (untitled)

Duplicating a single doc

Original Copy
Roadmap Roadmap (copy)
🚀 Roadmap 🚀 Roadmap (copy)
(untitled) Untitled document (copy)

Longer term

Storing the icon inside the title makes it fragile anywhere titles are changed or reused (duplication, export, search, mentions). A dedicated icon field on the document would avoid this kind of bug as it is stated here #1786

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendgood first issue

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions