Skip to content

[next] feat(NcAvatar): implement custom javascript hook action for the contacts menu#6306

Merged
st3iny merged 1 commit into
mainfrom
backport/6238/next
Apr 11, 2025
Merged

[next] feat(NcAvatar): implement custom javascript hook action for the contacts menu#6306
st3iny merged 1 commit into
mainfrom
backport/6238/next

Conversation

@backportbot
Copy link
Copy Markdown

@backportbot backportbot Bot commented Dec 17, 2024

Backport of #6238

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot Bot added enhancement New feature or request 3. to review Waiting for reviews feature: avatar Related to the avatar component feature: functions composables, functions, mixins and other non-components labels Dec 17, 2024
@raimund-schluessler raimund-schluessler added this to the 9.0.0-alpha.6 milestone Jan 14, 2025
@susnux susnux mentioned this pull request Feb 16, 2025
13 tasks
@susnux susnux modified the milestones: 9.0.0-alpha.7, 9.0.0-alpha.8 Mar 3, 2025
@susnux susnux modified the milestones: 9.0.0-alpha.8, v9.0.0-rc.0 Apr 4, 2025
@st3iny st3iny force-pushed the backport/6238/next branch from 93be05e to 5430086 Compare April 7, 2025 18:49
@st3iny st3iny marked this pull request as ready for review April 7, 2025 18:50
@st3iny st3iny requested a review from susnux April 7, 2025 18:50
@st3iny st3iny force-pushed the backport/6238/next branch 2 times, most recently from a1f860e to 43a72c6 Compare April 7, 2025 18:52
Comment thread src/functions/index.ts Outdated
Comment thread src/functions/contactsMenu/index.ts Outdated
Comment thread src/functions/contactsMenu/index.ts Outdated
Comment on lines +9 to +24
export interface ContactsMenuEntry {
id: number|string|null,
fullName: string,
avatar: string|null,
topAction: object|null,
actions: object[],
lastMessage: '',
emailAddresses: string[],
profileTitle: string|null,
profileUrl: string|null,
status: string|null,
statusMessage: null|string,
statusMessageTimestamp: null|number,
statusIcon: null|string,
isUser: boolean,
uid: null|string,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really null? What a mess 🙈
Better would be ´undefinedto haveuid?: string` and similar.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better would be ´undefinedto haveuid?: string` and similar.

But JSON has no undefined...

So it's either null, or '', or we transform response.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well simply not defined is undefined: {"foo": 1} would be the same as

{
    foo: number
    bar?: string
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This data is deserialized from JSON as is and can be null.

Comment thread src/functions/contactsMenu/index.ts Outdated
Comment thread src/functions/contactsMenu/index.ts Outdated
Comment thread src/components/NcAvatar/NcAvatar.vue Outdated
Comment thread src/functions/contactsMenu/index.ts Outdated
Comment thread src/functions/contactsMenu/index.ts
Comment thread src/functions/contactsMenu/index.ts Outdated
Comment thread src/components/NcAvatar/NcAvatar.vue Outdated
Comment thread src/functions/contactsMenu/index.ts Outdated
Comment on lines +9 to +24
export interface ContactsMenuEntry {
id: number|string|null,
fullName: string,
avatar: string|null,
topAction: object|null,
actions: object[],
lastMessage: '',
emailAddresses: string[],
profileTitle: string|null,
profileUrl: string|null,
status: string|null,
statusMessage: null|string,
statusMessageTimestamp: null|number,
statusIcon: null|string,
isUser: boolean,
uid: null|string,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better would be ´undefinedto haveuid?: string` and similar.

But JSON has no undefined...

So it's either null, or '', or we transform response.

@st3iny st3iny requested review from ShGKme and susnux April 10, 2025 15:07
…cts menu

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@st3iny st3iny force-pushed the backport/6238/next branch from 2b3d91b to 8310da7 Compare April 11, 2025 06:03
@st3iny
Copy link
Copy Markdown
Contributor

st3iny commented Apr 11, 2025

Rebased to squash both commits. Nothing else changed.

@st3iny st3iny enabled auto-merge April 11, 2025 06:03
@st3iny st3iny added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 11, 2025
@st3iny st3iny merged commit 1676a99 into main Apr 11, 2025
27 checks passed
@st3iny st3iny deleted the backport/6238/next branch April 11, 2025 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request feature: avatar Related to the avatar component feature: functions composables, functions, mixins and other non-components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants