-
Notifications
You must be signed in to change notification settings - Fork 45
Feature/pub 1765 annotations examples #2636
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
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7f3370d
to
f7a321a
Compare
export const channelName = urlParams.get('name') || 'mutable:pub-sub-message-annotations'; | ||
export const annotationNamespace = 'my-annotations'; | ||
export const annotationNamespace = 'annotation'; | ||
export const channelName = urlParams.get('name') || `${annotationNamespace}:pub-sub-message-annotations`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GregHolmes your commit message doesn't explain why you made this change, but I strongly disagree with it: I think using the same "annotationNamespace" config variable for two unrelated purposes (the first part of the channel name, and the user-settable part of the annotation type) is very confusing for the user, who might be misled into thinking those have to match.
f7a321a
to
1e59237
Compare
Added two commits:
|
1e59237
to
d81077d
Compare
aa69133
to
8a26e17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some minor fixes to the copy and list numbering.
Tested and all LGTM.
Uses a double-pane view to show the example side by side for two different clients.
Shown in an expandable pane when the message is clicked.
Publish an annotation, specifying the annotation type. Summaries are received as a message in the subscribe listener.
Listens for annotation summaries received in realtime and renders their information for each summary type in a set of expandable summary components in the message details.
Separates the annotations summary from the raw annotations messages displayed in separate tabs.
Adds a delete button to raw annotations to publish a delete annotation which removes the annotation from the summary. Refactors the raw annotation view to display in a more compact format.
Various improvements to the components and styling to create a more compact visual style.
Adds the franken-ui dependency to the examples renderer. Updates the set of visible files configured for sandpack.
- stop using type assertions for custom MessageSummary and CreateMessage types - switch to more natural way of checking that there's a serial
Add a section to the readme about setting up a channel rule Refactor to make the annotation namespace not an app-wide config var (which is somewhat misleading -- there's no reason it should be the same throughout an app, and indeed making it so defeats the point of having it)
8a26e17
to
f0097ff
Compare
Description
Adds an example app for the new message annotations feature. Showcases:
I recorded a quick Loom to walk through this example: https://www.loom.com/share/e8e37e37d7c04999b82493142b445336?sid=25392ef5-5d8e-4225-8bea-1e2f08fb31f4
I intend to update the docs before landing this PR, but opening now for draft review.
This examples requires us to configure a namespace (channel rule) with the
mutableMessages
flag enabled. We need to identify how we can do this when used from the examples.This also needs an image to include on the examples index.
Checklist