Skip to content
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

[pull] main from cloudflare:main #17

Merged
merged 33 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3a69b25
Update semgrep.yml
hrushikeshdeshpande Sep 25, 2024
55103d0
Add separate wrangler.toml files for different envs
third774 Sep 27, 2024
c7d3e9e
Merge pull request #122 from cloudflare/bring-deployments-into-main
third774 Sep 27, 2024
946b881
Fix DO bindings and upgrade wrangler
third774 Sep 27, 2024
2e616ed
Merge pull request #123 from cloudflare/fix-DO-bindings
third774 Sep 27, 2024
1d46b1f
Merge pull request #120 from cloudflare/hrushikeshdeshpande-updating-…
third774 Sep 27, 2024
d756355
Count meetings and associate feedback
third774 Sep 20, 2024
12701e5
Enable logging
third774 Sep 28, 2024
d2b2ac2
Add copy meeting id button in debug mode
third774 Sep 30, 2024
1afe004
Merge pull request #118 from cloudflare/count-meetings-and-associate-…
third774 Sep 30, 2024
b6ed0c8
Split error logging from details
third774 Sep 30, 2024
f3744cc
Add websocket info to cleanup log
third774 Sep 30, 2024
b8f62d3
Merge pull request #124 from cloudflare/split-error-logging-from-details
third774 Oct 2, 2024
dc20ed7
Fix toml files for staging & prod
third774 Oct 2, 2024
787a098
Merge pull request #125 from cloudflare/Fix-wrangler.toml-files-for-s…
third774 Oct 2, 2024
389d998
Send correlation id
third774 Oct 3, 2024
036b9d6
Merge pull request #126 from cloudflare/send-correlation-id
third774 Oct 4, 2024
ea5c893
Add logging for onClose
third774 Oct 4, 2024
78c8447
Merge pull request #127 from cloudflare/log-onclose-events
third774 Oct 4, 2024
8193622
Bump node compat date
third774 Oct 7, 2024
de99d54
Disable hibernation
third774 Oct 7, 2024
86b3a30
Merge pull request #130 from cloudflare/disable-hibernation
third774 Oct 7, 2024
d953f06
Merge pull request #129 from cloudflare/Bump-node-compat-date
third774 Oct 7, 2024
f19fad4
added check for CF Calls Anycast address
Oct 8, 2024
20f0e1e
use alert for now
Oct 9, 2024
1b2d7fa
addressed linter errors
Oct 9, 2024
3ea7d8f
added boolean for alert
Oct 9, 2024
c82ea74
only raise the alarm in production env
Oct 9, 2024
222a7c6
Merge pull request #131 from nils-ohlmeier/anycast_warning
third774 Oct 9, 2024
f66d932
Disable hibernation properly
third774 Oct 17, 2024
d40dba2
Merge pull request #134 from cloudflare/disable-hibernation-properly
third774 Oct 21, 2024
630ea66
Restructure connection checks to look for heartbeat timestamps
third774 Oct 24, 2024
79fcf2f
Merge pull request #135 from cloudflare/restructure-connection-checks
third774 Oct 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request: {}
workflow_dispatch: {}
push:
push:
branches:
- main
- master
Expand All @@ -18,7 +18,7 @@ jobs:
SEMGREP_APP_URL: https://cloudflare.semgrep.dev
SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version
container:
image: returntocorp/semgrep
image: semgrep/semgrep
steps:
- uses: actions/checkout@v4
- run: semgrep ci
62 changes: 39 additions & 23 deletions app/components/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,58 @@
import { VisuallyHidden } from '@radix-ui/react-visually-hidden'
import type { FC } from 'react'
import { useState } from 'react'
import {
type ComponentProps,
type ElementRef,
forwardRef,
type ReactNode,
useState,
} from 'react'
import { useTimeoutFn } from 'react-use'
import { useRoomUrl } from '~/hooks/useRoomUrl'
import { Button } from './Button'
import { Icon } from './Icon/Icon'
import { Tooltip } from './Tooltip'

interface CopyButtonProps {}

export const CopyButton: FC<CopyButtonProps> = () => {
const [copied, setCopied] = useState(false)
interface CopyButtonProps extends ComponentProps<'button'> {
contentValue: string
copiedMessage?: ReactNode
}

const roomUrl = useRoomUrl()
export const CopyButton = forwardRef<ElementRef<'button'>, CopyButtonProps>(
(
{
children = <VisuallyHidden>Copy</VisuallyHidden>,
copiedMessage = <VisuallyHidden>Copied!</VisuallyHidden>,
contentValue,
onClick,
...rest
},
ref
) => {
const [copied, setCopied] = useState(false)

const [_isReady, _cancel, reset] = useTimeoutFn(() => {
setCopied(false)
}, 2000)
const [_isReady, _cancel, reset] = useTimeoutFn(() => {
setCopied(false)
}, 2000)

return (
<Tooltip
content={copied ? 'Copied!' : 'Copy URL'}
open={copied ? true : undefined}
>
return (
<Button
displayType="secondary"
onClick={() => {
navigator.clipboard.writeText(roomUrl)
onClick={(e) => {
onClick && onClick(e)
navigator.clipboard.writeText(contentValue)
setCopied(true)
reset()
}}
ref={ref}
className="flex items-center gap-2 text-xs"
{...rest}
>
<Icon
type={copied ? 'ClipboardDocumentCheckIcon' : 'ClipboardDocumentIcon'}
className="text-xl"
/>
<VisuallyHidden>{copied ? 'Copied!' : 'Copy URL'}</VisuallyHidden>
{copied ? copiedMessage : children}
</Button>
</Tooltip>
)
}
)
}
)

CopyButton.displayName = 'CopyButton'
8 changes: 7 additions & 1 deletion app/components/LeaveRoomButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ import { Tooltip } from './Tooltip'

interface LeaveRoomButtonProps {
navigateToFeedbackPage: boolean
meetingId?: string
}

export const LeaveRoomButton: FC<LeaveRoomButtonProps> = ({
navigateToFeedbackPage,
meetingId,
}) => {
const navigate = useNavigate()
return (
<Tooltip content="Leave">
<Button
displayType="danger"
onClick={() => {
navigate(navigateToFeedbackPage ? '/call-quality-feedback' : '/')
const params = new URLSearchParams()
if (meetingId) params.set('meetingId', meetingId)
navigate(
navigateToFeedbackPage ? `/call-quality-feedback?${params}` : '/'
)
}}
>
<VisuallyHidden>Leave</VisuallyHidden>
Expand Down
Loading
Loading