Skip to content

Commit d902408

Browse files
authored
Merge pull request #253 from x1unix/dev
chore: Release v1.13.3
2 parents 95065c7 + a0153c0 commit d902408

File tree

13 files changed

+212
-305
lines changed

13 files changed

+212
-305
lines changed

web/src/changelog.json

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,16 @@
11
{
22
"Interface - General": [
33
{
4-
"issueId": 213,
5-
"url": "/issues/213",
6-
"description": "Improve Go versions selection"
4+
"issueId": 251,
5+
"url": "/pull/251",
6+
"description": "Redesign command bar to reduce number of items."
77
}
88
],
9-
"Interface - IDE": [
9+
"Interface - Hotfixes": [
1010
{
11-
"issueId": 210,
12-
"url": "/issues/210",
13-
"description": "Properly display delayed messages from Go programs executed on server"
14-
},
15-
{
16-
"issueId": 215,
17-
"url": "/pull/215",
18-
"description": "Properly handle WebAssembly programs lifecycle"
19-
},
20-
{
21-
"issueId": 218,
22-
"url": "/issues/218",
23-
"description": "Add debouncing for code completion API calls"
24-
}
25-
],
26-
"Go - Runtime": [
27-
{
28-
"issueId": 211,
29-
"url": "/pull/211",
30-
"description": "Add embedded Go interpreter based on Yaegi"
31-
}
32-
],
33-
"Go - WebAssembly": [
34-
{
35-
"issueId": 211,
36-
"url": "/pull/211",
37-
"description": "Bump Go version to 1.19"
11+
"issueId": 250,
12+
"url": "/pull/250",
13+
"description": "Remove broken web worker update mechanism."
3814
}
3915
]
4016
}

web/src/components/core/Header/Header.tsx

Lines changed: 13 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import {
44
ICommandBarItemProps, Stack,
55
} from '@fluentui/react';
66

7-
import environment from "~/environment";
8-
import apiClient, {VersionsInfo} from "~/services/api";
9-
import {newAddNotificationAction, NotificationType} from "~/store/notifications";
7+
import apiClient, { VersionsInfo } from "~/services/api";
8+
import { newAddNotificationAction, NotificationType } from "~/store/notifications";
109
import SettingsModal, { SettingsChanges } from '~/components/settings/SettingsModal';
1110
import ThemeableComponent from '~/components/utils/ThemeableComponent';
1211
import AboutModal from '~/components/modals/AboutModal';
13-
import ChangeLogModal from '~/components/modals/ChangeLogModal';
1412
import RunTargetSelector from '~/components/inputs/RunTargetSelector';
1513
import SharePopup from '~/components/utils/SharePopup';
1614
import {
@@ -39,7 +37,6 @@ const BTN_SHARE_CLASSNAME = 'Header__btn--share';
3937
interface HeaderState {
4038
showSettings?: boolean
4139
showAbout?: boolean
42-
showChangelog?: boolean
4340
loading?: boolean
4441
showShareMessage?: boolean
4542
goVersions?: VersionsInfo
@@ -75,7 +72,6 @@ export class Header extends ThemeableComponent<any, HeaderState> {
7572
this.state = {
7673
showSettings: false,
7774
showAbout: false,
78-
showChangelog: false,
7975
loading: false,
8076
showShareMessage: false
8177
};
@@ -176,6 +172,15 @@ export class Header extends ThemeableComponent<any, HeaderState> {
176172
onClick: () => {
177173
this.setState({ showSettings: true });
178174
}
175+
},
176+
{
177+
key: 'about',
178+
text: 'About',
179+
ariaLabel: 'About',
180+
iconProps: { iconName: 'Info' },
181+
onClick: () => {
182+
this.setState({ showAbout: true });
183+
}
179184
}
180185
];
181186
}
@@ -227,45 +232,6 @@ export class Header extends ThemeableComponent<any, HeaderState> {
227232
];
228233
}
229234

230-
get overflowItems(): ICommandBarItemProps[] {
231-
return [
232-
{
233-
key: 'new-issue',
234-
text: 'Submit Issue',
235-
ariaLabel: 'Submit Issue',
236-
iconProps: { iconName: 'Bug' },
237-
onClick: () => window.open(environment.urls.issue, '_blank')
238-
},
239-
{
240-
key: 'donate',
241-
text: 'Donate',
242-
ariaLabel: 'Donate',
243-
iconProps: { iconName: 'Heart' },
244-
onClick: () => window.open(environment.urls.donate, '_blank')
245-
},
246-
{
247-
key: 'changelog',
248-
text: 'What\'s new',
249-
ariaLabel: 'Changelog',
250-
iconOnly: true,
251-
disabled: this.isDisabled,
252-
iconProps: { iconName: 'Giftbox' },
253-
onClick: () => {
254-
this.setState({ showChangelog: true });
255-
}
256-
},
257-
{
258-
key: 'about',
259-
text: 'About',
260-
ariaLabel: 'About',
261-
iconProps: { iconName: 'Info' },
262-
onClick: () => {
263-
this.setState({ showAbout: true });
264-
}
265-
}
266-
]
267-
}
268-
269235
private onSettingsClose(changes: SettingsChanges) {
270236
if (changes.monaco) {
271237
// Update monaco state if some of its settings were changed
@@ -285,7 +251,7 @@ export class Header extends ThemeableComponent<any, HeaderState> {
285251
return (
286252
<header
287253
className='header'
288-
style={{backgroundColor: this.theme.palette.white}}
254+
style={{ backgroundColor: this.theme.palette.white }}
289255
>
290256
<img
291257
src='/go-logo-blue.svg'
@@ -295,8 +261,7 @@ export class Header extends ThemeableComponent<any, HeaderState> {
295261
<CommandBar
296262
className='header__commandBar'
297263
items={this.menuItems}
298-
farItems={this.asideItems.filter(({hidden}) => !hidden)}
299-
overflowItems={this.overflowItems}
264+
farItems={this.asideItems.filter(({ hidden }) => !hidden)}
300265
ariaLabel='CodeEditor menu'
301266
/>
302267
<SharePopup
@@ -313,10 +278,6 @@ export class Header extends ThemeableComponent<any, HeaderState> {
313278
onClose={() => this.setState({ showAbout: false })}
314279
isOpen={this.state.showAbout}
315280
/>
316-
<ChangeLogModal
317-
onClose={() => this.setState({ showChangelog: false })}
318-
isOpen={this.state.showChangelog}
319-
/>
320281
</header>
321282
);
322283
}

web/src/components/modals/AboutModal.tsx

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
import React, { useMemo } from 'react';
2+
import {
3+
IconButton,
4+
FontWeights,
5+
FontSizes,
6+
mergeStyleSets,
7+
useTheme,
8+
Stack,
9+
DefaultButton,
10+
} from '@fluentui/react';
11+
import { Modal } from '@fluentui/react/lib/Modal';
12+
import { Link } from '@fluentui/react/lib/Link';
13+
14+
import ChangeLog from './ChangeLog';
15+
import { getContentStyles, getIconButtonStyles } from '~/styles/modal';
16+
import environment from "~/environment";
17+
18+
const TITLE_ID = 'AboutTitle';
19+
const SUB_TITLE_ID = 'AboutSubtitle';
20+
21+
interface AboutModalProps {
22+
isOpen?: boolean
23+
onClose: () => void
24+
}
25+
26+
const AboutModal: React.FC<AboutModalProps> = (props: AboutModalProps) => {
27+
const theme = useTheme();
28+
const contentStyles = getContentStyles(theme);
29+
const iconButtonStyles = getIconButtonStyles(theme);
30+
31+
const modalStyles = useMemo(() => mergeStyleSets({
32+
main: {
33+
maxWidth: '640px',
34+
},
35+
title: {
36+
fontWeight: FontWeights.light,
37+
fontSize: FontSizes.xxLargePlus,
38+
padding: '1em 2em 2em 2em',
39+
textAlign: 'center',
40+
},
41+
info: {
42+
display: 'flex',
43+
flexDirection: 'row',
44+
justifyContent: 'space-between',
45+
alignItems: 'center'
46+
},
47+
footer: {
48+
marginTop: '2em',
49+
backgroundColor: theme.semanticColors.bodyStandoutBackground,
50+
padding: '.3rem 24px 24px',
51+
margin: '24px -24px -24px'
52+
},
53+
}), [theme]);
54+
55+
return (
56+
<Modal
57+
titleAriaId={TITLE_ID}
58+
subtitleAriaId={SUB_TITLE_ID}
59+
isOpen={props.isOpen}
60+
onDismiss={props.onClose}
61+
styles={modalStyles}
62+
>
63+
<div className={contentStyles.header}>
64+
<span id={TITLE_ID}>About</span>
65+
<IconButton
66+
iconProps={{ iconName: 'Cancel' }}
67+
styles={iconButtonStyles}
68+
ariaLabel='Close popup modal'
69+
onClick={props.onClose as any}
70+
/>
71+
</div>
72+
<div id={SUB_TITLE_ID} className={contentStyles.body}>
73+
<div className={modalStyles.title}>
74+
Better Go Playground
75+
</div>
76+
<div className={modalStyles.info}>
77+
<Link href={environment.urls.github} target='_blank'>
78+
<b>GitHub</b>
79+
</Link>
80+
<span>Version: {environment.appVersion}</span>
81+
</div>
82+
<div className={modalStyles.footer}>
83+
<div>
84+
<h3>What's New</h3>
85+
<ChangeLog />
86+
</div>
87+
<Stack
88+
horizontal
89+
wrap
90+
horizontalAlign='end'
91+
tokens={{
92+
childrenGap: 'm',
93+
}}
94+
style={{
95+
marginTop: '1.5rem'
96+
}}
97+
>
98+
<Stack.Item grow={1}>
99+
<DefaultButton
100+
href={environment.urls.issue}
101+
target='_blank'
102+
iconProps={{
103+
iconName: 'Bug'
104+
}}
105+
>
106+
Report Bug
107+
</DefaultButton>
108+
109+
110+
</Stack.Item>
111+
<DefaultButton
112+
href={environment.urls.github}
113+
target='_blank'
114+
iconProps={{
115+
iconName: 'OpenSource'
116+
}}
117+
>
118+
Source
119+
</DefaultButton>
120+
121+
<DefaultButton
122+
href={environment.urls.donate}
123+
target='_blank'
124+
iconProps={{
125+
iconName: 'Heart'
126+
}}
127+
>
128+
Donate
129+
</DefaultButton>
130+
</Stack>
131+
</div>
132+
</div>
133+
</Modal>
134+
)
135+
}
136+
137+
AboutModal.defaultProps = { isOpen: false };
138+
export default AboutModal;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.ChangeLog .ChangeLog__issue-url:after {
2+
content: " - ";
3+
}

0 commit comments

Comments
 (0)