From 074fa7dbc4d78c81c1cd38cf646aacc0ed229ee1 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Thu, 18 May 2023 19:13:35 -0700 Subject: [PATCH] UBER-87, TSK-1324: update icons and popups. (#3209) --- models/contact/src/index.ts | 2 + models/recruit/src/index.ts | 11 +- models/recruit/src/review.ts | 2 +- models/tracker/src/index.ts | 63 ++++--- .../src/components/DocPopup.svelte | 25 +-- .../src/components/NavLink.svelte | 13 +- .../src/components/ObjectPopup.svelte | 2 +- .../src/components/SpacesMultiPopup.svelte | 32 ++-- packages/theme/styles/_colors.scss | 24 ++- packages/theme/styles/_layouts.scss | 4 + packages/theme/styles/components.scss | 4 +- packages/theme/styles/popups.scss | 165 ++++++------------ packages/ui/src/components/ColorPopup.svelte | 32 ++-- .../src/components/DropdownLabelsPopup.svelte | 32 ++-- .../components/DropdownLabelsPopupIntl.svelte | 4 +- .../src/components/DropdownRecordPopup.svelte | 4 +- .../ui/src/components/EditWithIcon.svelte | 21 ++- packages/ui/src/components/ListView.svelte | 3 + packages/ui/src/components/Menu.svelte | 16 +- packages/ui/src/components/SearchEdit.svelte | 3 +- packages/ui/src/components/SelectPopup.svelte | 60 ++++--- packages/ui/src/components/icons/Check.svelte | 5 +- .../ui/src/components/icons/Delete.svelte | 12 +- .../ui/src/components/icons/Search.svelte | 4 +- .../src/components/internal/LangPopup.svelte | 9 +- plugins/contact-assets/assets/icons.svg | 25 ++- plugins/contact-assets/src/index.ts | 1 + .../src/components/AssigneeBox.svelte | 2 +- .../src/components/AssigneePopup.svelte | 50 ++++-- .../src/components/Avatar.svelte | 6 +- .../src/components/PersonContent.svelte | 15 +- .../src/components/UserBox.svelte | 2 +- .../src/components/UsersPopup.svelte | 12 +- .../src/components/icons/Company.svelte | 15 +- .../src/components/icons/Person.svelte | 6 +- plugins/contact/src/index.ts | 3 +- plugins/recruit-assets/assets/icons.svg | 26 ++- plugins/recruit-assets/src/index.ts | 4 +- .../src/components/VacancyCard.svelte | 2 +- .../src/components/icons/Company.svelte | 14 +- .../src/components/icons/Vacancy.svelte | 9 +- .../src/components/review/CreateReview.svelte | 2 + plugins/recruit/src/index.ts | 4 +- plugins/tags-assets/assets/icons.svg | 9 +- .../src/components/TagsPopup.svelte | 92 ++++------ plugins/task-assets/assets/icons.svg | 12 +- .../src/components/state/StatusesPopup.svelte | 9 +- plugins/tracker-assets/assets/icons.svg | 96 +++++----- plugins/tracker-assets/src/index.ts | 13 +- .../components/ComponentPresenter.svelte | 2 +- .../issues/IssueNotification.svelte | 3 +- .../issues/edit/CopyToClipboard.svelte | 5 +- .../milestones/MilestonePresenter.svelte | 2 +- .../templates/IssueTemplatePresenter.svelte | 2 +- plugins/tracker/src/index.ts | 5 +- plugins/view-assets/assets/icons.svg | 54 +++--- plugins/view-assets/src/index.ts | 3 + .../src/components/DocNavLink.svelte | 3 +- .../src/components/ValueSelector.svelte | 4 +- plugins/view/src/index.ts | 3 + tests/sanity/tests/tags.spec.ts | 2 +- tests/sanity/tests/tracker.utils.ts | 2 +- 62 files changed, 558 insertions(+), 513 deletions(-) diff --git a/models/contact/src/index.ts b/models/contact/src/index.ts index 04662b5d9a..9361f7a1a1 100644 --- a/models/contact/src/index.ts +++ b/models/contact/src/index.ts @@ -615,6 +615,7 @@ export function createModel (builder: Builder): void { { action: contact.actionImpl.KickEmployee, label: contact.string.KickEmployee, + icon: contact.icon.KickUser, query: { active: true }, @@ -634,6 +635,7 @@ export function createModel (builder: Builder): void { { action: contact.actionImpl.KickEmployee, label: contact.string.DeleteEmployee, + icon: contact.icon.KickUser, query: { active: false }, diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index dec45e10a5..92588e6344 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -296,7 +296,7 @@ export function createModel (builder: Builder): void { { id: talentsId, component: workbench.component.SpecialView, - icon: contact.icon.Person, + icon: recruit.icon.Talents, label: recruit.string.Talents, componentProps: { _class: recruit.mixin.Candidate, @@ -873,7 +873,7 @@ export function createModel (builder: Builder): void { createAction(builder, { label: recruit.string.EditVacancy, - icon: recruit.icon.Vacancy, + icon: view.icon.Edit, action: view.actionImpl.ShowPanel, actionProps: { component: recruit.component.EditVacancy, @@ -1013,7 +1013,6 @@ export function createModel (builder: Builder): void { group: 'edit' } }) - // TODO: fix icons createAction( builder, { @@ -1022,7 +1021,7 @@ export function createModel (builder: Builder): void { textProvider: recruit.function.IdProvider }, label: recruit.string.CopyId, - icon: recruit.icon.Application, + icon: view.icon.CopyId, keyBinding: [], input: 'none', category: recruit.category.Recruit, @@ -1043,7 +1042,7 @@ export function createModel (builder: Builder): void { textProvider: recruit.function.GetObjectLink }, label: recruit.string.CopyLink, - icon: recruit.icon.Application, + icon: view.icon.CopyLink, keyBinding: [], input: 'none', category: recruit.category.Recruit, @@ -1064,7 +1063,7 @@ export function createModel (builder: Builder): void { textProvider: recruit.function.GetObjectLink }, label: recruit.string.CopyLink, - icon: recruit.icon.Application, + icon: view.icon.CopyLink, keyBinding: [], input: 'none', category: recruit.category.Recruit, diff --git a/models/recruit/src/review.ts b/models/recruit/src/review.ts index 8fb186ec33..d25f71dd1b 100644 --- a/models/recruit/src/review.ts +++ b/models/recruit/src/review.ts @@ -86,7 +86,7 @@ export function createReviewModel (builder: Builder): void { } }, label: recruit.string.CreateReview, - icon: recruit.icon.Create, + icon: recruit.icon.Schedule, input: 'focus', category: recruit.category.Recruit, target: recruit.mixin.Candidate, diff --git a/models/tracker/src/index.ts b/models/tracker/src/index.ts index 70111f7ecb..c080f9aaed 100644 --- a/models/tracker/src/index.ts +++ b/models/tracker/src/index.ts @@ -1184,7 +1184,7 @@ export function createModel (builder: Builder): void { element: 'top' }, label: tracker.string.NewIssue, - icon: tracker.icon.Issue, + icon: tracker.icon.NewIssue, keyBinding: ['keyC'], input: 'none', category: tracker.category.Tracker, @@ -1211,7 +1211,7 @@ export function createModel (builder: Builder): void { } }, label: tracker.string.NewSubIssue, - icon: tracker.icon.Issue, + icon: tracker.icon.Subissue, keyBinding: [], input: 'focus', category: tracker.category.Tracker, @@ -1225,32 +1225,6 @@ export function createModel (builder: Builder): void { tracker.action.NewSubIssue ) - createAction( - builder, - { - action: view.actionImpl.ShowPopup, - actionProps: { - component: tracker.component.CreateIssue, - element: 'top', - fillProps: { - _object: 'relatedTo', - space: 'space' - } - }, - label: tracker.string.NewRelatedIssue, - icon: tracker.icon.Issue, - keyBinding: [], - input: 'focus', - category: tracker.category.Tracker, - target: core.class.Doc, - context: { - mode: ['context', 'browser', 'editor'], - group: 'associate' - } - }, - tracker.action.NewRelatedIssue - ) - createAction( builder, { @@ -1277,6 +1251,32 @@ export function createModel (builder: Builder): void { tracker.action.SetParent ) + createAction( + builder, + { + action: view.actionImpl.ShowPopup, + actionProps: { + component: tracker.component.CreateIssue, + element: 'top', + fillProps: { + _object: 'relatedTo', + space: 'space' + } + }, + label: tracker.string.NewRelatedIssue, + icon: tracker.icon.NewIssue, + keyBinding: [], + input: 'focus', + category: tracker.category.Tracker, + target: core.class.Doc, + context: { + mode: ['context', 'browser', 'editor'], + group: 'associate' + } + }, + tracker.action.NewRelatedIssue + ) + createAction(builder, { action: view.actionImpl.ShowPopup, actionPopup: tracker.component.SetParentIssueActionPopup, @@ -1617,7 +1617,7 @@ export function createModel (builder: Builder): void { textProvider: tracker.function.GetIssueId }, label: tracker.string.CopyIssueId, - icon: tracker.icon.CopyID, + icon: view.icon.CopyId, keyBinding: [], input: 'focus', category: tracker.category.Tracker, @@ -1659,7 +1659,7 @@ export function createModel (builder: Builder): void { textProvider: tracker.function.GetIssueLink }, label: tracker.string.CopyIssueUrl, - icon: tracker.icon.CopyURL, + icon: view.icon.CopyLink, keyBinding: [], input: 'focus', category: tracker.category.Tracker, @@ -1690,7 +1690,6 @@ export function createModel (builder: Builder): void { }, tracker.action.MoveToProject ) - // TODO: fix icon createAction( builder, { @@ -1700,7 +1699,7 @@ export function createModel (builder: Builder): void { attribute: '' }, label: tracker.string.Relations, - icon: tracker.icon.Document, + icon: tracker.icon.Relations, keyBinding: [], input: 'focus', category: tracker.category.Tracker, diff --git a/packages/presentation/src/components/DocPopup.svelte b/packages/presentation/src/components/DocPopup.svelte index 2ded2134aa..7ca29add39 100644 --- a/packages/presentation/src/components/DocPopup.svelte +++ b/packages/presentation/src/components/DocPopup.svelte @@ -17,11 +17,12 @@ import type { IntlString } from '@hcengineering/platform' import { Button, - EditBox, + EditWithIcon, FocusHandler, Icon, IconAdd, IconCheck, + IconSearch, ListView, createFocusManager, deviceOptionsStore, @@ -48,7 +49,7 @@ export let ignoreObjects: Ref[] = [] export let shadows: boolean = true export let width: 'medium' | 'large' | 'full' = 'medium' - export let size: 'small' | 'medium' | 'large' = 'small' + export let size: 'small' | 'medium' | 'large' = 'large' export let searchField: string = 'name' export let noSearchField: boolean = false @@ -190,9 +191,10 @@ }} >
- dispatch('search', search)} @@ -200,7 +202,7 @@ {placeholder} /> {#if create !== undefined} -
+
@@ -261,6 +263,7 @@ {#if cHeight === -1}
{/if} + diff --git a/plugins/task-assets/assets/icons.svg b/plugins/task-assets/assets/icons.svg index b5df454c64..df93685155 100644 --- a/plugins/task-assets/assets/icons.svg +++ b/plugins/task-assets/assets/icons.svg @@ -15,13 +15,13 @@ - - - + + + - - - + + + diff --git a/plugins/task-resources/src/components/state/StatusesPopup.svelte b/plugins/task-resources/src/components/state/StatusesPopup.svelte index 8ddf772e3b..750e5e4706 100644 --- a/plugins/task-resources/src/components/state/StatusesPopup.svelte +++ b/plugins/task-resources/src/components/state/StatusesPopup.svelte @@ -23,18 +23,19 @@
-
+
+
{ dispatch('close') onDelete() }} > -
+
-
+
diff --git a/plugins/tracker-assets/assets/icons.svg b/plugins/tracker-assets/assets/icons.svg index cda57ee9c5..0ee218f69e 100644 --- a/plugins/tracker-assets/assets/icons.svg +++ b/plugins/tracker-assets/assets/icons.svg @@ -15,23 +15,34 @@ - - - - - + + + + + + + + + + + + + + + + - - - + + + @@ -53,12 +64,6 @@ - - - - - - @@ -69,8 +74,11 @@ - - + + + + + @@ -89,23 +97,23 @@ - - + + - - - + + + - - - + + + - - - + + + @@ -155,35 +163,29 @@ - - - - - - - - - - - - + + + - - + + + - - + - - - + + + + + + + - diff --git a/plugins/tracker-assets/src/index.ts b/plugins/tracker-assets/src/index.ts index d7baf9d064..423e88d744 100644 --- a/plugins/tracker-assets/src/index.ts +++ b/plugins/tracker-assets/src/index.ts @@ -21,20 +21,21 @@ loadMetadata(tracker.icon, { TrackerApplication: `${icons}#tracker`, Component: `${icons}#component`, Issue: `${icons}#issue`, + Subissue: `${icons}#sub-issue`, Project: `${icons}#project`, - Document: `${icons}#document`, + Relations: `${icons}#relations`, Inbox: `${icons}#inbox`, MyIssues: `${icons}#myissues`, Views: `${icons}#views`, Issues: `${icons}#issues`, Components: `${icons}#components`, - NewIssue: `${icons}#newissue`, + NewIssue: `${icons}#new-issue`, Magnifier: `${icons}#magnifier`, Home: `${icons}#home`, RedCircle: `${icons}#red-circle`, Labels: `${icons}#priority-nopriority`, // TODO: add icon - DueDate: `${icons}#inbox`, // TODO: add icon - Parent: `${icons}#myissues`, // TODO: add icon + DueDate: `${icons}#dueDate`, // TODO: add icon + Parent: `${icons}#parent-issue`, // TODO: add icon Milestone: `${icons}#milestone`, IssueTemplates: `${icons}#issuetemplates`, Scrum: `${icons}#scrum`, @@ -68,12 +69,10 @@ loadMetadata(tracker.icon, { MilestoneStatusCompleted: `${icons}#component-status-completed`, MilestoneStatusCanceled: `${icons}#component-status-canceled`, - CopyID: `${icons}#copyID`, - CopyURL: `${icons}#copyURL`, CopyBranch: `${icons}#copyBranch`, Duplicate: `${icons}#duplicate`, TimeReport: `${icons}#timeReport`, - Estimation: `${icons}#timeReport`, + Estimation: `${icons}#estimation`, Timeline: `${icons}#timeline` }) diff --git a/plugins/tracker-resources/src/components/components/ComponentPresenter.svelte b/plugins/tracker-resources/src/components/components/ComponentPresenter.svelte index 796efc9cfb..be94c1b068 100644 --- a/plugins/tracker-resources/src/components/components/ComponentPresenter.svelte +++ b/plugins/tracker-resources/src/components/components/ComponentPresenter.svelte @@ -49,7 +49,7 @@
{/if} - + {value.label}
diff --git a/plugins/tracker-resources/src/components/issues/IssueNotification.svelte b/plugins/tracker-resources/src/components/issues/IssueNotification.svelte index a8357334c0..6b48b5693f 100644 --- a/plugins/tracker-resources/src/components/issues/IssueNotification.svelte +++ b/plugins/tracker-resources/src/components/issues/IssueNotification.svelte @@ -1,6 +1,7 @@ {#if issueUrl} - + {/if} {#if issueId} - + {/if} {#if issueBranch} diff --git a/plugins/tracker-resources/src/components/milestones/MilestonePresenter.svelte b/plugins/tracker-resources/src/components/milestones/MilestonePresenter.svelte index 1e775085fc..f8ccf47479 100644 --- a/plugins/tracker-resources/src/components/milestones/MilestonePresenter.svelte +++ b/plugins/tracker-resources/src/components/milestones/MilestonePresenter.svelte @@ -49,7 +49,7 @@
{/if} - + {value.label}
diff --git a/plugins/tracker-resources/src/components/templates/IssueTemplatePresenter.svelte b/plugins/tracker-resources/src/components/templates/IssueTemplatePresenter.svelte index 12ec97f34c..3855349ee8 100644 --- a/plugins/tracker-resources/src/components/templates/IssueTemplatePresenter.svelte +++ b/plugins/tracker-resources/src/components/templates/IssueTemplatePresenter.svelte @@ -39,7 +39,7 @@ {#if !inline && shouldShowAvatar}
- +
{/if} diff --git a/plugins/tracker/src/index.ts b/plugins/tracker/src/index.ts index 37076f765f..9dc29b43a4 100644 --- a/plugins/tracker/src/index.ts +++ b/plugins/tracker/src/index.ts @@ -424,8 +424,9 @@ export default plugin(trackerId, { TrackerApplication: '' as Asset, Component: '' as Asset, Issue: '' as Asset, + Subissue: '' as Asset, Project: '' as Asset, - Document: '' as Asset, + Relations: '' as Asset, Inbox: '' as Asset, MyIssues: '' as Asset, Views: '' as Asset, @@ -470,8 +471,6 @@ export default plugin(trackerId, { MilestoneStatusCompleted: '' as Asset, MilestoneStatusCanceled: '' as Asset, - CopyID: '' as Asset, - CopyURL: '' as Asset, CopyBranch: '' as Asset, Duplicate: '' as Asset, diff --git a/plugins/view-assets/assets/icons.svg b/plugins/view-assets/assets/icons.svg index 1b967e306d..33a58de170 100644 --- a/plugins/view-assets/assets/icons.svg +++ b/plugins/view-assets/assets/icons.svg @@ -26,34 +26,49 @@ - - + + + + - - - - + + + + - + - - - + + - - - + + + - - - + + + + + + + + + + + + + + + + + - + @@ -65,9 +80,8 @@ - - - + + diff --git a/plugins/view-assets/src/index.ts b/plugins/view-assets/src/index.ts index 15db7b3057..942723c54d 100644 --- a/plugins/view-assets/src/index.ts +++ b/plugins/view-assets/src/index.ts @@ -28,6 +28,9 @@ loadMetadata(view.icon, { Archive: `${icons}#archive`, Statuses: `${icons}#statuses`, Open: `${icons}#open`, + Edit: `${icons}#edit`, + CopyId: `${icons}#copyId`, + CopyLink: `${icons}#copyLink`, Setting: `${icons}#setting`, ArrowRight: `${icons}#arrow-right`, Views: `${icons}#views`, diff --git a/plugins/view-resources/src/components/DocNavLink.svelte b/plugins/view-resources/src/components/DocNavLink.svelte index 74b12af30b..320059c474 100644 --- a/plugins/view-resources/src/components/DocNavLink.svelte +++ b/plugins/view-resources/src/components/DocNavLink.svelte @@ -28,6 +28,7 @@ export let component: AnyComponent = view.component.EditDoc export let props: Record = {} export let shrink: number = 0 + export let accent: boolean = false const client = getClient() const hierarchy = client.getHierarchy() @@ -49,4 +50,4 @@ $: if (object !== undefined) getHref(object) - + diff --git a/plugins/view-resources/src/components/ValueSelector.svelte b/plugins/view-resources/src/components/ValueSelector.svelte index 578f4d41a4..8618dfaeed 100644 --- a/plugins/view-resources/src/components/ValueSelector.svelte +++ b/plugins/view-resources/src/components/ValueSelector.svelte @@ -152,13 +152,13 @@ on:changeContent > -
+
diff --git a/plugins/view/src/index.ts b/plugins/view/src/index.ts index d3ea464309..2e7adad58f 100644 --- a/plugins/view/src/index.ts +++ b/plugins/view/src/index.ts @@ -739,6 +739,9 @@ const view = plugin(viewId, { Statuses: '' as Asset, Setting: '' as Asset, Open: '' as Asset, + Edit: '' as Asset, + CopyId: '' as Asset, + CopyLink: '' as Asset, ArrowRight: '' as Asset, Views: '' as Asset, Pin: '' as Asset, diff --git a/tests/sanity/tests/tags.spec.ts b/tests/sanity/tests/tags.spec.ts index d6c1ccacb6..cec5db288e 100644 --- a/tests/sanity/tests/tags.spec.ts +++ b/tests/sanity/tests/tags.spec.ts @@ -30,7 +30,7 @@ test.describe('recruit tests', () => { // Click .ml-4 .tooltip-trigger .flex-center await page.click('button:has-text("Skills")') // Click text=Add/Create Skill Suggested Cancel >> button - await page.click('.buttons-group button:nth-child(3)') + await page.click('.header > button:nth-child(3)') // Fill [placeholder="Please\ type\ Skill\ title"] await page.fill('[placeholder="Please\\ type\\ \\ title"]', 's1') // Click text=Create Skill s1 Please type description here Category Other Create Cancel >> button diff --git a/tests/sanity/tests/tracker.utils.ts b/tests/sanity/tests/tracker.utils.ts index d5f6ecb3e4..20d5cc6906 100644 --- a/tests/sanity/tests/tracker.utils.ts +++ b/tests/sanity/tests/tracker.utils.ts @@ -127,7 +127,7 @@ export async function createSubissue (page: Page, props: IssueProps): Promise { await page.click('button:has-text("New issue")') await page.click('button:has-text("Labels")') - await page.click('.buttons-group >> button >> nth=-1') + await page.click('button:nth-child(3)') await page.fill('[id="tags:string:AddTag"] >> input >> nth=0', label) await page.click('[id="tags:string:AddTag"] >> button:has-text("Create")') await page.waitForSelector('form.antiCard[id="tags:string:AddTag"]', { state: 'detached' })