From c3d5f4cf57fdd1272994f0fabb6b576fc7c21839 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Wed, 16 Feb 2022 16:03:39 +0700 Subject: [PATCH] Breaking long words in comments. CSS optimize. (#1023) Signed-off-by: Alexander Platov --- .../src/components/UsersPopup.svelte | 6 +- packages/theme/styles/_layouts.scss | 5 +- packages/theme/styles/components.scss | 35 +++++ packages/theme/styles/popups.scss | 1 + .../src/components/EditVacancy.svelte | 41 +---- .../src/components/state/EditStatuses.svelte | 62 ++------ .../src/components/state/StatesEditor.svelte | 2 +- .../components/navigator/SpacePanel.svelte | 146 +++--------------- 8 files changed, 92 insertions(+), 206 deletions(-) diff --git a/packages/presentation/src/components/UsersPopup.svelte b/packages/presentation/src/components/UsersPopup.svelte index 2a1f2bd7c2..5c18fa2721 100644 --- a/packages/presentation/src/components/UsersPopup.svelte +++ b/packages/presentation/src/components/UsersPopup.svelte @@ -52,10 +52,12 @@
{#each objects as person} - {/each} diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index d382af1994..14724fe939 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -90,7 +90,10 @@ table { p:first-child { margin-block-start: 0; } // First and last padding p:last-child { margin-block-end: 0; } -.p-inline { line-height: 150%; } +.p-inline { + word-break: break-all; + line-height: 150%; +} /* Flex */ .flex { display: flex; } diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index af08ba63d4..b44c0a4cb0 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -151,6 +151,41 @@ } } + .ac-tabs { + display: flex; + align-items: center; + flex-shrink: 0; + flex-wrap: nowrap; + margin: 0 2.5rem; + min-width: 0; + height: 4.5rem; + border-bottom: 1px solid var(--theme-menu-divider); + + &__tab { + display: flex; + align-items: center; + min-width: 0; + height: 4.5rem; + font-weight: 500; + color: var(--theme-content-trans-color); + cursor: pointer; + user-select: none; + + &.selected { + border-top: .125rem solid transparent; + border-bottom: .125rem solid var(--theme-caption-color); + color: var(--theme-caption-color); + cursor: default; + } + } + .ac-tabs__tab + .ac-tabs__tab { margin-left: 2.5rem; } + + &__empty { + min-width: 2.5rem; + flex-grow: 1; + } + } + .ac-body { display: flex; flex-direction: column; diff --git a/packages/theme/styles/popups.scss b/packages/theme/styles/popups.scss index 556c226b70..0b355804ab 100644 --- a/packages/theme/styles/popups.scss +++ b/packages/theme/styles/popups.scss @@ -69,6 +69,7 @@ background-color: transparent; } } + &.withCheck { justify-content: space-between; } &:hover { color: var(--theme-caption-color); diff --git a/plugins/recruit-resources/src/components/EditVacancy.svelte b/plugins/recruit-resources/src/components/EditVacancy.svelte index ca46be421c..4c9af09b35 100644 --- a/plugins/recruit-resources/src/components/EditVacancy.svelte +++ b/plugins/recruit-resources/src/components/EditVacancy.svelte @@ -71,14 +71,14 @@
-
+
{#each tabs as tab, i} -
{ selected = i }}> -
{/each} -
+
{#if selected === 0} @@ -114,42 +114,13 @@
diff --git a/plugins/task-resources/src/components/state/EditStatuses.svelte b/plugins/task-resources/src/components/state/EditStatuses.svelte index 764d4832cc..567b604594 100644 --- a/plugins/task-resources/src/components/state/EditStatuses.svelte +++ b/plugins/task-resources/src/components/state/EditStatuses.svelte @@ -21,7 +21,7 @@ import type { Kanban, SpaceWithStates, State } from '@anticrm/task' import task from '@anticrm/task' import KanbanEditor from '../kanban/KanbanEditor.svelte' - import { Icon, IconClose, Label, showPopup } from '@anticrm/ui' + import { Icon, IconClose, Label, showPopup, ActionIcon, ScrollBox } from '@anticrm/ui' import { createEventDispatcher } from 'svelte' import workbench from '@anticrm/workbench' @@ -74,56 +74,26 @@ } -
{ dispatch('close') }}/> -
-
-
-
-
- +
{ dispatch('close') }}/> +
+
+
+
+
+ Manage application statuses within {#if spaceClassInstance}
-
{spaceInstance?.name}
+ {#if spaceInstance?.name }{spaceInstance?.name}{/if}
-
dispatch('close')}>
+
{ dispatch('close') }} />
-
- {#if kanban !== undefined} - deleteState(e.detail)} /> - {/if} +
+ + {#if kanban !== undefined} + deleteState(e.detail)} /> + {/if} +
- - diff --git a/plugins/task-resources/src/components/state/StatesEditor.svelte b/plugins/task-resources/src/components/state/StatesEditor.svelte index 9c8cac0480..99713a1a12 100644 --- a/plugins/task-resources/src/components/state/StatesEditor.svelte +++ b/plugins/task-resources/src/components/state/StatesEditor.svelte @@ -103,7 +103,7 @@ showPopup(ColorsPopup, {}, elements[i], onColorChange(state)) }} /> -
+
{ showPopup(StatusesPopup, { onDelete: () => dispatch('delete', { state }) }, ev.target, () => {}) diff --git a/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte b/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte index 0c458adad7..ac941ca664 100644 --- a/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte +++ b/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte @@ -19,7 +19,7 @@ import core from '@anticrm/core' import type { IntlString } from '@anticrm/platform' import { createQuery, getClient } from '@anticrm/presentation' - import { EditBox, Grid, Icon, IconClose, Label } from '@anticrm/ui' + import { EditBox, Grid, Icon, IconClose, Label, ActionIcon, Scroller } from '@anticrm/ui' import { createEventDispatcher } from 'svelte' export let _id: Ref @@ -53,131 +53,35 @@ -
{ dispatch('close') }}/> -
-
- -
-
{ dispatch('close') }}>
+
{ dispatch('close') }}/> +
+
+
+
+
+
+
{ dispatch('close') }} />
- -
+
{#each tabs as tab, i} -
{ selected = i }}> -
{/each} -
+
-
-
- {#if selected === 0} - {#if space} - - - - - - {/if} - {:else} - Members and other + + {#if selected === 0} + {#if space} + + + + + {/if} -
-
+ {:else} + Members and other + {/if} +
- - \ No newline at end of file