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

EcrituresNumeriques / stylo / 14472219216

15 Apr 2025 02:37PM UTC coverage: 31.374% (-0.01%) from 31.388%
14472219216

push

github

web-flow
chore: utilise SWR pour gérer les versions d'un article (#1370)

470 of 708 branches covered (66.38%)

Branch coverage included in aggregate %.

53 of 436 new or added lines in 16 files covered. (12.16%)

233 existing lines in 11 files now uncovered.

4521 of 15200 relevant lines covered (29.74%)

2.21 hits per line

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

0.0
/front/src/components/Write/ArticleEditorMenu.jsx
1
import React, { useCallback } from 'react'
×
2
import { useDispatch, useSelector } from 'react-redux'
×
3
import { useTranslation } from 'react-i18next'
×
4

5
import styles from './articleEditorMenu.module.scss'
×
NEW
6
import Sommaire from './Sommaire'
×
7
import Versions from './Versions'
×
8
import { Sidebar } from 'lucide-react'
×
9

UNCOV
10
export default function ArticleEditorMenu({
×
11
  articleInfos,
×
12
  readOnly,
×
13
  compareTo,
×
14
  selectedVersion,
×
15
}) {
×
16
  const expanded = useSelector(
×
17
    (state) => state.articlePreferences.expandSidebarLeft
×
18
  )
×
19
  const dispatch = useDispatch()
×
20
  const toggleExpand = useCallback(
×
21
    () =>
×
22
      dispatch({
×
23
        type: 'ARTICLE_PREFERENCES_TOGGLE',
×
24
        key: 'expandSidebarLeft',
×
25
      }),
×
26
    []
×
27
  )
×
28
  const { t } = useTranslation()
×
29

UNCOV
30
  return (
×
31
    <nav className={`${expanded ? styles.expandleft : styles.retractleft}`}>
×
32
      <button
×
33
        onClick={toggleExpand}
×
34
        className={expanded ? styles.close : styles.open}
×
35
      >
UNCOV
36
        <Sidebar />{' '}
×
NEW
37
        {expanded
×
38
          ? t('write.sidebar.closeButton')
×
39
          : t('write.sidebar.biblioAndCoButton')}
×
40
      </button>
×
41
      {expanded && (
×
42
        <div>
×
43
          <Versions
×
NEW
44
            article={articleInfos}
×
NEW
45
            selectedVersion={selectedVersion}
×
46
            compareTo={compareTo}
×
47
            readOnly={readOnly}
×
48
          />
×
49
          <Sommaire />
×
50
        </div>
×
51
      )}
UNCOV
52
    </nav>
×
53
  )
UNCOV
54
}
×
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