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 26 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

AntoLC and others added 21 commits April 13, 2025 13:25
Add a homepage feature flag that we will
propagate to the frontend.
It will be used to enable or disable the
homepage at runtime.
If the homepage feature flag is enabled,
the homepage will be displayed.
The homepage is now accessible at the /home URL.
Before the homepage was accessible on the /login URL.
We still keep the /login URL for backward compatibility.
This should work in both cases:
- search for "vélo" when the document title contains "velo"
- search for "velo" when the document title contains "vélo"
Refacto useCunninghamTheme, we don't need a function
to have access to the tokens anymore.
We will serve the config from the cache if available
in waiting for the config to be loaded.
It will remove the loading time for the config except
when the config is not available in the cache.
When 2 docs are created almost at the same time,
the second one will fail because the first one.
We get a unicity error on the path key already
used ("impress_document_path_key").
To fix this issue, we will lock the table the
time to create the document, the next query will
wait for the lock to be released.
Info message so people fulfill their licencing obligations

Signed-off-by: virgile-deville <[email protected]>
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 3 times, most recently from 1b87c8e to f949b2d Compare April 25, 2025 15:30
@AntoLC AntoLC force-pushed the feature/interlinking-doc branch 2 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)
4 participants