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

EcrituresNumeriques / stylo / 14067433582

25 Mar 2025 06:31PM UTC coverage: 31.801%. First build
14067433582

push

github

web-flow
chore: ajout d'une menu sur l'interface d'écriture collaborative (#1364)

* chore: ajout d'une menu sur l'interface d'écriture collaborative

* chore: affiche les métadonnées en lecture seule

470 of 703 branches covered (66.86%)

Branch coverage included in aggregate %.

3 of 281 new or added lines in 9 files covered. (1.07%)

4483 of 14872 relevant lines covered (30.14%)

2.26 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 from 'react'
×
NEW
2
import { Eye, Printer } from 'react-feather'
×
3
import { Link } from 'react-router-dom'
×
4

5
import useFetchData from '../../hooks/graphql.js'
×
6
import { useModal } from '../../hooks/modal.js'
×
7

8
import { getArticleInfo } from '../Article.graphql'
×
9

10
import Button from '../Button.jsx'
×
11

12
import buttonStyles from '../button.module.scss'
×
13
import Export from '../Export.jsx'
×
14
import Modal from '../Modal.jsx'
×
15
import Loading from '../molecules/Loading.jsx'
×
16
import styles from './CollaborativeEditorArticleHeader.module.scss'
×
17

18
/**
19
 * @param props
20
 * @param {string} props.articleId
21
 * @return {Element}
22
 */
23
export default function CollaborativeEditorArticleHeader({ articleId }) {
×
24
  const { data, isLoading } = useFetchData(
×
25
    { query: getArticleInfo, variables: { articleId } },
×
26
    {
×
27
      revalidateIfStale: false,
×
28
      revalidateOnFocus: false,
×
29
      revalidateOnReconnect: false,
×
30
    }
×
31
  )
×
32
  const exportModal = useModal()
×
33

34
  if (isLoading) {
×
35
    return <Loading />
×
36
  }
×
37

38
  return (
×
39
    <header className={styles.header}>
×
NEW
40
      <h1 className={styles.title}>{data?.article?.title}</h1>
×
41
      <div>
×
42
        <Button
×
43
          icon
×
44
          title="Download a printable version"
×
45
          onClick={() => exportModal.show()}
×
46
        >
47
          <Printer />
×
48
        </Button>
×
49
        <Link
×
50
          to={`/article/${articleId}/preview`}
×
51
          title="Preview (open a new window)"
×
52
          target="_blank"
×
53
          rel="noopener noreferrer"
×
54
          className={buttonStyles.icon}
×
55
        >
56
          <Eye />
×
57
        </Link>
×
58
      </div>
×
59

60
      <Modal
×
61
        {...exportModal.bindings}
×
62
        title={
×
63
          <>
×
64
            <Printer /> Export
×
65
          </>
×
66
        }
67
      >
68
        <Export
×
69
          articleId={articleId}
×
70
          name={data?.article?.title}
×
71
          bib={data?.article?.workingVersion?.bibPreview}
×
72
          onCancel={() => exportModal.close()}
×
73
        />
×
74
      </Modal>
×
75
    </header>
×
76
  )
77
}
×
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