Skip to content

Commit

Permalink
Removed the options for showing logs and terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed May 16, 2024
1 parent fabb88e commit 0bd0fa1
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 213 deletions.
61 changes: 0 additions & 61 deletions web/src/components/core/ShowLogButton.jsx

This file was deleted.

44 changes: 0 additions & 44 deletions web/src/components/core/ShowLogButton.test.jsx

This file was deleted.

54 changes: 0 additions & 54 deletions web/src/components/core/ShowTerminalButton.jsx

This file was deleted.

39 changes: 0 additions & 39 deletions web/src/components/core/ShowTerminalButton.test.jsx

This file was deleted.

11 changes: 2 additions & 9 deletions web/src/components/core/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ import { InstallerKeymapSwitcher, InstallerLocaleSwitcher } from "~/components/l
import {
About,
Disclosure,
// FIXME: unify names here by renaming LogsButton -> LogButton or ShowLogButton -> ShowLogsButton
LogsButton,
ShowLogButton,
ShowTerminalButton,
} from "~/components/core";
import { noop } from "~/utils";
import { _ } from "~/i18n";
Expand All @@ -47,7 +44,7 @@ import useNodeSiblings from "~/hooks/useNodeSiblings";
*
* @param {SidebarProps}
*/
export default function Sidebar ({ isOpen, onClose = noop, children }) {
export default function Sidebar({ isOpen, onClose = noop, children }) {
const asideRef = useRef(null);
const closeButtonRef = useRef(null);
const [addAttribute, removeAttribute] = useNodeSiblings(asideRef.current);
Expand Down Expand Up @@ -136,11 +133,7 @@ export default function Sidebar ({ isOpen, onClose = noop, children }) {

<div className="flex-stack justify-between" onClick={onClick}>
<div className="flex-stack">
<Disclosure label={_("Diagnostic tools")} data-keep-sidebar-open>
<ShowLogButton />
<LogsButton data-keep-sidebar-open="true" />
<ShowTerminalButton />
</Disclosure>
<LogsButton data-keep-sidebar-open="true" />
{children}
<About />
</div>
Expand Down
4 changes: 0 additions & 4 deletions web/src/components/core/Sidebar.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import { If, Sidebar } from "~/components/core";
// Mock some components
jest.mock("~/components/core/About", () => () => <div>About link mock</div>);
jest.mock("~/components/core/LogsButton", () => () => <div>LogsButton mock</div>);
jest.mock("~/components/core/ShowLogButton", () => () => <div>ShowLogButton mock</div>);
jest.mock("~/components/core/ShowTerminalButton", () => () => <div>ShowTerminalButton mock</div>);
jest.mock("~/components/l10n/InstallerKeymapSwitcher", () => () => <div>Installer keymap switcher mock</div>);
jest.mock("~/components/l10n/InstallerLocaleSwitcher", () => () => <div>Installer locale switcher mock</div>);

Expand All @@ -51,8 +49,6 @@ it("renders expected options", () => {
screen.getByText("Installer keymap switcher mock");
screen.getByText("Installer locale switcher mock");
screen.getByText("LogsButton mock");
screen.getByText("ShowLogButton mock");
screen.getByText("ShowTerminalButton mock");
screen.getByText("About link mock");
});

Expand Down
2 changes: 0 additions & 2 deletions web/src/components/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ export { default as LoginPage } from "./LoginPage";
export { default as LogsButton } from "./LogsButton";
export { default as FileViewer } from "./FileViewer";
export { default as RowActions } from "./RowActions";
export { default as ShowLogButton } from "./ShowLogButton";
export { default as Page } from "./Page";
export { default as PasswordAndConfirmationInput } from "./PasswordAndConfirmationInput";
export { default as Popup } from "./Popup";
export { default as ProgressReport } from "./ProgressReport";
export { default as ProgressText } from "./ProgressText";
export { default as ValidationErrors } from "./ValidationErrors";
export { default as Tip } from "./Tip";
export { default as ShowTerminalButton } from "./ShowTerminalButton";
export { default as NumericTextInput } from "./NumericTextInput";
export { default as PasswordInput } from "./PasswordInput";
export { default as Selector } from "./Selector";
Expand Down

0 comments on commit 0bd0fa1

Please sign in to comment.