mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
* [web] open a comment from a URL * [web] add "View comment" button to digest email * [web] open a tracked change from a URL * [web] add "View suggestion" button to digest email * [web] open the review panel from an open=review-panel URL * [web] drop the digest email CTA and collapse the deep links to t=review * [web] add an Open project button to the section overflow row and plain-text view links * [web] validate the comment and change deep-link ids as object ids * [web] collapse the deep-link resolvers into a single DeepLink component * fix: scrolling into view when below the fold * fix: address claude review * fix: style adjustments * fix: updating types to accomodate accepted/rejected changes --------- Co-authored-by: Jimmy Domagala-Tang <jimmy.domagala-tang@overleaf.com> GitOrigin-RevId: dab535591a93e1c3849a6b2a0dcc3e3934354385
36 lines
788 B
TypeScript
36 lines
788 B
TypeScript
import { GlobalToastGeneratorEntry } from '@/features/ide-react/components/global-toasts'
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
const COMMENT_NOT_FOUND_KEY = 'comment:not-found'
|
|
|
|
export const CommentNotFoundToast = () => {
|
|
const { t } = useTranslation()
|
|
|
|
return <span>{t('comment_not_found')}</span>
|
|
}
|
|
|
|
const generators: GlobalToastGeneratorEntry[] = [
|
|
{
|
|
key: COMMENT_NOT_FOUND_KEY,
|
|
generator: () => ({
|
|
content: <CommentNotFoundToast />,
|
|
type: 'warning',
|
|
autoHide: true,
|
|
delay: 4000,
|
|
isDismissible: true,
|
|
}),
|
|
},
|
|
]
|
|
|
|
export default generators
|
|
|
|
export const showCommentNotFoundToast = () => {
|
|
window.dispatchEvent(
|
|
new CustomEvent('ide:show-toast', {
|
|
detail: {
|
|
key: COMMENT_NOT_FOUND_KEY,
|
|
},
|
|
})
|
|
)
|
|
}
|