From 7e0b60ee0c0aa4b9f0da7d837069ebd5d81d72fb Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Mon, 17 Feb 2025 19:34:24 +0400 Subject: [PATCH 01/14] uberf-9394: adjust readme to account changes (#8030) Signed-off-by: Alexey Zinoviev --- README.md | 8 +++----- scripts/create-workspace.sh | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3fb5866445..48d5b15082 100644 --- a/README.md +++ b/README.md @@ -134,12 +134,10 @@ Before you can begin, you need to create a workspace and an account and associat ```bash cd ./tool # dev/tool in the repository root -rushx run-local create-workspace ws1 -w DevWorkspace # Create workspace rushx run-local create-account user1 -p 1234 -f John -l Appleseed # Create account -rushx run-local configure ws1 --list --enable '*' # Enable all modules, even if they are not yet intended to be used by a wide audience. -rushx run-local assign-workspace user1 ws1 # Assign workspace to user. -rushx run-local confirm-email user1 # To allow the creation of additional test workspaces. - +rushx run-local create-workspace ws1 email:user1 # Create workspace +rushx run-local configure ws1 --list --enable '*' # Enable all modules, even if they are not yet intended to be used by a wide audience +rushx run-local assign-workspace user1 ws1 # Assign user to workspace ``` Alternatively, you can just execute: diff --git a/scripts/create-workspace.sh b/scripts/create-workspace.sh index e61d44333a..0b2b675ec2 100644 --- a/scripts/create-workspace.sh +++ b/scripts/create-workspace.sh @@ -1,6 +1,5 @@ cd ./dev/tool -rushx run-local create-workspace ws1 -w DevWorkspace # Create workspace rushx run-local create-account user1 -p 1234 -f John -l Appleseed # Create account +rushx run-local create-workspace ws1 email:user1 rushx run-local configure ws1 --list --enable '*' # Enable all modules, even if they are not yet intended to be used by a wide audience. -rushx run-local assign-workspace user1 ws1 # Assign workspace to user. -rushx run-local confirm-email user1 # To allow the creation of additional test workspaces. \ No newline at end of file +rushx run-local assign-workspace user1 ws1 # Assign workspace to user. \ No newline at end of file From f65770f40a97b0ad71711422630a001bd7b6f0c9 Mon Sep 17 00:00:00 2001 From: Victor Ilyushchenko Date: Mon, 17 Feb 2025 21:47:07 +0300 Subject: [PATCH 02/14] EQMS-1445: Fixed qms doc commments theme styling (#8031) Signed-off-by: Victor Ilyushchenko --- packages/theme/styles/_colors.scss | 6 +++--- packages/theme/styles/_text-editor.scss | 4 +++- plugins/controlled-documents-assets/assets/icons.svg | 4 ++-- .../controlled-documents-resources/src/styles/_colors.scss | 6 ++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/theme/styles/_colors.scss b/packages/theme/styles/_colors.scss index 3db6a2b09b..95d89fba05 100644 --- a/packages/theme/styles/_colors.scss +++ b/packages/theme/styles/_colors.scss @@ -68,9 +68,9 @@ --text-editor-selected-node-background: rgba(43, 81, 144, 0.1); --text-editor-selected-node-color: #93CAF3; - --text-editor-highlighted-node-warning-active-background-color: #F2D7AE; - --text-editor-highlighted-node-warning-background-color: #F8EBD7; - --text-editor-highlighted-node-warning-border-color: #DE9B35; + --text-editor-highlighted-node-warning-active-background-color: rgba(255, 203, 0, .24); + --text-editor-highlighted-node-warning-background-color: rgba(255, 203, 0, .12); + --text-editor-highlighted-node-warning-border-color: rgba(255, 203, 0, .35); --text-editor-highlighted-node-add-background-color: #DAEDDC; --text-editor-highlighted-node-add-font-color: #1C4220; diff --git a/packages/theme/styles/_text-editor.scss b/packages/theme/styles/_text-editor.scss index c546f3cebf..20f56a6045 100644 --- a/packages/theme/styles/_text-editor.scss +++ b/packages/theme/styles/_text-editor.scss @@ -323,7 +323,9 @@ .text-editor-highlighted-node-warning { background-color: var(--text-editor-highlighted-node-warning-background-color); - border-bottom: 0.0625rem solid var(--text-editor-highlighted-node-warning-border-color); + border-bottom: 2px solid var(--text-editor-highlighted-node-warning-border-color); + padding-bottom: 2px; + transition: background 0.2s ease, border 0.2s ease; &.text-editor-highlighted-node-selected, &:hover { background-color: var(--text-editor-highlighted-node-warning-active-background-color); diff --git a/plugins/controlled-documents-assets/assets/icons.svg b/plugins/controlled-documents-assets/assets/icons.svg index 83134837a7..e80406dd60 100644 --- a/plugins/controlled-documents-assets/assets/icons.svg +++ b/plugins/controlled-documents-assets/assets/icons.svg @@ -1,7 +1,7 @@ - - + + diff --git a/plugins/controlled-documents-resources/src/styles/_colors.scss b/plugins/controlled-documents-resources/src/styles/_colors.scss index 4d0e1ef26a..44e6db6f7a 100644 --- a/plugins/controlled-documents-resources/src/styles/_colors.scss +++ b/plugins/controlled-documents-resources/src/styles/_colors.scss @@ -17,8 +17,7 @@ .theme-dark { --theme-docs-contrast-color: #ffffff; --theme-docs-description-border-color: rgba(0, 0, 0, 0.2); - --theme-docs-frozen-description-color: #e7f2f3; - --theme-docs-comment-highlighted-color: #fefbf1; + --theme-docs-comment-highlighted-color: var(--theme-comp-header-color); --theme-docs-warning-color: rgba(222, 155, 53, 0.08); --theme-docs-warning-icon-color: #d27540; --theme-docs-accepted-color: #38833f; @@ -28,8 +27,7 @@ .theme-light { --theme-docs-contrast-color: #000000; --theme-docs-description-border-color: rgba(0, 0, 0, 0.2); - --theme-docs-frozen-description-color: #e7f2f3; - --theme-docs-comment-highlighted-color: #fefbf1; + --theme-docs-comment-highlighted-color: var(--theme-comp-header-color); --theme-docs-warning-color: rgba(222, 155, 53, 0.08); --theme-docs-warning-icon-color: #d27540; --theme-docs-accepted-color: #38833f; From f86beb013899f8feb35fcaac565e612e864b47b2 Mon Sep 17 00:00:00 2001 From: Artyom Savchenko Date: Tue, 18 Feb 2025 12:47:50 +0700 Subject: [PATCH 03/14] UBERF-9297: Fix space selection for emails (#8035) Signed-off-by: Artem Savchenko --- models/my-space/src/index.ts | 3 +++ plugins/mail-resources/src/components/CreateMail.svelte | 5 +++-- .../src/components/SpecialView.svelte | 8 +++++--- .../workbench-resources/src/components/Workbench.svelte | 3 ++- plugins/workbench/src/index.ts | 9 +++++++++ rush.json | 2 +- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/models/my-space/src/index.ts b/models/my-space/src/index.ts index 4cb8f3de63..2bcd483d8f 100644 --- a/models/my-space/src/index.ts +++ b/models/my-space/src/index.ts @@ -52,6 +52,9 @@ export function createModel (builder: Builder): void { label: mySpace.string.Mail, createLabel: mail.string.CreateMail, createComponent: mail.component.CreateMail + }, + queryOptions: { + filterBySpace: true } } ] diff --git a/plugins/mail-resources/src/components/CreateMail.svelte b/plugins/mail-resources/src/components/CreateMail.svelte index 426979dc43..62451f2132 100644 --- a/plugins/mail-resources/src/components/CreateMail.svelte +++ b/plugins/mail-resources/src/components/CreateMail.svelte @@ -15,7 +15,7 @@ // -->
+
{#if $isEditable} + {#if $controlledDocument.state === DocumentState.Obsolete} +
+ {#each { length: 24 } as _, i} +
+ {/each} +
+ {/if} diff --git a/plugins/controlled-documents-resources/src/components/print/DocumentPrintTitlePage.svelte b/plugins/controlled-documents-resources/src/components/print/DocumentPrintTitlePage.svelte index a6dade36ef..f9f7654b12 100644 --- a/plugins/controlled-documents-resources/src/components/print/DocumentPrintTitlePage.svelte +++ b/plugins/controlled-documents-resources/src/components/print/DocumentPrintTitlePage.svelte @@ -54,7 +54,7 @@ $controlledDocument != null && (isOrgSpace ? $controlledDocument.state !== DocumentState.Effective - : ![DocumentState.Effective, DocumentState.Obsolete, DocumentState.Archived].includes($controlledDocument.state)) + : ![DocumentState.Effective, DocumentState.Archived].includes($controlledDocument.state)) {#if $controlledDocument !== null} From d1db28b0a9b716fb07b513cd8fa82f9279fc02d3 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Tue, 18 Feb 2025 16:49:40 +0500 Subject: [PATCH 06/14] Card fixes (#8042) * Cards fixes Signed-off-by: Denis Bykhov * Fix Signed-off-by: Denis Bykhov --------- Signed-off-by: Denis Bykhov --- models/server-card/src/index.ts | 9 ++++ .../src/components/TagsEditor.svelte | 31 ++++++++---- .../components/settings/GeneralSection.svelte | 20 +++++++- .../settings/ManageMasterTagsContent.svelte | 12 ++--- plugins/card-resources/src/utils.ts | 49 +++---------------- server-plugins/card-resources/src/index.ts | 28 +++++++++-- server-plugins/card/src/index.ts | 3 +- 7 files changed, 86 insertions(+), 66 deletions(-) diff --git a/models/server-card/src/index.ts b/models/server-card/src/index.ts index f26ef63727..9fe22a9a47 100644 --- a/models/server-card/src/index.ts +++ b/models/server-card/src/index.ts @@ -32,6 +32,15 @@ export function createModel (builder: Builder): void { } }) + builder.createDoc(serverCore.class.Trigger, core.space.Model, { + trigger: serverCard.trigger.OnMasterTagRemove, + isAsync: true, + txMatch: { + _class: core.class.TxRemoveDoc, + objectClass: card.class.MasterTag + } + }) + builder.mixin(card.class.Card, core.class.Class, serverCore.mixin.SearchPresenter, { searchIcon: card.icon.Card, title: [['title']] diff --git a/plugins/card-resources/src/components/TagsEditor.svelte b/plugins/card-resources/src/components/TagsEditor.svelte index e60d0fa236..6a5ebc9d6c 100644 --- a/plugins/card-resources/src/components/TagsEditor.svelte +++ b/plugins/card-resources/src/components/TagsEditor.svelte @@ -16,21 +16,20 @@ --> -
+{#if step === OtpLoginSteps.Email} + +{/if} + +{#if step === OtpLoginSteps.Otp && object.username !== ''} + +{/if} + +
+ +
+ + diff --git a/plugins/login-resources/src/plugin.ts b/plugins/login-resources/src/plugin.ts index 16d4b05e91..fe80a46861 100644 --- a/plugins/login-resources/src/plugin.ts +++ b/plugins/login-resources/src/plugin.ts @@ -67,6 +67,8 @@ export default mergeIds(loginId, login, { SentTo: '' as IntlString, CanFindCode: '' as IntlString, LoginWithCode: '' as IntlString, - LoginWithPassword: '' as IntlString + LoginWithPassword: '' as IntlString, + SignUpWithCode: '' as IntlString, + SignUpWithPassword: '' as IntlString } }) diff --git a/qms-tests/sanity/tests/login/registration.spec.ts b/qms-tests/sanity/tests/login/registration.spec.ts index 7091c1dc33..e4a5ec011e 100644 --- a/qms-tests/sanity/tests/login/registration.spec.ts +++ b/qms-tests/sanity/tests/login/registration.spec.ts @@ -32,7 +32,7 @@ test.describe('Registration tests', () => { await loginPage.buttonSignUp.click() const signupPage = new SignupPage(page) - await signupPage.signup(signUpUserData) + await signupPage.signupPwd(signUpUserData) await attachScreenshot('TESTS-143_registration.png', page) @@ -69,7 +69,7 @@ test.describe('Registration tests', () => { await loginPage.buttonSignUp.click() const signupPage = new SignupPage(page) - await signupPage.signup(signUpUserData) + await signupPage.signupPwd(signUpUserData) await signupPage.buttonSignUp.click() await expect(signupPage.textError).toHaveText('Account already exists') diff --git a/qms-tests/sanity/tests/model/signup-page.ts b/qms-tests/sanity/tests/model/signup-page.ts index 4dddb3b1f4..2f964b762a 100644 --- a/qms-tests/sanity/tests/model/signup-page.ts +++ b/qms-tests/sanity/tests/model/signup-page.ts @@ -10,6 +10,7 @@ export class SignupPage { readonly inputRepeatNewPassword: Locator readonly buttonSignUp: Locator readonly textError: Locator + readonly signUpPasswordBtn: Locator constructor (page: Page) { this.page = page @@ -20,9 +21,15 @@ export class SignupPage { this.inputRepeatNewPassword = page.locator('input[name="new-password"]').nth(1) this.buttonSignUp = page.locator('div.send button') this.textError = page.locator('div.ERROR > span') + this.signUpPasswordBtn = page.locator('a', { hasText: 'Sign up with password' }) } - async signup (userData: UserSignUp): Promise { + async signupPwd (userData: UserSignUp): Promise { + const isOtp = await this.signUpPasswordBtn.isVisible() + if (isOtp) { + await this.signUpPasswordBtn.click() + } + await this.inputFirstName.fill(userData.firstName) await this.inputLastName.fill(userData.lastName) await this.inputEmail.fill(userData.email) diff --git a/server/account/src/operations.ts b/server/account/src/operations.ts index 955a3e2a1b..94370a88c5 100644 --- a/server/account/src/operations.ts +++ b/server/account/src/operations.ts @@ -239,6 +239,8 @@ export async function signUpOtp ( throw new PlatformError(new Status(Severity.ERROR, platform.status.AccountAlreadyExists, {})) } + await db.person.updateOne({ uuid: emailSocialId.personUuid }, { firstName, lastName }) + personUuid = emailSocialId.personUuid } else { // There's no person linked to this email, so we need to create a new one @@ -1522,7 +1524,7 @@ export type AccountMethods = | 'login' | 'loginOtp' | 'signUp' - | 'signUpOTP' + | 'signUpOtp' | 'validateOtp' | 'createWorkspace' | 'createInviteLink' @@ -1567,7 +1569,7 @@ export function getMethods (hasSignUp: boolean = true): Partial { await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) }) diff --git a/tests/sanity/tests/model/signup-page.ts b/tests/sanity/tests/model/signup-page.ts index 55f9911dc2..0bf56dcbbe 100644 --- a/tests/sanity/tests/model/signup-page.ts +++ b/tests/sanity/tests/model/signup-page.ts @@ -10,6 +10,7 @@ export class SignUpPage extends CommonPage { this.page = page } + signUpPasswordBtn = (): Locator => this.page.locator('a', { hasText: 'Sign up with password' }) inputFirstName = (): Locator => this.page.locator('input[name="given-name"]') inputLastName = (): Locator => this.page.locator('input[name="family-name"]') inputEmail = (): Locator => this.page.locator('input[name="email"]') @@ -42,7 +43,11 @@ export class SignUpPage extends CommonPage { await this.buttonSignUp().click() } - async signUp (data: SignUpData, mode: 'join' | 'signup' = 'signup'): Promise { + async signUpPwd (data: SignUpData, mode: 'join' | 'signup' = 'signup'): Promise { + const isOtp = await this.signUpPasswordBtn().isVisible() + if (isOtp) { + await this.signUpPasswordBtn().click() + } await this.enterFirstName(data.firstName) await this.enterLastName(data.lastName) await this.enterEmail(data.email) diff --git a/tests/sanity/tests/workspace/create.spec.ts b/tests/sanity/tests/workspace/create.spec.ts index 5283947466..7be0af4e7d 100644 --- a/tests/sanity/tests/workspace/create.spec.ts +++ b/tests/sanity/tests/workspace/create.spec.ts @@ -38,7 +38,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.clickTracker() }) @@ -67,7 +67,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `New Issue Name - ${generateId(2)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await trackerNavigationMenuPage.openIssuesForProject('Default') @@ -91,6 +91,7 @@ test.describe('Workspace tests', () => { await loginPage.goto() await loginPage.clickSignUp() + await signUpPage.signUpPasswordBtn().click() await signUpPage.checkInfo(page, 'Required field First name') await signUpPage.enterFirstName(newUser.firstName) await signUpPage.checkInfo(page, 'Required field Last name') @@ -118,7 +119,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `Some HULY #@$ WS - ${generateId(12)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.clickTracker() @@ -141,7 +142,7 @@ test.describe('Workspace tests', () => { await page2.getByRole('link', { name: 'Sign Up' }).click() const signUpPage2 = new SignUpPage(page2) - await signUpPage2.signUp(newUser2, 'join') + await signUpPage2.signUpPwd(newUser2, 'join') const leftSideMenuPage2 = new LeftSideMenuPage(page2) await leftSideMenuPage2.clickTracker() @@ -160,7 +161,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `Some HULY #@$ WS - ${generateId(12)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.clickTracker() @@ -184,7 +185,7 @@ test.describe('Workspace tests', () => { } const signUpPage2 = new SignUpPage(page2) - await signUpPage2.signUp(newUser2) + await signUpPage2.signUpPwd(newUser2) // Ok we signed in, and no workspace present. await page2.goto(linkText ?? '') diff --git a/tests/sanity/tests/workspace/onboarding-workspace.spec.ts b/tests/sanity/tests/workspace/onboarding-workspace.spec.ts index eb558f0115..a79e03db8b 100644 --- a/tests/sanity/tests/workspace/onboarding-workspace.spec.ts +++ b/tests/sanity/tests/workspace/onboarding-workspace.spec.ts @@ -44,7 +44,7 @@ test.describe.skip('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.clickTracker() await issuesPage.checkIssuesCount('Hello and Welcome to Huly! 🌟', 1) @@ -67,7 +67,7 @@ test.describe.skip('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) @@ -106,7 +106,7 @@ test.describe.skip('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.clickNotification() await notificationPage.clickOnNotification('HI-1') @@ -123,7 +123,7 @@ test.describe.skip('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.buttonTracker().click() await userProfilePage.openProfileMenu() @@ -145,7 +145,7 @@ test.describe.skip('Workspace tests', () => { const newWorkspaceName2 = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await api.createWorkspaceWithLogin(newWorkspaceName2, newUser.email, '1234') await userProfilePage.openProfileMenu() @@ -167,7 +167,7 @@ test.describe.skip('Workspace tests', () => { const newWorkspaceName2 = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await userProfilePage.openProfileMenu() await userProfilePage.clickSettings() diff --git a/tests/sanity/tests/workspace/workspace-settings.spec.ts b/tests/sanity/tests/workspace/workspace-settings.spec.ts index c74fc2f959..bf81b498be 100644 --- a/tests/sanity/tests/workspace/workspace-settings.spec.ts +++ b/tests/sanity/tests/workspace/workspace-settings.spec.ts @@ -40,7 +40,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await userProfilePage.openProfileMenu() await userProfilePage.clickSettings() @@ -58,7 +58,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await userProfilePage.openProfileMenu() await userProfilePage.clickSettings() @@ -76,7 +76,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await userProfilePage.openProfileMenu() await userProfilePage.clickSettings() @@ -98,7 +98,7 @@ test.describe('Workspace tests', () => { const newTemplateName = faker.word.words(2) await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await userProfilePage.openProfileMenu() await userProfilePage.clickSettings() @@ -116,7 +116,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await userProfilePage.openProfileMenu() await userProfilePage.clickSettings() @@ -136,7 +136,7 @@ test.describe('Workspace tests', () => { const enumName = faker.word.words(2) await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await userProfilePage.openProfileMenu() await userProfilePage.clickSettings() @@ -157,7 +157,7 @@ test.describe('Workspace tests', () => { const enumName = faker.word.words(2) await loginPage.goto() await loginPage.linkSignUp().click() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await userProfilePage.openProfileMenu() await userProfilePage.clickSettings() diff --git a/ws-tests/sanity/tests/workspace/create.spec.ts b/ws-tests/sanity/tests/workspace/create.spec.ts index 84d166331d..2bb64ebb7d 100644 --- a/ws-tests/sanity/tests/workspace/create.spec.ts +++ b/ws-tests/sanity/tests/workspace/create.spec.ts @@ -44,7 +44,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `New Workspace Name - ${generateId(2)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.clickTracker() }) @@ -72,7 +72,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `New Issue Name - ${generateId(2)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await trackerNavigationMenuPage.openIssuesForProject('Default') @@ -96,6 +96,7 @@ test.describe('Workspace tests', () => { await loginPage.goto() await loginPage.clickSignUp() + await signUpPage.signUpPasswordBtn().click() await signUpPage.checkInfo(page, 'Required field First name') await signUpPage.enterFirstName(newUser.firstName) await signUpPage.checkInfo(page, 'Required field Last name') @@ -123,7 +124,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `Some HULY #@$ WS - ${generateId(12)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.clickTracker() @@ -146,7 +147,7 @@ test.describe('Workspace tests', () => { await page2.getByRole('link', { name: 'Sign Up' }).click() const signUpPage2 = new SignUpPage(page2) - await signUpPage2.signUp(newUser2, 'join') + await signUpPage2.signUpPwd(newUser2, 'join') const leftSideMenuPage2 = new LeftSideMenuPage(page2) await leftSideMenuPage2.clickTracker() @@ -165,7 +166,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `Some HULY #@$ WS - ${generateId(12)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await leftSideMenuPage.clickTracker() @@ -189,7 +190,7 @@ test.describe('Workspace tests', () => { } const signUpPage2 = new SignUpPage(page2) - await signUpPage2.signUp(newUser2) + await signUpPage2.signUpPwd(newUser2) // Ok we signed in, and no workspace present. await page2.goto(linkText ?? '') @@ -213,7 +214,7 @@ test.describe('Workspace tests', () => { const newWorkspaceName = `Some HULY #@$ WS - ${generateId(12)}` await loginPage.goto() await loginPage.clickSignUp() - await signUpPage.signUp(newUser) + await signUpPage.signUpPwd(newUser) await selectWorkspacePage.createWorkspace(newWorkspaceName) await trackerNavigationMenuPage.checkIfTrackerSidebarIsVisible() await userProfilePage.openProfileMenu() From c2d8a3153444dd8cbd83ff0103f4d00446437ce0 Mon Sep 17 00:00:00 2001 From: Victor Ilyushchenko Date: Tue, 18 Feb 2025 19:01:28 +0300 Subject: [PATCH 10/14] UBERF-9334: fixed ActionContext managment (#8047) Signed-off-by: Victor Ilyushchenko --- .../src/components/ActionContext.svelte | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/presentation/src/components/ActionContext.svelte b/packages/presentation/src/components/ActionContext.svelte index f6926950de..c5e86e3001 100644 --- a/packages/presentation/src/components/ActionContext.svelte +++ b/packages/presentation/src/components/ActionContext.svelte @@ -13,37 +13,43 @@ // limitations under the License. --> From cae76abb8aabef39285512f4c96f33b75d9ff3fb Mon Sep 17 00:00:00 2001 From: Victor Ilyushchenko Date: Tue, 18 Feb 2025 20:03:00 +0300 Subject: [PATCH 11/14] UBERF-8545: fix links in readonly documents (#8050) Signed-off-by: Victor Ilyushchenko --- packages/text/src/kits/default-kit.ts | 2 +- .../src/components/extension/link.ts | 26 ++++++++++++++++++- .../src/kits/default-kit.ts | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/text/src/kits/default-kit.ts b/packages/text/src/kits/default-kit.ts index 56aea0a518..30d78e7dad 100644 --- a/packages/text/src/kits/default-kit.ts +++ b/packages/text/src/kits/default-kit.ts @@ -56,7 +56,7 @@ export const DefaultKit = Extension.create({ }), Typography.configure({}), Link.extend({ inclusive: false }).configure({ - openOnClick: true, + openOnClick: false, HTMLAttributes: { class: 'cursor-pointer', rel: 'noopener noreferrer', target: '_blank' } }) ] diff --git a/plugins/text-editor-resources/src/components/extension/link.ts b/plugins/text-editor-resources/src/components/extension/link.ts index e78f4fa3a1..091c06378a 100644 --- a/plugins/text-editor-resources/src/components/extension/link.ts +++ b/plugins/text-editor-resources/src/components/extension/link.ts @@ -15,6 +15,8 @@ import { showPopup } from '@hcengineering/ui' import { Extension } from '@tiptap/core' +import { type MarkType } from '@tiptap/pm/model' +import { Plugin, PluginKey } from '@tiptap/pm/state' import LinkPopup from '../LinkPopup.svelte' export const LinkUtilsExtension = Extension.create({ @@ -42,6 +44,28 @@ export const LinkUtilsExtension = Extension.create({ }, addProseMirrorPlugins () { - return [] + return [LinkClickHandlerPlugin({ type: this.editor.schema.marks.link })] } }) + +interface LinkClickHandlerOptions { + type: MarkType +} + +export function LinkClickHandlerPlugin (options: LinkClickHandlerOptions): Plugin { + return new Plugin({ + key: new PluginKey('handleClickLink'), + props: { + handleClick: (view, pos, event) => { + const $pos = view.state.doc.resolve(pos) + const link = options.type.isInSet($pos.marks()) + if (typeof link?.attrs.href === 'string') { + window.open(link.attrs.href, link.attrs.target) + return true + } + + return false + } + } + }) +} diff --git a/plugins/text-editor-resources/src/kits/default-kit.ts b/plugins/text-editor-resources/src/kits/default-kit.ts index e67de7cf3d..f2cd3d79bd 100644 --- a/plugins/text-editor-resources/src/kits/default-kit.ts +++ b/plugins/text-editor-resources/src/kits/default-kit.ts @@ -62,7 +62,7 @@ export const DefaultKit = Extension.create({ }), Typography.configure({}), Link.extend({ inclusive: false }).configure({ - openOnClick: true, + openOnClick: false, HTMLAttributes: { class: 'cursor-pointer', rel: 'noopener noreferrer', target: '_blank' } }), CodeBlockHighlighExtension.configure(codeBlockHighlightOptions) From 69c66667c2bcec63f1ea8aa67f124dd726ac4383 Mon Sep 17 00:00:00 2001 From: Victor Ilyushchenko Date: Tue, 18 Feb 2025 20:32:46 +0300 Subject: [PATCH 12/14] EQMS-1440: disable delayed qms doc effectiveness and review interval (#8049) * EQMS-1440: disable delayed qms doc effectiveness and review interval Signed-off-by: Victor Ilyushchenko * ff Signed-off-by: Victor Ilyushchenko * ff Signed-off-by: Victor Ilyushchenko --------- Signed-off-by: Victor Ilyushchenko --- .../components/document/EditDocRelease.svelte | 52 +++++++++---------- .../sanity/tests/documents/documents.spec.ts | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/plugins/controlled-documents-resources/src/components/document/EditDocRelease.svelte b/plugins/controlled-documents-resources/src/components/document/EditDocRelease.svelte index efe2ffc34c..06c4edb0d7 100644 --- a/plugins/controlled-documents-resources/src/components/document/EditDocRelease.svelte +++ b/plugins/controlled-documents-resources/src/components/document/EditDocRelease.svelte @@ -58,33 +58,33 @@ const client = getClient() - async function changePlannedEffectiveDate (plannedEffectiveDate: Timestamp) { - if (!$controlledDocument) { - return - } + // async function changePlannedEffectiveDate (plannedEffectiveDate: Timestamp) { + // if (!$controlledDocument) { + // return + // } - await client.update($controlledDocument, { plannedEffectiveDate }) - } + // await client.update($controlledDocument, { plannedEffectiveDate }) + // } - let selectedDate: Timestamp = - $controlledDocument?.plannedEffectiveDate != null && $controlledDocument?.plannedEffectiveDate > 0 - ? $controlledDocument.plannedEffectiveDate - : Date.now() + // let selectedDate: Timestamp = + // $controlledDocument?.plannedEffectiveDate != null && $controlledDocument?.plannedEffectiveDate > 0 + // ? $controlledDocument.plannedEffectiveDate + // : Date.now() - let selected: IntlString | undefined = undefined - if ($controlledDocument?.plannedEffectiveDate === 0) { - selected = documentsRes.string.EffectiveImmediately - } else if ($controlledDocument?.plannedEffectiveDate != null) { - selected = documentsRes.string.EffectiveOn - } + // let selected: IntlString | undefined = undefined + // if ($controlledDocument?.plannedEffectiveDate === 0) { + // selected = documentsRes.string.EffectiveImmediately + // } else if ($controlledDocument?.plannedEffectiveDate != null) { + // selected = documentsRes.string.EffectiveOn + // } - async function changeSelectedDate (ev: CustomEvent) { - if (ev.detail !== undefined) { - selectedDate = ev.detail - await changePlannedEffectiveDate(ev.detail) - selected = documentsRes.string.EffectiveOn - } - } + // async function changeSelectedDate (ev: CustomEvent) { + // if (ev.detail !== undefined) { + // selectedDate = ev.detail + // await changePlannedEffectiveDate(ev.detail) + // selected = documentsRes.string.EffectiveOn + // } + // } const reviewIntervals: DropdownTextItem[] = [] for (const interval of periodicReviewIntervals) { @@ -254,10 +254,10 @@ gap="none" />
-
+
- +