When docs is ran using an ASGI server, the django StreamingHttpResponse
expect to consume an async generator. If a sync generator is used, it
fully consumes it and then return all the content and we loose the
benefits of using a StreamingHttpResponse.
The app expect threads to always have
comments, but in some cases threads can end up without
comments, which causes crashes. This PR adds a
check to delete orphaned threads without comments
to avoid this issue.
When all the tests are ran, there is a PytestWarning log present to warn
us that there is remaining database connection open and can not be
closed. It appears that the tests about concurrence are responsible of
leaving connection open. We need to manually close them in these tests.
Added:
- ✨(backend) support creating subdoc from file
- ✨(frontend) comment side panel
- ✨(buildpack) add PaaS deployment support, tested with Scalingo
- 🔧(backend) allow configuring settings
OIDC_OP_USER_ENDPOINT_FORMAT
- ⚡️(helm) create a dedicated svc and deployment for
yprovider converter
- ✨(backend) allow to leave a document
- ✨(frontend) add the presenter mode
- 📈(backend) create a utils to capture event with posthog
- 🔧(backend) new setting DOCUMENT_ALL_ENDPOINT_ENABLED
Changed:
- ♻️(backend) allow global search in sub documents
- ✨(backend) add a breadcrumb in the search response
- ♻️(frontend) move doc action buttons to fix toolbar
- ♿️(frontend) add aria-hidden to decorative avatar SVGs
in share modal
- 🏗️(frontend) move comments to its own folder feature
Fixed:
- 🐛(docs) run migration 0027 without superuser role
- 🐛(backend) prevent admins/owners from overwriting other
users comments
- 🐛(y-provider) return empty output when converting empty
Yjs document
- 🐛(backend) use computed_link_reach in
handle_onboarding_document
- 🐛(frontend) fix toolbar blocknote hidden
- 🐛(frontend) fix application crashes when using
GTranslate and zoom
- 🐛(frontend) fix emoji pdf not matching
- 🐛(backend) fix UnorderedObjectListWarning for
DocumentAskForAccess viewset
In the tests there is a UnorderedObjectListWarning, we also find this same
warning in the logs in production. This warning appears because the
queryset used by the DocumentAskForAccess paginator is not ordered and
can lead to inconsistent result. Ordering the queryset fix this warning.
We want to allow or not the usage of the /documents/all/ endpoint. It has
been created to be used for an other purpose than the js client. For
those who don't use it this new settings allow to disable it. By default
it is set to True to keep the same behavior.
Add a Playwright spec that opens the presenter overlay from the
doc options menu, walks through a multi-slide document built with
dividers, and verifies that Escape closes the overlay.
Cover the three hooks that drive the presenter overlay:
useSlides for divider-based block segmentation,
useBrowserFullscreen for the Fullscreen API wrapper,
and usePresenterShortcuts for the keyboard navigation bindings.
Add a presenter overlay that turns the current document into a
slide deck. The editor's blocks are snapshot at open time and
split into slides on each divider; navigation is driven by
keyboard shortcuts and a floating bar with browser fullscreen
support. The overlay is wired to the doc header toolbox via a
new "Present" entry, lazy-loaded to keep the editor bundle lean.
cunningham-react 4.3.0 splits Modal props per variant. Switch
AlertModal and SideModal from the now-removed ModalProps alias to
the more precise ModalDefaultVariantProps type so the modal
wrappers keep type-checking against the new API.
We bumped the Blocknote editor to version 0.51.4,
which includes several bug fixes and improvements,
particularly 1 bug fix about emoji on the side bar.
The feature "doc-editor" start to be quiete big,
and the comments related code is quite a lot.
We move all the comments related code to a new
folder "doc-comments" to make the code more
organized and easier to maintain.
The header could hide the formatting bar of the
blocknote editor. This commit improve the z-index
of the header to ensure that the formatting bar
is always visible.
Error boundary page is used when an error occurs
in the application, this page can have states still
set, causing side effects depend the component that
throw the error. In this case, the left panel is
still loaded and try to load the tree, but the
provider is not set, causing a crash error inside
the error boundary page.
We don't need the left panel in the error boundary
page, so we can just not load it to avoid this issue.
The emoji algorithm to find the emoji was not totally
correct, it could choose a bad family of emojis.
The first part of the emoji "code" is
what should be used first to find the "family" of the
emoji, we can then try to find the exact match in
that specific family.
When an AI action is called from ai_translate, ai_transform and
ai_proxy, an event doc_ai_action is captured with a method property
giving the information from where it is called.
The posthog information were only available using the POSTHOG_KEY
settings. We split it in POSTHOG_KEY and POSTHOG_HOST to use them with
the pyhton posthog sdk
We want to allow users to leave a document where they have an access or
they have visited creating a link_trace. All subdocuments should also be
leaved at the same time.
To know if the user can leave a doc we have to check when computing the
abilities if a record is existing in the LinkTrace table. This is a N+1
query situation. To avoid it, we added an annotation in the
DocumentQueryset like we already do to annotate the user role.
There is one edge case where the annotation is made to soon, it is when the
user is visiting a document for the first time, the `get_object` add the
annotation and in the permission, we compute the abilities. The `leave`
property is False because the entry in the LinkTrace table is not made,
when the serializer ask for the abilities again, it is still False. So
in the `retrieve` method in the viewset we force the
`user_has_link_trace` to the correct value.
The mask feature has never been implemented by the frontend application
and it is not what we want to do. We want to implement a feature to
leave a document.
Add wrapper to catch focus.
Benefit:
- The tooltip will show exactly in the middle of
the title input text
- When the user is click on the right side of the
doc title, the title get the focus and the cursor,
which is the expected behavior when editing a title.
We are modifying the doc header, we are moving elements
to a floating bar. In this case, we are moving the
doc toolbox to the floating bar.
We adapted the toolbox with the updated actions.
We update the doc header to use all empty space.
We moved the emoji part from the toolbox directly
to the header.
We remove the AlertPublic component and replace it
with a new visibility status in the DocHeaderInfo
component. This change simplifies the user interface
by providing a more direct indication of the
document's visibility status, whether it's public
or internal, without needing an additional alert
component.
We could still have 400 error when importing
".markdown", because the backend only accepts ".md"
for markdown files. We added another guard on
the extensions to prevent this error and make sure
the user send acceptable formats.
Replace ContentTypes enum with a structured object mapping MIME types
to their file extensions, removing the manual switch-case in useImport
Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
The convert handler returned 500 "No valid blocks were generated" whenever
the reader produced an empty blocks array, which is the normal state of a
freshly-created Yjs document. Treat empty input as a valid case and return
200 with an empty body for every supported output format.
Signed-off-by: Sylvain Zimmer <sylvain@sylvainzimmer.com>