Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating home namespace list, enhancing the UI. #936

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/components/ServiceMapApp/WelcomeScreen.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
@use 'sass:color';

.wrapper {
display: flex;
justify-content: center;
flex-grow: 1;
width: 100%;
overflow: auto;
}

.content {
margin: 124px;
margin-top: 130px;
display: flex;
flex-direction: column;
align-items: center;
}

.logo {
Expand All @@ -24,7 +29,7 @@
}

.description {
margin: 25px 0 0;
margin: 25px 0 20px;
font-size: 14px;
line-height: 20px;
font-weight: 500;
Expand Down
11 changes: 6 additions & 5 deletions src/components/ServiceMapApp/WelcomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Spinner } from '@blueprintjs/core';
import { observer } from 'mobx-react';

import { NamespaceDescriptor } from '~/domain/namespaces';
import { NamespaceSelectorDropdown } from '../TopBar/NamespaceSelectorDropdown';

import { e2e } from '~e2e/client';

Expand All @@ -24,11 +25,11 @@ export const WelcomeScreen = observer(function WelcomeScreen(props: Props) {
<h1 className={css.title}>Welcome!</h1>
<p className={css.description}>To begin select one of the namespaces:</p>
{someNamespacesLoaded ? (
<ul className={css.namespacesList} {...e2e.attributes.ns.listSelector()}>
{props.namespaces.map(ns => (
<NamespaceItem key={ns.namespace} namespace={ns} onClick={props.onNamespaceChange} />
))}
</ul>
<NamespaceSelectorDropdown
namespaces={props.namespaces}
currentNamespace={null}
onChange={props.onNamespaceChange}
/>
) : (
<div className={css.spinnerWrapper}>
<Spinner size={48} intent="primary" />
Expand Down
12 changes: 7 additions & 5 deletions src/components/TopBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ export const TopBar = observer(function TopBar(props: Props) {
return (
<div className={css.topbar} {...e2e.attributes.topbar.selector()}>
<div className={css.left}>
<NamespaceSelectorDropdown
namespaces={props.namespaces}
currentNamespace={props.currentNamespace}
onChange={props.onNamespaceChange}
/>
{props.currentNamespace === null ? null : (
<NamespaceSelectorDropdown
namespaces={props.namespaces}
currentNamespace={props.currentNamespace}
onChange={props.onNamespaceChange}
/>
)}
{props.currentNamespace && RenderedFilters}
</div>
<div className={css.right}>
Expand Down
Loading