From 3be9dde92d64ec540a9097f369d64580fae75fa0 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 28 Feb 2025 17:14:02 -0600 Subject: New reporting flow (#7832) * Add option to align web dialogs to top * Add new wait util * Pipe through feed view to feed components * Reset unneeded change to main * Copy over fresh report dialog based on old * Hack in temp testing data * Swap in new dialog in all cases but chat * Cleanup * Add load and initial error state * Fill in states * Add copyright link * Handle single labeler case * Comment out debug code * Improve centering of type in circles * Open details if Other is selected * Remove debug code * Tweak colors * Bump SDK * Tweak Admonition for better x-platform styles * Add retry button * Add close button * Remove todo not covered in this PR * Translate Retry --- src/lib/async/wait.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/lib/async/wait.ts (limited to 'src/lib/async/wait.ts') diff --git a/src/lib/async/wait.ts b/src/lib/async/wait.ts new file mode 100644 index 000000000..ca37ac19c --- /dev/null +++ b/src/lib/async/wait.ts @@ -0,0 +1,5 @@ +export async function wait(delay: number, fn: T): Promise> { + return await Promise.all([fn, new Promise(y => setTimeout(y, delay))]).then( + arr => arr[0], + ) +} -- cgit 1.4.1