From d77c22689bc53e9e4d2fe1bb0ad9f99dd35ebcd0 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Tue, 23 Mar 2021 15:16:16 +0300 Subject: [PATCH] Fine-tuning Extensions view Signed-off-by: Alex Andreev --- .../components/+extensions/extensions.scss | 24 ++-- .../components/+extensions/extensions.tsx | 114 +++++++++--------- 2 files changed, 74 insertions(+), 64 deletions(-) diff --git a/src/renderer/components/+extensions/extensions.scss b/src/renderer/components/+extensions/extensions.scss index 86f9d7b232..13c3640259 100644 --- a/src/renderer/components/+extensions/extensions.scss +++ b/src/renderer/components/+extensions/extensions.scss @@ -1,10 +1,5 @@ .PageLayout.Extensions { $spacing: $padding * 2; - --width: 50%; - - h2 { - margin-bottom: $padding; - } .no-extensions { --flex-gap: #{$padding}; @@ -16,17 +11,28 @@ } .install-extension { - margin: $spacing * 2 0; + margin-bottom: $padding * 4; } .installed-extensions { --flex-gap: #{$spacing}; .extension { + --flex-gap: #{$padding / 2}; + padding: $padding $spacing; background: $layoutBackground; border-radius: $radius; + .contents { + padding-right: $padding * 2; + + .Badge { + font-size: smaller; + overflow: visible; + } + } + .actions > button:not(:last-child) { margin-right: $spacing / 2; } @@ -42,10 +48,8 @@ } } - .SearchInput { - --spacing: 10px; - - max-width: none; + .SearchInput > label .Icon { + height: 21px; // conform with icons within Install input } } diff --git a/src/renderer/components/+extensions/extensions.tsx b/src/renderer/components/+extensions/extensions.tsx index c14a6988b6..a9a81cc4ad 100644 --- a/src/renderer/components/+extensions/extensions.tsx +++ b/src/renderer/components/+extensions/extensions.tsx @@ -12,12 +12,12 @@ import { extensionLoader } from "../../../extensions/extension-loader"; import { extensionDisplayName, LensExtensionManifest, sanitizeExtensionName } from "../../../extensions/lens-extension"; import logger from "../../../main/logger"; import { prevDefault } from "../../utils"; +import { Badge } from "../badge"; import { Button } from "../button"; import { ConfirmDialog } from "../confirm-dialog"; import { Icon } from "../icon"; import { DropFileInput, Input, InputValidator, InputValidators, SearchInput } from "../input"; import { PageLayout } from "../layout/page-layout"; -import { SubTitle } from "../layout/sub-title"; import { Notifications } from "../notifications"; import { Spinner } from "../spinner/spinner"; import { TooltipPosition } from "../tooltip"; @@ -449,9 +449,11 @@ export class Extensions extends React.Component { return (
-
-
{name}
-
{version}
+
+
+
{name}
+ +

{description}

@@ -482,63 +484,67 @@ export class Extensions extends React.Component { } render() { - const topHeader =

Manage Lens Extensions

; + const topHeader =

Lens Extensions

; const { installPath } = this; return ( -

Lens Extensions

-
- Add new features and functionality via Lens Extensions. - Check out documentation to learn more or see the list of available extensions. -
- -
- -
- this.installPath = value} - onSubmit={this.installFromUrlOrPath} - iconLeft="link" - iconRight={ - - } - /> +
+

Extensions

+
+ Add new features and functionality via Lens Extensions. + Check out documentation to learn more or see the list of available extensions.
-
+
+

Install

+
+ this.installPath = value} + onSubmit={this.installFromUrlOrPath} + iconLeft="link" + iconRight={ + + } + /> +
+
-

Installed Extensions

-
- this.search = value} - /> - {extensionDiscovery.isLoaded ? this.renderExtensions() :
} -
+
+

Installed Extensions

+
+ this.search = value} + /> + {extensionDiscovery.isLoaded ? this.renderExtensions() :
} +
+
+ );