Skip to content

Commit df643ba

Browse files
AXON-791 Removed Unused Settings in Atlascode (#699)
* Removed Unused Settings * Updated change log to reflect removed settings * Responded to PR comment about changelog --------- Co-authored-by: Marco <[email protected]>
1 parent 676448a commit df643ba

File tree

9 files changed

+40
-117
lines changed

9 files changed

+40
-117
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
## What's new in 3.8.9
66

7-
### Features
8-
97
### Bug Fixes
108

9+
- Removed setting options that had no practical or business logic use.
10+
1111
- Fixed a bug where Jira site icon is broken in create Jira issue page
1212

1313
## What's new in 3.8.8

package.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -987,18 +987,6 @@
987987
"description": "Enables showing the welcome screen when a new version is installed",
988988
"scope": "window"
989989
},
990-
"atlascode.onlineCheckerUrls": {
991-
"type": "array",
992-
"items": {
993-
"type": "string"
994-
},
995-
"default": [
996-
"https://www.atlassian.com",
997-
"https://bitbucket.org"
998-
],
999-
"description": "Online Checker will ping these URLs to determine online status",
1000-
"scope": "window"
1001-
},
1002990
"atlascode.jira.enabled": {
1003991
"type": "boolean",
1004992
"default": true,

src/config/model.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ export interface IConfig {
1010
enableCharles: boolean;
1111
charlesCertPath: string;
1212
charlesDebugOnly: boolean;
13-
offlineMode: boolean;
1413
showWelcomeOnInstall: boolean;
1514
jira: JiraConfig;
1615
bitbucket: BitbucketConfig;
1716
enableUIWS: boolean;
1817
enableCurlLogging: boolean;
1918
enableHttpsTunnel: boolean;
20-
onlineCheckerUrls: string[];
2119
helpExplorerEnabled: boolean;
2220
}
2321

@@ -115,7 +113,6 @@ export interface BitbucketExplorer {
115113
nestFilesEnabled: boolean;
116114
refreshInterval: number;
117115
relatedJiraIssues: BitbucketRelatedJiraIssues;
118-
relatedBitbucketIssues: BitbucketRelatedBitbucketIssues;
119116
notifications: BitbucketNotifications;
120117
}
121118

@@ -194,10 +191,6 @@ const emptyRelatedJiraIssues: BitbucketRelatedJiraIssues = {
194191
enabled: true,
195192
};
196193

197-
const emptyRelatedBitbucketIssues: BitbucketRelatedBitbucketIssues = {
198-
enabled: true,
199-
};
200-
201194
const emptyBitbucketNotfications: BitbucketNotifications = {
202195
refreshInterval: 10,
203196
pullRequestCreated: true,
@@ -208,7 +201,6 @@ const emptyBitbucketExplorer: BitbucketExplorer = {
208201
nestFilesEnabled: true,
209202
refreshInterval: 5,
210203
relatedJiraIssues: emptyRelatedJiraIssues,
211-
relatedBitbucketIssues: emptyRelatedBitbucketIssues,
212204
notifications: emptyBitbucketNotfications,
213205
};
214206

@@ -255,13 +247,11 @@ export const emptyConfig: IConfig = {
255247
enableCharles: false,
256248
charlesCertPath: '',
257249
charlesDebugOnly: false,
258-
offlineMode: false,
259250
showWelcomeOnInstall: true,
260251
jira: emptyJiraConfig,
261252
bitbucket: emptyBitbucketConfig,
262253
enableUIWS: false,
263254
enableCurlLogging: false,
264255
enableHttpsTunnel: false,
265-
onlineCheckerUrls: [],
266256
helpExplorerEnabled: true,
267257
};

src/react/atlascode/config/bitbucket/BitbucketPanel.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ export const BitbucketPanel: React.FunctionComponent<BitbucketPanelProps> = ({
5656
relatedJiraIssues={
5757
config[`${ConfigSection.Bitbucket}.explorer.relatedJiraIssues.enabled`]
5858
}
59-
relatedBitbucketIssues={
60-
config[`${ConfigSection.Bitbucket}.explorer.relatedBitbucketIssues.enabled`]
61-
}
6259
pullRequestCreated={
6360
config[`${ConfigSection.Bitbucket}.explorer.notifications.pullRequestCreated`]
6461
}

src/react/atlascode/config/bitbucket/PRExplorer.tsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { ConfigControllerContext } from '../configController';
99
type PRExplorerProps = {
1010
enabled: boolean;
1111
relatedJiraIssues: boolean;
12-
relatedBitbucketIssues: boolean;
1312
pullRequestCreated: boolean;
1413
nestFiles: boolean;
1514
refreshInterval: number;
@@ -25,7 +24,7 @@ const useStyles = makeStyles(
2524
);
2625

2726
export const PRExplorer: React.FunctionComponent<PRExplorerProps> = memo(
28-
({ enabled, relatedJiraIssues, relatedBitbucketIssues, pullRequestCreated, nestFiles, refreshInterval }) => {
27+
({ enabled, relatedJiraIssues, pullRequestCreated, nestFiles, refreshInterval }) => {
2928
const classes = useStyles();
3029
const controller = useContext(ConfigControllerContext);
3130

@@ -88,25 +87,6 @@ export const PRExplorer: React.FunctionComponent<PRExplorerProps> = memo(
8887
variant="body1"
8988
/>
9089
</Grid>
91-
<Grid item>
92-
<ToggleWithLabel
93-
control={
94-
<Switch
95-
className={classes.indent}
96-
size="small"
97-
color="primary"
98-
id="bbRelatedBitbucketIssues"
99-
value="explorer.relatedBitbucketIssues.enabled"
100-
checked={relatedBitbucketIssues}
101-
disabled={!enabled}
102-
onChange={handleChange}
103-
/>
104-
}
105-
label="Show related Bitbucket issues for pull requests"
106-
spacing={1}
107-
variant="body1"
108-
/>
109-
</Grid>
11090
<Grid item>
11191
<ToggleWithLabel
11292
control={

src/react/atlascode/config/bitbucket/subpanels/PRExplorerPanel.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { PRExplorer } from '../PRExplorer';
1111
type PRExplorerPanelProps = CommonSubpanelProps & {
1212
enabled: boolean;
1313
relatedJiraIssues: boolean;
14-
relatedBitbucketIssues: boolean;
1514
pullRequestCreated: boolean;
1615
nestFiles: boolean;
1716
refreshInterval: number;
@@ -24,7 +23,6 @@ export const PRExplorerPanel: React.FunctionComponent<PRExplorerPanelProps> = me
2423
onSubsectionChange,
2524
enabled,
2625
relatedJiraIssues,
27-
relatedBitbucketIssues,
2826
pullRequestCreated,
2927
nestFiles,
3028
refreshInterval,
@@ -62,7 +60,6 @@ export const PRExplorerPanel: React.FunctionComponent<PRExplorerPanelProps> = me
6260
<PRExplorer
6361
enabled={enabled}
6462
relatedJiraIssues={relatedJiraIssues}
65-
relatedBitbucketIssues={relatedBitbucketIssues}
6663
pullRequestCreated={pullRequestCreated}
6764
nestFiles={nestFiles}
6865
refreshInterval={refreshInterval}

src/react/atlascode/config/general/Connectivity.tsx

Lines changed: 35 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,65 +6,44 @@ import { ConfigControllerContext } from '../configController';
66

77
type ConnectivityProps = {
88
enableHttpsTunnel: boolean;
9-
offlineMode: boolean;
10-
onlineCheckerUrls: string[];
119
};
1210

13-
export const Connectivity: React.FunctionComponent<ConnectivityProps> = memo(
14-
({ enableHttpsTunnel, offlineMode, onlineCheckerUrls }) => {
15-
const controller = useContext(ConfigControllerContext);
11+
export const Connectivity: React.FunctionComponent<ConnectivityProps> = memo(({ enableHttpsTunnel }) => {
12+
const controller = useContext(ConfigControllerContext);
1613

17-
const [changes, setChanges] = useState<{ [key: string]: any }>({});
18-
const handleCheckedChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
19-
const changes = Object.create(null);
20-
changes[`${e.target.value}`] = e.target.checked;
21-
setChanges(changes);
22-
}, []);
14+
const [changes, setChanges] = useState<{ [key: string]: any }>({});
15+
const handleCheckedChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
16+
const changes = Object.create(null);
17+
changes[`${e.target.value}`] = e.target.checked;
18+
setChanges(changes);
19+
}, []);
2320

24-
useEffect(() => {
25-
if (Object.keys(changes).length > 0) {
26-
controller.updateConfig(changes);
27-
setChanges({});
28-
}
29-
}, [changes, controller]);
21+
useEffect(() => {
22+
if (Object.keys(changes).length > 0) {
23+
controller.updateConfig(changes);
24+
setChanges({});
25+
}
26+
}, [changes, controller]);
3027

31-
return (
32-
<Grid container direction="column" spacing={3}>
33-
<Grid item>
34-
<ToggleWithLabel
35-
control={
36-
<Switch
37-
size="small"
38-
color="primary"
39-
id="enableHttpsTunnel"
40-
value="enableHttpsTunnel"
41-
checked={enableHttpsTunnel}
42-
onChange={handleCheckedChange}
43-
/>
44-
}
45-
label="Enable https tunneling for proxies that only have an http endpoint"
46-
spacing={1}
47-
variant="body1"
48-
/>
49-
</Grid>
50-
<Grid item>
51-
<ToggleWithLabel
52-
control={
53-
<Switch
54-
size="small"
55-
color="primary"
56-
id="offlineMode"
57-
value="offlineMode"
58-
checked={offlineMode}
59-
onChange={handleCheckedChange}
60-
/>
61-
}
62-
label="Enable offline mode if you are without an internet connection to minimize errors"
63-
spacing={1}
64-
variant="body1"
65-
/>
66-
</Grid>
28+
return (
29+
<Grid container direction="column" spacing={3}>
30+
<Grid item>
31+
<ToggleWithLabel
32+
control={
33+
<Switch
34+
size="small"
35+
color="primary"
36+
id="enableHttpsTunnel"
37+
value="enableHttpsTunnel"
38+
checked={enableHttpsTunnel}
39+
onChange={handleCheckedChange}
40+
/>
41+
}
42+
label="Enable https tunneling for proxies that only have an http endpoint"
43+
spacing={1}
44+
variant="body1"
45+
/>
6746
</Grid>
68-
);
69-
},
70-
);
47+
</Grid>
48+
);
49+
});

src/react/atlascode/config/general/GeneralPanel.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ export const GeneralPanel: React.FunctionComponent<GeneralPanelProps> = ({
5151
expanded={selectedSubSections.includes(ConfigSubSection.Misc)}
5252
onSubsectionChange={onSubsectionChange}
5353
enableHttpsTunnel={config['enableHttpsTunnel']}
54-
offlineMode={config['offlineMode']}
55-
onlineCheckerUrls={config['onlineCheckerUrls']}
5654
/>
5755
</Grid>
5856
<Grid item>

src/react/atlascode/config/general/subpanels/GenConnectPanel.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ import { Connectivity } from '../Connectivity';
1010

1111
type GenConnectPanelProps = CommonSubpanelProps & {
1212
enableHttpsTunnel: boolean;
13-
offlineMode: boolean;
14-
onlineCheckerUrls: string[];
1513
};
1614

1715
export const GenConnectPanel: React.FunctionComponent<GenConnectPanelProps> = memo(
18-
({ visible, expanded, onSubsectionChange, enableHttpsTunnel, offlineMode, onlineCheckerUrls }) => {
16+
({ visible, expanded, onSubsectionChange, enableHttpsTunnel }) => {
1917
const [internalExpanded, setInternalExpanded] = useState(expanded);
2018

2119
const expansionHandler = useCallback(
@@ -46,11 +44,7 @@ export const GenConnectPanel: React.FunctionComponent<GenConnectPanelProps> = me
4644
<PanelSubtitle>configure general connectivity settings</PanelSubtitle>
4745
</ExpansionPanelSummary>
4846
<ExpansionPanelDetails>
49-
<Connectivity
50-
enableHttpsTunnel={enableHttpsTunnel}
51-
offlineMode={offlineMode}
52-
onlineCheckerUrls={onlineCheckerUrls}
53-
/>
47+
<Connectivity enableHttpsTunnel={enableHttpsTunnel} />
5448
</ExpansionPanelDetails>
5549
</ExpansionPanel>
5650
);

0 commit comments

Comments
 (0)