Skip to content

Commit 60de15e

Browse files
authored
Merge pull request #880 from integer32llc/maint
2 parents 42690cd + c92a49d commit 60de15e

31 files changed

+1630
-1650
lines changed

tests/Gemfile.lock

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
addressable (2.8.0)
5-
public_suffix (>= 2.0.2, < 5.0)
6-
capybara (3.37.1)
4+
addressable (2.8.1)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
capybara (3.38.0)
77
addressable
88
matrix
99
mini_mime (>= 0.1.3)
@@ -15,43 +15,41 @@ GEM
1515
capybara-screenshot (1.0.26)
1616
capybara (>= 1.0, < 4)
1717
launchy
18-
childprocess (4.1.0)
1918
diff-lcs (1.5.0)
20-
launchy (2.5.0)
21-
addressable (~> 2.7)
19+
launchy (2.5.2)
20+
addressable (~> 2.8)
2221
matrix (0.4.2)
2322
mini_mime (1.1.2)
24-
mini_portile2 (2.8.0)
25-
nokogiri (1.13.8)
23+
mini_portile2 (2.8.1)
24+
nokogiri (1.13.10)
2625
mini_portile2 (~> 2.8.0)
2726
racc (~> 1.4)
28-
public_suffix (4.0.7)
29-
racc (1.6.0)
30-
rack (2.2.4)
27+
public_suffix (5.0.1)
28+
racc (1.6.2)
29+
rack (3.0.3)
3130
rack-test (2.0.2)
3231
rack (>= 1.3)
33-
regexp_parser (2.5.0)
32+
regexp_parser (2.6.1)
3433
rexml (3.2.5)
35-
rspec (3.11.0)
36-
rspec-core (~> 3.11.0)
37-
rspec-expectations (~> 3.11.0)
38-
rspec-mocks (~> 3.11.0)
39-
rspec-core (3.11.0)
40-
rspec-support (~> 3.11.0)
41-
rspec-expectations (3.11.0)
34+
rspec (3.12.0)
35+
rspec-core (~> 3.12.0)
36+
rspec-expectations (~> 3.12.0)
37+
rspec-mocks (~> 3.12.0)
38+
rspec-core (3.12.0)
39+
rspec-support (~> 3.12.0)
40+
rspec-expectations (3.12.2)
4241
diff-lcs (>= 1.2.0, < 2.0)
43-
rspec-support (~> 3.11.0)
44-
rspec-mocks (3.11.1)
42+
rspec-support (~> 3.12.0)
43+
rspec-mocks (3.12.2)
4544
diff-lcs (>= 1.2.0, < 2.0)
46-
rspec-support (~> 3.11.0)
47-
rspec-support (3.11.0)
45+
rspec-support (~> 3.12.0)
46+
rspec-support (3.12.0)
4847
rubyzip (2.3.2)
49-
selenium-webdriver (4.4.0)
50-
childprocess (>= 0.5, < 5.0)
48+
selenium-webdriver (4.7.1)
5149
rexml (~> 3.2, >= 3.2.5)
5250
rubyzip (>= 1.2.2, < 3.0)
5351
websocket (~> 1.0)
54-
webdrivers (5.0.0)
52+
webdrivers (5.2.0)
5553
nokogiri (~> 1.6)
5654
rubyzip (>= 1.3.0)
5755
selenium-webdriver (~> 4.0)

ui/frontend/AdvancedOptionsMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const AdvancedOptionsMenu: React.FC = () => {
1616

1717
const dispatch = useDispatch();
1818

19-
const changeEdition = useCallback((e) => dispatch(actions.changeEdition(e)), [dispatch]);
20-
const changeBacktrace = useCallback((b) => dispatch(actions.changeBacktrace(b)), [dispatch]);
19+
const changeEdition = useCallback((e: Edition) => dispatch(actions.changeEdition(e)), [dispatch]);
20+
const changeBacktrace = useCallback((b: Backtrace) => dispatch(actions.changeBacktrace(b)), [dispatch]);
2121

2222
return (
2323
<MenuGroup title="Advanced options">

ui/frontend/ButtonMenuItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import styles from './ButtonMenuItem.module.css';
77
type Button = JSX.IntrinsicElements['button'];
88

99
interface ButtonMenuItemProps extends Button {
10+
children: React.ReactNode;
1011
name: string;
1112
}
1213

ui/frontend/ChannelMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const ChannelMenu: React.FC<ChannelMenuProps> = props => {
2424
const nightlyVersionDetails = useSelector(selectors.nightlyVersionDetailsText);
2525

2626
const dispatch = useDispatch();
27-
const changeChannel = useCallback((channel) => {
27+
const changeChannel = useCallback((channel: Channel) => {
2828
dispatch(actions.changeChannel(channel));
2929
props.close();
3030
}, [dispatch, props]);
@@ -63,7 +63,7 @@ const ChannelMenu: React.FC<ChannelMenuProps> = props => {
6363
);
6464
};
6565

66-
const Desc: React.FC<{}> = ({ children }) => (
66+
const Desc: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => (
6767
<p className={styles.description}>{children}</p>
6868
);
6969

ui/frontend/ConfigElement.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
text-transform: uppercase;
4343

4444
& ~ label {
45+
border-radius: 0 var(--header-border-radius) var(--header-border-radius) 0;
4546
border-right-width: 1px;
4647
border-left: $border;
47-
border-radius: 0 var(--header-border-radius) var(--header-border-radius) 0;
4848
}
4949

5050
&:hover {

ui/frontend/ConfigElement.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,54 @@ import MenuItem from './MenuItem';
44

55
import styles from './ConfigElement.module.css';
66

7-
interface EitherProps extends ConfigElementProps {
7+
interface EitherProps<T extends string> extends ConfigElementProps {
88
id: string;
99
a: string;
1010
b: string;
1111
aLabel?: string;
1212
bLabel?: string;
13-
value: string;
14-
onChange: (_: string) => any;
13+
value: T;
14+
onChange: (_: T) => any;
1515
}
1616

17-
export const Either: React.FC<EitherProps> =
18-
({ id, a, b, aLabel = a, bLabel = b, value, onChange, ...rest }) => (
17+
export const Either =
18+
<T extends string,>({ id, a, b, aLabel = a, bLabel = b, value, onChange, ...rest }: EitherProps<T>) => (
1919
<ConfigElement {...rest}>
2020
<div className={styles.toggle}>
2121
<input id={`${id}-a`}
2222
name={id}
2323
value={a}
2424
type="radio"
2525
checked={value === a}
26-
onChange={() => onChange(a)} />
26+
onChange={() => onChange(a as T)} />
2727
<label htmlFor={`${id}-a`}>{aLabel}</label>
2828
<input id={`${id}-b`}
2929
name={id}
3030
value={b}
3131
type="radio"
3232
checked={value === b}
33-
onChange={() => onChange(b)} />
33+
onChange={() => onChange(b as T)} />
3434
<label htmlFor={`${id}-b`}>{bLabel}</label>
3535
</div>
3636
</ConfigElement>
3737
);
3838

39-
interface SelectProps extends ConfigElementProps {
40-
value: string;
41-
onChange: (_: string) => any;
39+
interface SelectProps<T extends string> extends ConfigElementProps {
40+
children: React.ReactNode;
41+
value: T;
42+
onChange: (_: T) => any;
4243
}
4344

44-
export const Select: React.FC<SelectProps> = ({ value, onChange, children, ...rest }) => (
45+
export const Select = <T extends string,>({ value, onChange, children, ...rest }: SelectProps<T>) => (
4546
<ConfigElement {...rest}>
46-
<select className={styles.select} value={value} onChange={e => onChange(e.target.value)}>
47+
<select className={styles.select} value={value} onChange={e => onChange(e.target.value as T)}>
4748
{children}
4849
</select>
4950
</ConfigElement>
5051
);
5152

5253
interface ConfigElementProps {
54+
children?: React.ReactNode;
5355
name: string;
5456
isNotDefault?: boolean;
5557
aside?: JSX.Element,

ui/frontend/ConfigMenu.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,11 @@ import {
1717
ProcessAssembly,
1818
} from './types';
1919

20-
interface ConfigMenuProps {
21-
close: () => void;
22-
}
23-
2420
const MONACO_THEMES = [
2521
'vs', 'vs-dark', 'vscode-dark-plus',
2622
];
2723

28-
const ConfigMenu: React.FC<ConfigMenuProps> = () => {
24+
const ConfigMenu: React.FC = () => {
2925
const keybinding = useSelector((state: State) => state.configuration.ace.keybinding);
3026
const aceTheme = useSelector((state: State) => state.configuration.ace.theme);
3127
const monacoTheme = useSelector((state: State) => state.configuration.monaco.theme);
@@ -37,15 +33,19 @@ const ConfigMenu: React.FC<ConfigMenuProps> = () => {
3733
const processAssembly = useSelector((state: State) => state.configuration.processAssembly);
3834

3935
const dispatch = useDispatch();
40-
const changeAceTheme = useCallback((t) => dispatch(actions.changeAceTheme(t)), [dispatch]);
41-
const changeMonacoTheme = useCallback((t) => dispatch(actions.changeMonacoTheme(t)), [dispatch]);
42-
const changeKeybinding = useCallback((k) => dispatch(actions.changeKeybinding(k)), [dispatch]);
43-
const changeOrientation = useCallback((o) => dispatch(actions.changeOrientation(o)), [dispatch]);
44-
const changeEditorStyle = useCallback((e) => dispatch(actions.changeEditor(e)), [dispatch]);
45-
const changeAssemblyFlavor = useCallback((a) => dispatch(actions.changeAssemblyFlavor(a)), [dispatch]);
46-
const changePairCharacters = useCallback((p) => dispatch(actions.changePairCharacters(p)), [dispatch]);
47-
const changeProcessAssembly = useCallback((p) => dispatch(actions.changeProcessAssembly(p)), [dispatch]);
48-
const changeDemangleAssembly = useCallback((d) => dispatch(actions.changeDemangleAssembly(d)), [dispatch]);
36+
const changeAceTheme = useCallback((t: string) => dispatch(actions.changeAceTheme(t)), [dispatch]);
37+
const changeMonacoTheme = useCallback((t: string) => dispatch(actions.changeMonacoTheme(t)), [dispatch]);
38+
const changeKeybinding = useCallback((k: string) => dispatch(actions.changeKeybinding(k)), [dispatch]);
39+
const changeOrientation = useCallback((o: Orientation) => dispatch(actions.changeOrientation(o)), [dispatch]);
40+
const changeEditorStyle = useCallback((e: Editor) => dispatch(actions.changeEditor(e)), [dispatch]);
41+
const changeAssemblyFlavor =
42+
useCallback((a: AssemblyFlavor) => dispatch(actions.changeAssemblyFlavor(a)), [dispatch]);
43+
const changePairCharacters =
44+
useCallback((p: PairCharacters) => dispatch(actions.changePairCharacters(p)), [dispatch]);
45+
const changeProcessAssembly =
46+
useCallback((p: ProcessAssembly) => dispatch(actions.changeProcessAssembly(p)), [dispatch]);
47+
const changeDemangleAssembly =
48+
useCallback((d: DemangleAssembly) => dispatch(actions.changeDemangleAssembly(d)), [dispatch]);
4949

5050
return (
5151
<Fragment>

ui/frontend/Header.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const Header: React.FC = () => (
5757
);
5858

5959
interface HeaderSetProps {
60+
children: React.ReactNode;
6061
id: string;
6162
}
6263

ui/frontend/HeaderButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ExpandableIcon } from './Icon';
55
import styles from './HeaderButton.module.css';
66

77
interface HeaderButtonProps {
8+
children?: React.ReactNode;
89
bold?: boolean;
910
icon?: React.ReactNode;
1011
rightIcon?: React.ReactNode;

ui/frontend/Help.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,13 @@ const LinkableSection: React.FC<LinkableSectionProps> = ({
330330
);
331331

332332
interface LinkableSectionProps {
333+
children: React.ReactNode;
333334
id: string;
334335
header: string;
335336
level: React.ElementType;
336337
}
337338

338-
const Code: React.FC = ({ children }) => (
339+
const Code: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => (
339340
<code className={styles.code}>{children}</code>
340341
);
341342

0 commit comments

Comments
 (0)