• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

EcrituresNumeriques / stylo / 17724634656

15 Sep 2025 06:54AM UTC coverage: 39.426% (+0.04%) from 39.389%
17724634656

push

github

web-flow
fix: Utilise le titre de l'article dans le composant entĂȘte (#1668)

586 of 824 branches covered (71.12%)

Branch coverage included in aggregate %.

0 of 9 new or added lines in 3 files covered. (0.0%)

2 existing lines in 1 file now uncovered.

5786 of 15338 relevant lines covered (37.72%)

2.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/front/src/components/collaborative/CollaborativeEditor.jsx
1
import React from 'react'
×
2
import { useParams, useSearchParams } from 'react-router'
×
3

4
import { executeQuery } from '../../helpers/graphQL.js'
×
5

6
import ArticleStats from '../ArticleStats.jsx'
×
7
import CollaborativeEditorMenu from './CollaborativeEditorMenu.jsx'
×
8
import CollaborativeTextEditor from './CollaborativeTextEditor.jsx'
×
9

10
import { getArticleInfo } from '../Article.graphql'
×
11

12
import styles from './CollaborativeEditor.module.scss'
×
13

14
const articleIdRx = /^[a-f\d]{24}$/i
×
15

16
export async function loader({ params }) {
×
17
  const { id: articleId } = params
×
18

19
  if (articleId && articleIdRx.test(articleId) === false) {
×
20
    throw new Response(`Invalid article id ${articleId}`, { status: 400 })
×
21
  }
×
22

23
  const sessionToken = localStorage.getItem('sessionToken')
×
24
  try {
×
25
    const { article } = await executeQuery({
×
26
      query: getArticleInfo,
×
27
      variables: { articleId },
×
28
      sessionToken,
×
29
    })
×
30
    return { article }
×
31
  } catch (err) {
×
32
    const errorMessage = err.messages?.[0]?.message ?? err.message
×
33
    const errorType = err.messages?.[0]?.extensions?.type
×
34

35
    if (errorType === 'NOT_FOUND') {
×
36
      throw new Response(errorMessage, { status: 404 })
×
37
    }
×
38

39
    throw err
×
40
  }
×
41
}
×
42

43
export default function CollaborativeEditor(props) {
×
44
  const { id: articleId, compareTo, version: versionId } = useParams()
×
45
  const [searchParams] = useSearchParams({ mode: props.mode ?? 'write' })
×
46
  const mode = searchParams.get('mode')
×
47

48
  return (
×
49
    <section className={styles.container}>
×
NEW
50
      <div>
×
51
        <CollaborativeTextEditor
×
52
          mode={mode}
×
53
          articleId={articleId}
×
54
          versionId={versionId}
×
55
        />
×
56
        <ArticleStats />
×
57
      </div>
×
58

59
      <CollaborativeEditorMenu
×
60
        className={styles.sidebarArea}
×
61
        articleId={articleId}
×
62
        versionId={versionId}
×
63
        compareTo={compareTo}
×
64
      />
×
65
    </section>
×
66
  )
67
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc