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

Financial-Times / cm-react-components / 998c1b21-88bc-4dff-8fee-7dbaf9631eba

17 Nov 2025 09:50AM UTC coverage: 72.338% (-1.9%) from 74.23%
998c1b21-88bc-4dff-8fee-7dbaf9631eba

push

circleci

ManoelMilchev
add Publication dropdown

310 of 414 branches covered (74.88%)

Branch coverage included in aggregate %.

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

2 existing lines in 1 file now uncovered.

485 of 685 relevant lines covered (70.8%)

8.18 hits per line

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

0.0
/src/components/Header/PublicationSelect.js
1
import React, { useEffect } from 'react';
2
import PropTypes from 'prop-types';
3
import { SelectBox } from '../Forms/SelectBox';
4

5
function PublicationSelect({ publicationOptions, selectedPublication, handleChangePublication, className = '' }) {
×
NEW
6
  const hasOptions = publicationOptions && publicationOptions.length > 0;
×
NEW
7
  const defaultValue = hasOptions ? (selectedPublication || publicationOptions[0].value) : '';
×
8

NEW
9
  useEffect(() => {
×
NEW
10
    if (hasOptions && !selectedPublication) {
×
NEW
11
      handleChangePublication({ target: { value: publicationOptions[0].value } });
×
12
    }
13
  }, [hasOptions, publicationOptions, selectedPublication]);
14

NEW
15
  if (!hasOptions) return null;
×
16

NEW
17
  return (
×
18
    <div className={`header-publication-select-wrapper ${className}`}>
19
      <h3
20
        className="publicationSelectLabel"
21
        style={{
22
          marginRight: 4,
23
          fontFamily: 'MetricWeb, sans-serif',
24
          fontSize: '16px',
25
          lineHeight: '20px',
26
          fontWeight: 600,
27
          color: '#fff'
28
        }}
29
      >
30
        Publication
31
      </h3>
32
      <SelectBox
33
        className="header-publication-select"
34
        options={publicationOptions}
35
        selectedValue={defaultValue}
36
        onChange={handleChangePublication}
37
        disabled={!hasOptions}
38
      />
39
    </div>
40
  );
41
}
42

NEW
43
PublicationSelect.propTypes = {
×
44
  publicationOptions: PropTypes.array.isRequired,
45
  selectedPublication: PropTypes.string,
46
  handleChangePublication: PropTypes.func.isRequired,
47
  className: PropTypes.string
48
};
49

50
export default PublicationSelect;
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