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

electron / fiddle / 21847699829

10 Feb 2026 01:17AM UTC coverage: 60.567% (-17.9%) from 78.498%
21847699829

Pull #1849

github

web-flow
Merge 79bd10a3c into ee5c030ec
Pull Request #1849: feat: upgrade React 16 to 18

1250 of 1393 branches covered (89.73%)

Branch coverage included in aggregate %.

5 of 11 new or added lines in 3 files covered. (45.45%)

2290 existing lines in 25 files now uncovered.

6746 of 11809 relevant lines covered (57.13%)

27.97 hits per line

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

0.0
/src/renderer/components/settings-general-github.tsx
UNCOV
1
import * as React from 'react';
×
2

UNCOV
3
import { Button, Callout, Checkbox, FormGroup } from '@blueprintjs/core';
×
UNCOV
4
import { observer } from 'mobx-react';
×
5

6
import { AppState } from '../state';
7

8
interface GitHubSettingsProps {
9
  appState: AppState;
10
}
11

12
/**
13
 * Settings content to manage GitHub-related preferences.
14
 */
UNCOV
15
export const GitHubSettings = observer(
×
UNCOV
16
  class GitHubSettings extends React.Component<GitHubSettingsProps> {
×
UNCOV
17
    constructor(props: GitHubSettingsProps) {
×
UNCOV
18
      super(props);
×
19

UNCOV
20
      this.signIn = this.signIn.bind(this);
×
UNCOV
21
      this.handlePublishGistAsRevisionChange =
×
UNCOV
22
        this.handlePublishGistAsRevisionChange.bind(this);
×
UNCOV
23
    }
×
24

UNCOV
25
    private static publishGistAsRevisionInstructions = `
×
26
    Enable this option to always publish your fiddle as a revision of the
UNCOV
27
    default fiddle gist values.`.trim();
×
28

29
    /**
30
     * Render the "logged out" settings experience.
31
     */
UNCOV
32
    public renderNotSignedIn(): JSX.Element {
×
UNCOV
33
      return (
×
UNCOV
34
        <Callout>
×
UNCOV
35
          <p>
×
36
            Your fiddles can be published as GitHub Gists - that way you can
37
            share your fiddles with the world!
UNCOV
38
          </p>
×
UNCOV
39
          <Button onClick={this.signIn} icon="log-in" text="Sign in" />
×
UNCOV
40
        </Callout>
×
41
      );
UNCOV
42
    }
×
43

44
    /**
45
     * Render the "logged in" settings experience.
46
     */
UNCOV
47
    public renderSignedIn(): JSX.Element {
×
UNCOV
48
      const { gitHubLogin } = this.props.appState;
×
UNCOV
49
      const signOut = this.props.appState.signOutGitHub;
×
50

UNCOV
51
      return (
×
UNCOV
52
        <Callout>
×
UNCOV
53
          <p>
×
54
            Your fiddles can be published as public GitHub Gists. Using the
UNCOV
55
            personal access token you gave us, we logged you into GitHub as{' '}
×
UNCOV
56
            <code>{gitHubLogin}</code>.
×
UNCOV
57
          </p>
×
UNCOV
58
          <Button onClick={signOut} icon="log-out" text="Sign out" />
×
UNCOV
59
        </Callout>
×
60
      );
UNCOV
61
    }
×
62

63
    /**
64
     * Handles a change on whether or not the gist should be published
65
     * as a revision on top of the default fiddle gist.
66
     */
UNCOV
67
    public handlePublishGistAsRevisionChange(
×
UNCOV
68
      event: React.FormEvent<HTMLInputElement>,
×
UNCOV
69
    ) {
×
UNCOV
70
      const { checked } = event.currentTarget;
×
UNCOV
71
      this.props.appState.isPublishingGistAsRevision = checked;
×
UNCOV
72
    }
×
73

UNCOV
74
    public render() {
×
UNCOV
75
      const { gitHubToken } = this.props.appState;
×
UNCOV
76
      const { isPublishingGistAsRevision } = this.props.appState;
×
77

UNCOV
78
      const maybeSignedIn = !!gitHubToken
×
UNCOV
79
        ? this.renderSignedIn()
×
UNCOV
80
        : this.renderNotSignedIn();
×
81

UNCOV
82
      return (
×
UNCOV
83
        <div>
×
UNCOV
84
          <h4>GitHub</h4>
×
UNCOV
85
          {maybeSignedIn}
×
UNCOV
86
          <Callout>
×
UNCOV
87
            <FormGroup>
×
UNCOV
88
              <p>{GitHubSettings.publishGistAsRevisionInstructions}</p>
×
UNCOV
89
              <Checkbox
×
UNCOV
90
                checked={isPublishingGistAsRevision}
×
UNCOV
91
                label="Publish as revision."
×
UNCOV
92
                onChange={this.handlePublishGistAsRevisionChange}
×
UNCOV
93
              />
×
UNCOV
94
            </FormGroup>
×
UNCOV
95
          </Callout>
×
UNCOV
96
        </div>
×
97
      );
UNCOV
98
    }
×
99

100
    /**
101
     * Simply shows the GitHub Token dialog.
102
     */
UNCOV
103
    private signIn() {
×
UNCOV
104
      this.props.appState.isTokenDialogShowing = true;
×
UNCOV
105
    }
×
UNCOV
106
  },
×
UNCOV
107
);
×
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