We want to animate the header floating bar with
a Lottie animation. This commit adds the Lottie
dependency and implements the animation in the
HeaderFloatingBar component.
We change the way that the left panel is displayed
in mobile and tablet views. Now, the left panel will
be over the content when mobile, and will be displayed
as a side panel when tablet. We simplify the
overall structure of the left panel, and the way
the responsive behavior is handled.
We replace the header by a floating header, to have more
space for the content and in fine to have more
harmony between the doc and the doc-grid, in mobile view
or not.
The layout have to be adapted, as well the legacy home
page.
We want to use the floating bar in multiple places, so
we need to make it more generic and reusable.
This commit refactors the floating bar component
and its related components to achieve this goal.
We need a management command to reset a Document to an initial state and
deletes everything related to it. This command can be usefull to reset a
demo for example.
The authentication backend
mozilla_django_oidc.contrib.drf.OIDCAuthentication
is present in the default authentication classes for the REST_FRAMEWORK
settings. This backend should not be used by our application and can
lead to the usage of our main api with an access_token instead of the
cookie session.
We need to override the drf SessionAuthentication backend to implement
the authenticate_header method. Without this, a 403 status code is
returned, but it is not valid. It must a be 401
We are now using the UserMenu component from
the ui-kit. It is a dropdown displaying the user's
name and email, along with a logout button and a
language picker. To fit the design of the user menu,
we adapted the LanguagePicker adn are now using the
ui-kit language picker component.
In the yprovider deployment we now need to mount the cacert containing
the certificates generated by mkcert. Then, we have to declare the
environment variable NODE_EXTRA_CA_CERTS with the path where this cacert
is mounted. With this new config we don't have tls issue anymore.
Updated the restore ability so that only directly deleted documents can
be restored. This prevents the restore action from being exposed for
child documents whose parent is deleted. This PR addresses #2127.
Owners could leave trashed documents via the leave endpoint, deleting
their `DocumentAccess` and all subtree access. When the last owner
leaves a document it creates an orphan as no owners remains in the doc.
Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
The floating waffle menu is positioned only on the bottom
left of the trigger button, so when positioned
on the bottom left, the floating menu is not visible.
This commit fixes the positioning.
We also added a patch to the ui-kit, so when
the patch is released, we can remove this patch
from the codebase.
During rolling deploys, multiple replicas serve
different builds of service-worker.js
(each build has a random buildId baked in).
This causes a controllerchange loop: the new SW
activates via skipWaiting, the page reloads, then the
next request may hit an older replica,triggering another
update and another reload — surfacing as a reload
every time the tab becomes visible.
We added a sessionStorage guard so a controllerchange
triggers at most one automatic reload per session; subsequent
flaps between versions are silently ignored, while legitimate
updates still cause a single reload automatically.
We added a sub button to create sub-documents
from the New button. This sub button is only visible
when the user is in a document, and it allows them to
create a new document that is a child of the current
document.
New create button for docs.
It is now a link button instead of a pure button,
meaning we can navigate to this new created doc
and open it in another tab by doing ctrl + click.
This new button has a dropdown menu that allows
users to import a docx file or a markdown file.
We removed the old import button.
The 0.51.4 markdown serializer no longer emits the optional link title
attribute, so the exported link is `[text](url)` without ` "title"`. The
title is still present in the HTML export. Update the expectation to match.
The "comment" mark must exist in the conversion editor schema, otherwise
y-prosemirror silently drops every commented run of text when reading the
Yjs document, turning any block holding a comment into an empty block.
Register the CommentsExtension on the conversion editor so commented text
round-trips like the other custom blocks.
Wire the docs BlockNote schema (callout, pdf, uploadLoader, interlinking
link, page break) into the conversion editor so /api/convert no longer
drops or mangles these blocks.
The tree rerenders crazily, creating performance
issues, especially on big trees. To fix it properly
we will need a big refacto, on the uikit side.
Before doing that, we try to optimize the current
code by memoizing the tree view, and by using the
selected node from the url instead of the one
from the context.
We improve the treeitem link, we can now easily
opening a new tab by doing CTRL+Click.
react-arborist's scrollTo calls react-window's scrollToItem, which mutates
the internal scrollOffset state. When navigating to a deep item in a large
tree, this causes all items above the target to be removed from the DOM
(virtualized away), making the tree appear empty above the selected node.
We no-op it to prevent that — the panel's own overflow-y handles scrolling.
Added
- ✨(backend) add limit on distinct reactions per comment #1978
- ✨(frontend) leave a document #2410
- ✨(frontend) add top parent on sub docs search #1952
- ✨(frontend) unauthenticated users can search #2407
- ✨(backend) specific user delete method to delete its relations #2437
Changed
- 👷(CI) remove test-e2e-other-browser job #2404
- ♿️(frontend) use heading element for pinned documents section title #2380
- ♿️(frontend) use anchor links for table of contents entries #2390
- ♿️(frontend) improve presenter mode screen reader and keyboard support #2383
- ♿️(frontend) link export modal name to its heading #2422
Fixed
- 🐛(frontend) overlap of block menu dropdown #2406
- ⚡️(backend) fix N+1 queries when serializing thread comments #2415
In the admin there were 2 ways to delete a user : by the actions select
box and the button on its change view. Both are leading to a failure. To
fix it, both way are removed and we implemented a custom action calling
the user.delete method with all the specific workflow we implemented.
Deleting a user is not possible when it has created docs because the
on_delete on the Document class id RESTRICT and we don't want to change
it. We decided to have a specific workflow for correctly delete a user.
The document where the user is the sole owner must be deleted, the other
only the owner access must be deleted. For the remaining Documents where
the user is the creator, we set it to `null`, then the user can be
delete, remaining relations are deleted in cascade.
In the sharing module, the user model was used instead of working with
the user id. Only the user id is used in this module, forcing in the
module calling this functions to load the user model for nothing and
doing a N+1 query.
Prevent users from adding more reactions once the per-message
limit has been exceeded. It Disables reaction buttons
when limit is reached
Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
Implement a configurable limit (default: 15) on the number of distinct
emoji reactions per comment.
- Backend validation ensures the limit cannot be exceeded via API
Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
When we were visiting a public document, it was part of
our list of documents, and we couldn't leave it.
Now, we can leave a public document, and it will
be removed from our list of documents.
We coupled it with remove access to a document if
you had access to it, and you can also leave a
document without having to pass through the share
modal, which is a better user experience.
Retrieving a thread serialized its nested comments, reactions and
reaction users without prefetching, issuing one query per comment for
its author and reactions and one query per reaction for its users.
Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
In the search modal, under the sub docs,
we now display the top parent of the doc, to give
more context to the user about the doc they are
looking for.
We refactorize the filters to get more flexibility
and avoid too much props drilling.
In the search endpoint, we were returning all the parents for a document
mathing the search. We want instead to return only the top parent the
user has access to.