Skip to content

Commit

Permalink
[web] Display the change product link always
Browse files Browse the repository at this point in the history
Now that we are going to stop teleporting links to the Sidebar and start
using another location for placing the page related links, the "Change
product" action will always be displayed in the Sidebar since, at least
initially, we don't want to relate actions only to the Overview.
  • Loading branch information
dgdavid committed Apr 21, 2023
1 parent e403deb commit 1e79a2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions web/src/components/layout/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import React from "react";

import logoUrl from "~/assets/suse-horizontal-logo.svg";
import { createTeleporter } from "react-teleporter";
import { ChangeProductLink } from "~/components/software";
import { About, Disclosure, LogsButton, Sidebar, ShowLogButton, ShowTerminalButton } from "~/components/core";

const PageTitle = createTeleporter();
Expand Down Expand Up @@ -87,6 +88,7 @@ function Layout({ children }) {
<>
<PageOptions.Target />

<ChangeProductLink />
<Disclosure label="Diagnostic tools" data-keep-sidebar-open>
<ShowLogButton />
<LogsButton data-keep-sidebar-open="true" />
Expand Down
7 changes: 1 addition & 6 deletions web/src/components/overview/Overview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import React, { useState } from "react";
import { useSoftware } from "~/context/software";
import { Navigate } from "react-router-dom";

import { Page, PageOptions, InstallButton } from "~/components/core";
import { ChangeProductLink } from "~/components/software";
import { Page, InstallButton } from "~/components/core";
import {
L10nSection,
NetworkSection,
Expand All @@ -47,10 +46,6 @@ function Overview() {
icon="inventory_2"
action={<InstallButton onClick={() => setShowErrors(true)} />}
>
<PageOptions>
<ChangeProductLink />
</PageOptions>

<L10nSection />
<NetworkSection />
<StorageSection showErrors />
Expand Down
1 change: 0 additions & 1 deletion web/src/components/overview/Overview.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jest.mock("~/components/overview/StorageSection", () => mockComponent("Storage S
jest.mock("~/components/overview/NetworkSection", () => mockComponent("Network Section"));
jest.mock("~/components/overview/UsersSection", () => mockComponent("Users Section"));
jest.mock("~/components/overview/SoftwareSection", () => mockComponent("Software Section"));
jest.mock("~/components/core/PageOptions", () => mockComponent("PageOptions"));
jest.mock("~/components/core/InstallButton", () => mockComponent("Install Button"));

beforeEach(() => {
Expand Down

0 comments on commit 1e79a2d

Please sign in to comment.