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

caleb531 / workday-time-calculator / 24427670880

14 Apr 2026 11:13PM UTC coverage: 87.887% (-4.3%) from 92.158%
24427670880

push

github

caleb531
Get basic analytics UI functional.

The chart is still a bit rough around the edges stylistically, but it
works.

504 of 557 branches covered (90.48%)

Branch coverage included in aggregate %.

381 of 436 new or added lines in 6 files covered. (87.39%)

97 existing lines in 1 file now uncovered.

2137 of 2448 relevant lines covered (87.3%)

154.54 hits per line

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

92.23
/scripts/components/tools.jsx
1
import clsx from 'clsx';
2✔
2
import m from 'mithril';
2✔
3
import AnalyticsComponent from './analytics.jsx';
2✔
4
import AnalyticsIconComponent from './analytics-icon.jsx';
2✔
5
import DismissableOverlayComponent from './dismissable-overlay.jsx';
2✔
6
import ExportComponent from './export.jsx';
2✔
7
import ImportComponent from './import.jsx';
2✔
8
import PreferencesComponent from './preferences.jsx';
2✔
9
import WrenchIconComponent from './wrench-icon.jsx';
2✔
10

11
class ToolsComponent {
2✔
12
  oninit() {
2✔
13
    this.analyticsOpen = false;
142✔
14
    this.toolsMenuOpen = false;
142✔
15
    this.preferencesOpen = false;
142✔
16
  }
142✔
17

18
  view({ attrs: { preferences } }) {
2✔
19
    return (
706✔
20
      <div
706✔
21
        className={clsx('app-tools', { 'app-tools-open': this.toolsMenuOpen })}
706✔
22
      >
23
        <button
706✔
24
          aria-label="Toggle Tools Menu"
706✔
25
          onclick={() => {
706✔
26
            this.toolsMenuOpen = !this.toolsMenuOpen;
40✔
27
          }}
40✔
28
          className={clsx('app-tools-menu-toggle', {
706✔
29
            'app-tools-control-active': this.toolsMenuOpen
706✔
30
          })}
706✔
31
        >
32
          <WrenchIconComponent />
706✔
33
        </button>
706✔
34
        <button
706✔
35
          aria-label="Toggle Analytics"
706✔
36
          onclick={() => {
706✔
37
            this.analyticsOpen = !this.analyticsOpen;
6✔
38
            this.toolsMenuOpen = false;
6✔
39
          }}
6✔
40
          className={clsx('app-tools-analytics-toggle', {
706✔
41
            'app-tools-control-active': this.analyticsOpen
706✔
42
          })}
706✔
43
        >
44
          <AnalyticsIconComponent />
706✔
45
        </button>
706✔
46
        {this.toolsMenuOpen ? (
706✔
47
          <DismissableOverlayComponent
7✔
48
            aria-label="Close Tools Menu"
7✔
49
            onDismiss={() => {
7✔
50
              this.toolsMenuOpen = false;
×
51
            }}
×
52
          />
7✔
53
        ) : null}
699✔
54
        <ul
706✔
55
          className={clsx('app-tools-menu', {
706✔
56
            'app-tools-open': this.toolsMenuOpen
706✔
57
          })}
706✔
58
          onclick={() => {
706✔
59
            this.toolsMenuOpen = false;
38✔
60
          }}
38✔
61
        >
62
          <li>
706✔
63
            <ImportComponent preferences={preferences} />
706✔
64
          </li>
706✔
65
          <li>
706✔
66
            <ExportComponent preferences={preferences} />
706✔
67
          </li>
706✔
68
          <li
706✔
69
            onclick={() => {
706✔
70
              this.preferencesOpen = true;
30✔
71
            }}
30✔
72
          >
73
            <span className="app-control-preferences">Preferences</span>
706✔
74
          </li>
706✔
75
        </ul>
706✔
76
        {this.preferencesOpen ? (
706✔
77
          <PreferencesComponent
97✔
78
            preferences={preferences}
97✔
79
            preferencesOpen={this.preferencesOpen}
97✔
80
            onClosePreferences={() => {
97✔
81
              this.preferencesOpen = false;
×
82
              m.redraw();
×
83
            }}
×
84
          />
97✔
85
        ) : null}
609✔
86
        {this.analyticsOpen ? (
706✔
87
          <AnalyticsComponent
13✔
88
            preferences={preferences}
13✔
89
            onCloseAnalytics={() => {
13✔
NEW
90
              this.analyticsOpen = false;
×
NEW
91
              m.redraw();
×
NEW
92
            }}
×
93
          />
13✔
94
        ) : null}
693✔
95
      </div>
706✔
96
    );
97
  }
706✔
98
}
2✔
99

100
export default ToolsComponent;
2✔
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