Skip to content

✨(frontend) Interlinking doc #904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: feature/doc-dnd
Choose a base branch
from

Conversation

AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Apr 23, 2025

Purpose

Interlinking: ability to mention a doc from another doc (Subpages).
Create connections between subpages directly within the editor.

More here: #679

Proposal

  • 🚚(frontend) reduce features coupling
  • ✨(frontend) create page from slash menu
  • ✨(frontend) interlinking custom inline content
  • ✨(frontend) create page from dropdown search
  • ✨(frontend) create editor shortcuts hook
  • exports PDF
  • export Docx // Prob -> upgrade to last version of Blocknote should solve the issue
  • e2e tests

Demo

scrnli_ILshekaeTyer4O.webm

PanchoutNathan and others added 12 commits April 23, 2025 14:07
With the soft delete feature, relying on the is_leaf method from the
treebeard is not accurate anymore. To determine if a node is a leaf, it
checks if the number of numchild is equal to 0. But a node can have soft
deleted children, then numchild is equal to 0, but it is not a leaf
because if we want to add a child we have to look for the last child to
compute a correct path. Otherwise we will have an error saying that the
path already exists.
Added several new dependencies to the `package.json` file, including
`@dnd-kit/core`, `@dnd-kit/modifiers`, `@fontsource/material-icons`, and
`@gouvfr-lasuite/ui-kit`.
Added a new feature for moving documents within the user interface via
drag-and-drop. This includes the creation of Draggable and Droppable
components, as well as tests to verify document creation and movement
behavior. Changes have also been made to document types to include user
roles and child management capabilities.
New components were created to manage subpages in the document tree,
including the ability to add, reorder, and view subpages. Tests were
added to verify the functionality of these features. Additionally, API
changes were made to manage the creation and retrieval of document
children.
- Created new files for managing subdocuments and detaching documents.
- Refactored API request configuration to use an improved configuration
type.
- Removed unnecessary logs from the ModalConfirmDownloadUnsafe
component.
The error modal since next.js 15 are quite intrusive.
We decided to hide them.
We want to have a different wording when the child
document has no title, so we can distinguish
between the two cases.
Move some components and assets to `doc-management`
to reduce coupling between features:
- SimpleDocItem from `doc-grid` to `doc-management`
- useCreateChildDoc from `doc-tree` to `doc-management`
- isOwnerOrAdmin from `doc-tree` to `doc-management`
@AntoLC AntoLC self-assigned this Apr 23, 2025
@AntoLC AntoLC linked an issue Apr 23, 2025 that may be closed by this pull request
@AntoLC AntoLC changed the base branch from main to feature/doc-dnd April 23, 2025 15:30
@AntoLC AntoLC marked this pull request as draft April 23, 2025 15:31
@AntoLC AntoLC force-pushed the feature/interlinking-doc branch 5 times, most recently from dc0988e to d8431c2 Compare April 27, 2025 20:21
AntoLC added 5 commits April 29, 2025 14:54
We are now able to create a new page from
the slash menu.
We want to be able to interlink documents in the editor.
We created a custom inline content that allows
users to interlink documents.
We are now able to create a new page from
the dropdown search.
We created the editor shortcuts hook to handle
the shortcuts for the editor.
We implemented the following shortcuts:
- "@" to open the interlinking inline content
Create interlinking link mapping for docx and pdf export.
@AntoLC AntoLC force-pushed the feature/interlinking-doc branch from d8431c2 to 87cf9dc Compare April 29, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interlinking: ability to mention a doc (Subpages Update)
2 participants