-
Notifications
You must be signed in to change notification settings - Fork 299
feat: allow sending messages with pending uploads #3277
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
Changes from 1 commit
d58c37c
1ba3e1f
14f6009
bb62738
826f59d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||||||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||||||||||
| * `DraggableDialog` applies the drag offset as a `transform` on its inner shell, so the | ||||||||||||||||||||||||||||||||||
| * `DialogAnchor` element keeps the layout box it was first positioned into — anchored to the | ||||||||||||||||||||||||||||||||||
| * button that opened it — while the panel is painted somewhere else entirely. | ||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||
| * The SDK gives `.str-chat__dialog-contents` `pointer-events: auto`, so that stale invisible | ||||||||||||||||||||||||||||||||||
| * box swallows clicks meant for the app underneath: you drag a panel aside and the region it | ||||||||||||||||||||||||||||||||||
| * *used* to occupy stays dead. Only the visible shell may capture. | ||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||
| * These rules live in the `stream-app-overrides` layer, which wins over the SDK's rule | ||||||||||||||||||||||||||||||||||
| * regardless of specificity. | ||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||
| .app__draggable-dialog { | ||||||||||||||||||||||||||||||||||
| pointer-events: none; | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| .app__draggable-dialog__shell { | ||||||||||||||||||||||||||||||||||
| pointer-events: auto; | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+13
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Place the pointer-event override in a CSS layer. This file emits unlayered rules, although the override is intended to use Wrap these rules in the repository’s consumer override layer and ensure that layer is ordered after the Stream styles. Proposed fix+@layer stream-app-overrides {
.app__draggable-dialog {
pointer-events: none;
}
.app__draggable-dialog__shell {
pointer-events: auto;
}
+}As per coding guidelines: 📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { useDialog, useNearestDialogManagerContext } from 'stream-chat-react'; | ||
|
|
||
| /** | ||
| * Registers a dialog that must not close when the user clicks elsewhere in the app. | ||
| * | ||
| * **Every call site touching the same dialog id has to use this hook.** | ||
| * `DialogManager.getOrCreate` applies `closeOnClickOutside` only when it *creates* the dialog, | ||
| * and these dialogs are resolved twice — once by whatever opens them (the Actions menu, a | ||
| * message action) and once by the dialog component itself. Whichever runs first wins, so if one | ||
| * of them registered without the override the other's would be silently ignored. | ||
| * | ||
| * `useDialogOnNearestManager` cannot be used for this: it accepts only `id`. | ||
| */ | ||
| export const usePersistentDialog = (id: string) => { | ||
| const { dialogManager } = useNearestDialogManagerContext() ?? {}; | ||
| const dialog = useDialog({ | ||
| closeOnClickOutside: false, | ||
| dialogManagerId: dialogManager?.id, | ||
| id, | ||
| }); | ||
|
|
||
| return { dialog, dialogManager }; | ||
| }; |
Uh oh!
There was an error while loading. Please reload this page.