Skip to content

Commit 938325f

Browse files
authored
Merge pull request #8299 from sagemathinc/explorer-merge-search-terminal
explorer: merge search and terminal
2 parents bb339fd + 5dd64cd commit 938325f

File tree

13 files changed

+279
-197
lines changed

13 files changed

+279
-197
lines changed

src/packages/frontend/_projects.sass

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@
7070
.cc-project-files-create-dropdown
7171
> .dropdown.btn-group
7272
display: flex
73+
flex: 1 0 auto
7374

7475
.cc-project-files-path-nav
75-
min-width: 35vw
76+
flex: 1 0 auto
7677
> div,
7778
> nav
7879
background-color: $COL_GRAY_LLL

src/packages/frontend/account/avatar/users-viewing.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Loading } from "@cocalc/frontend/components";
1616
import { cmp } from "@cocalc/util/misc";
1717
import { Avatar } from "./avatar";
1818

19-
// How frequently all UsersViewing componenents are completely updated.
19+
// How frequently all UsersViewing components are completely updated.
2020
// This is only needed to ensure that faces fade out; any newly added faces
2121
// will still be displayed instantly. Also, updating more frequently updates
2222
// the line positions in the tooltip.

src/packages/frontend/components/search-input.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ interface Props {
4141
}
4242

4343
export const SearchInput: React.FC<Props> = React.memo((props) => {
44-
const [value, set_value] = useState<string>(
44+
const [value, setValue] = useState<string>(
4545
props.value ?? props.default_value ?? "",
4646
);
4747
// if value changes, we update as well!
48-
useEffect(() => set_value(props.value ?? ""), [props.value]);
48+
useEffect(() => setValue(props.value ?? ""), [props.value]);
4949

5050
const [ctrl_down, set_ctrl_down] = useState<boolean>(false);
5151
const [shift_down, set_shift_down] = useState<boolean>(false);
@@ -70,7 +70,7 @@ export const SearchInput: React.FC<Props> = React.memo((props) => {
7070
}
7171

7272
function clear_value(): void {
73-
set_value("");
73+
setValue("");
7474
props.on_change?.("", get_opts());
7575
props.on_clear?.();
7676
}
@@ -140,7 +140,7 @@ export const SearchInput: React.FC<Props> = React.memo((props) => {
140140
onChange={(e) => {
141141
e.preventDefault();
142142
const value = e.target?.value ?? "";
143-
set_value(value);
143+
setValue(value);
144144
props.on_change?.(value, get_opts());
145145
if (!value) clear_value();
146146
}}

src/packages/frontend/components/tip.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const Tip: React.FC<Props> = React.memo((props: Props) => {
105105
mouseLeaveDelay: delayHide / 1000,
106106
};
107107

108-
props.overlayStyle = Object.assign({}, popover_style);
108+
props.styles = { root: Object.assign({}, popover_style) };
109109

110110
if (tip) {
111111
return (

src/packages/frontend/cspell.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
"undeleting",
3434
"tolerations",
3535
"rtypes",
36-
"rclass"
36+
"rclass",
37+
"ipython",
38+
"Miniterm"
3739
],
3840
"ignoreWords": [
3941
"LLMs",

src/packages/frontend/project/explorer/action-bar.tsx

+9-11
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
* License: MS-RSL – see LICENSE.md for details
44
*/
55

6+
import { Space } from "antd";
67
import * as immutable from "immutable";
78
import { throttle } from "lodash";
89
import React, { useEffect, useRef, useState } from "react";
910
import { FormattedMessage, useIntl } from "react-intl";
1011

11-
import {
12-
Button,
13-
ButtonGroup,
14-
ButtonToolbar,
15-
} from "@cocalc/frontend/antd-bootstrap";
12+
import { Button, ButtonToolbar } from "@cocalc/frontend/antd-bootstrap";
1613
import { Gap, Icon } from "@cocalc/frontend/components";
1714
import { useStudentProjectFunctionality } from "@cocalc/frontend/course";
1815
import { CustomSoftwareInfo } from "@cocalc/frontend/custom-software/info-bar";
@@ -22,6 +19,7 @@ import { labels } from "@cocalc/frontend/i18n";
2219
import { file_actions, ProjectActions } from "@cocalc/frontend/project_store";
2320
import * as misc from "@cocalc/util/misc";
2421
import { COLORS } from "@cocalc/util/theme";
22+
2523
import { useProjectContext } from "../context";
2624

2725
const ROW_INFO_STYLE = {
@@ -301,9 +299,9 @@ export const ActionBar: React.FC<Props> = (props: Props) => {
301299
action_buttons = [...ACTION_BUTTONS_MULTI];
302300
}
303301
return (
304-
<ButtonGroup>
302+
<Space.Compact>
305303
{action_buttons.map((v) => render_action_button(v))}
306-
</ButtonGroup>
304+
</Space.Compact>
307305
);
308306
}
309307

@@ -318,7 +316,7 @@ export const ActionBar: React.FC<Props> = (props: Props) => {
318316
return;
319317
}
320318
return (
321-
<ButtonGroup>
319+
<Space.Compact>
322320
<CustomSoftwareInfo
323321
project_id={props.project_id}
324322
images={props.images}
@@ -328,7 +326,7 @@ export const ActionBar: React.FC<Props> = (props: Props) => {
328326
show_custom_software_reset={!!props.show_custom_software_reset}
329327
project_is_running={!!props.project_is_running}
330328
/>
331-
</ButtonGroup>
329+
</Space.Compact>
332330
);
333331
} else {
334332
return render_action_buttons();
@@ -341,9 +339,9 @@ export const ActionBar: React.FC<Props> = (props: Props) => {
341339
<div style={{ flex: "1 0 auto" }}>
342340
<div ref={buttonRef} style={{ flex: "1 0 auto" }}>
343341
<ButtonToolbar style={{ whiteSpace: "nowrap", padding: "0" }}>
344-
<ButtonGroup>
342+
<Space.Compact>
345343
{props.project_is_running ? render_check_all_button() : undefined}
346-
</ButtonGroup>
344+
</Space.Compact>
347345
{render_button_area()}
348346
</ButtonToolbar>
349347
</div>

0 commit comments

Comments
 (0)