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

EcrituresNumeriques / stylo / 18717352145

22 Oct 2025 01:13PM UTC coverage: 39.663% (+0.007%) from 39.656%
18717352145

push

github

web-flow
fix: Utilise uniquement l'URL afin de déterminer l'état de l'éditeur (#1726)

613 of 860 branches covered (71.28%)

Branch coverage included in aggregate %.

0 of 8 new or added lines in 1 file covered. (0.0%)

1 existing line in 1 file now uncovered.

6104 of 16075 relevant lines covered (37.97%)

2.55 hits per line

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

0.0
/front/src/components/collaborative/CollaborativeEditorArticleHeader.jsx
NEW
1
import React, { useEffect, useMemo, useState } from 'react'
×
2
import { useTranslation } from 'react-i18next'
×
3
import { useSearchParams } from 'react-router'
×
4

5
import Toggle from '../molecules/Toggle.jsx'
×
6
import CollaborativeEditorActiveVersion from './CollaborativeEditorActiveVersion.jsx'
×
7
import CollaborativeEditorWriters from './CollaborativeEditorWriters.jsx'
×
8

9
import styles from './CollaborativeEditorArticleHeader.module.scss'
×
10

11
/**
12
 * @param props
13
 * @param {string} props.articleTitle
14
 * @param {string?} props.versionId
15
 * @returns {import('react').ReactElementElement}
16
 */
17
export default function CollaborativeEditorArticleHeader({
×
18
  articleTitle,
×
19
  versionId,
×
20
}) {
×
21
  const { t } = useTranslation()
×
UNCOV
22
  const [searchParams, setSearchParams] = useSearchParams()
×
23

NEW
24
  const searchParamMode = useMemo(
×
NEW
25
    () => searchParams.get('mode'),
×
NEW
26
    [searchParams]
×
NEW
27
  )
×
28

29
  return (
×
30
    <header className={styles.header}>
×
31
      <h1 className={styles.title}>{articleTitle}</h1>
×
32

33
      <div className={styles.row}>
×
34
        <Toggle
×
35
          id="preview-mode"
×
NEW
36
          checked={searchParamMode === 'preview'}
×
37
          title={t('article.editor.preview')}
×
NEW
38
          onChange={(checked) =>
×
NEW
39
            setSearchParams(checked ? { mode: 'preview' } : {})
×
40
          }
41
        >
42
          {t('article.editor.preview')}
×
43
        </Toggle>
×
44

45
        <div className={styles.writers}>
×
46
          <CollaborativeEditorWriters />
×
47
        </div>
×
48
      </div>
×
49
      <CollaborativeEditorActiveVersion versionId={versionId} />
×
50
    </header>
×
51
  )
52
}
×
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