We've released improvements in many areas of our products including an improved dashboard, new Text Editor components, JavaScript support for Comments & Notifications, and a number of other small additions.
We’ve made a number of improvements to our dashboard, specifically
to the rooms page. You can now search for rooms by their ID, sort them in
various ways, and check how many users are currently connected to each room.
We’ve also made it possible to delete rooms directly from the dashboard.
We’re investing more into our dashboard, and we’ll have an update with further
improvements next month.
We’ve added support for rendering Notion-like floating threads in
Text Editor. This is a difficult feature to implement from
scratch, but it’s now just a couple of lines of code with Liveblocks. We’ve
created two different components that present threads in different ways.
AnchoredThreads
displays your threads in a sidebar, positioning each alongside the text
highlight it references. Threads never overlap, always stack in the correct
order, and move next to the highlight when selected.
Anchored threads work especially well on large screens.
FloatingThreads
displays each thread below its text highlight. Floating threads automatically
flip above the highlight when they’re too close to the bottom of the screen.
Floating threads work especially well on small screens.
We generally recommend using both components in your text editor, showing
floating threads on mobile, and anchored threads on desktop. Below we’re
implementing this using Tailwind CSS, along with filtering out any resolved
threads.
We’ve added a number of new ways to use resolved threads in
Comments. Previously, resolving a thread was a custom metadata
feature, but it now has first-class support, meaning we provide hooks, methods,
and REST APIs for using it. It’s also become part of the thread object.
Deleting inbox notifications is now possible using new hooks, methods, REST
APIs, and directly in our notification components. You can see this below in our
Comments Notifications example.
Here’s how to create a button that deletes all notifications for the current
user.
Comments and Notifications are now available to
use in vanilla JavaScript. Previously, these products were only supported
through our React packages, but now a set of methods has been exposed enabling
use in regular JavaScript.
// Fetch all threadsconst{ threads }=await room.getThreads(); // Add a reaction to a commentconst reaction =await room.addReaction({ threadId:"th_xxx", commentId:"cm_xxx", emoji:"✅",}); // Fetch recent notificationsconst{ inboxNotifications }=await client.getInboxNotificationsSince({ since:newDate("2024-08-06"),});
You can use these methods in any JavaScript framework, for example Angular,
Svelte, or Vue as shown below.
Last month we made it easy to display a synchronizing/saved badge in your
application with our new
useStorageStatus
hook, which lets you know if local Storage changes have been synchronized with
our servers or not.
However, because Storage often synchronizes in less than 50ms, this often
results in a component that flickers in a distracting manner. We’ve added a new
option to smooth out changes to prevent this happening. We’re using this option
below to render a badge in our
collaborative spreadsheet example.
We’ve implemented this by passing the smooth option to the hook.