Skip to content

Commit

Permalink
PresenceAvatars fixed limit for mobile (#7677)
Browse files Browse the repository at this point in the history
  • Loading branch information
SasLord authored Jan 16, 2025
1 parent 8f5d15b commit d05a5f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { type Person, formatName } from '@hcengineering/contact'
import { Avatar, personByIdStore } from '@hcengineering/contact-resources'
import { getEmbeddedLabel } from '@hcengineering/platform'
import { IconSize, tooltip } from '@hcengineering/ui'
import { IconSize, tooltip, deviceOptionsStore as deviceInfo, checkAdaptiveMatching } from '@hcengineering/ui'
import PresenceList from './PresenceList.svelte'
import { presenceByObjectId } from '../store'
Expand All @@ -33,10 +33,11 @@
.map((p) => $personByIdStore.get(p))
.filter((p): p is Person => p !== undefined)
$: overLimit = persons.length > limit
$: adaptive = checkAdaptiveMatching($deviceInfo.size, 'md') || overLimit
</script>

{#if persons.length > 0}
{#if overLimit}
{#if adaptive}
<div
class="hulyCombineAvatars-container"
use:tooltip={{ component: PresenceList, props: { persons, size }, direction: 'bottom' }}
Expand Down
1 change: 1 addition & 0 deletions tests/sanity/tests/model/common-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export class CommonPage {

async pressYesDeletePopup (page: Page): Promise<void> {
await this.viewStringDeleteObjectButtonPrimary().click()
await expect(this.viewStringDeleteObjectButtonPrimary()).not.toBeVisible({ timeout: 1000 })
}

async addNewTagPopup (page: Page, title: string, description: string): Promise<void> {
Expand Down
3 changes: 3 additions & 0 deletions tests/sanity/tests/model/recruiting/applications-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export class ApplicationsPage extends CommonRecruitingPage {
.locator('tr', { hasText: `${talentName.lastName} ${talentName.firstName}` })
.locator('div[class*="firstCell"]')
.click()
await expect(
this.page.locator('div.hulyHeader-container div.hulyHeader-titleGroup', { hasText: talentName.lastName })
).toBeVisible({ timeout: 1000 })
}

async checkApplicationState (talentName: TalentName, done: string): Promise<void> {
Expand Down

0 comments on commit d05a5f6

Please sign in to comment.