@atlaskit/profilecard 26.2.4 → 26.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,22 @@
1
1
  import React from 'react';
2
2
 
3
- import { AtlassianInternalWarning, code, Example, md, Props } from '@atlaskit/docs';
4
- import { TeamsLink } from '@atlaskit/teams-app-internal-navigation/teams-link';
3
+ import { AtlassianInternalWarning, code, md } from '@atlaskit/docs';
5
4
 
6
5
  const _default_1: any = md`
7
6
  ${(<AtlassianInternalWarning />)}
8
7
 
9
- A React component that wraps a trigger, such that when interacted a user profile card pops up.
8
+ ## Deprecated
10
9
 
11
- It's recommended to talk to us, in particular our team's designers, on Slack at
12
- #help-people-and-teams-xpc before integrating this in your product. This is for the purpose of
13
- design's understanding, as it is important that design understands the consumer / your use
14
- case(s), and we are happy to chat further if the current design doesn't meet your needs.
10
+ **TeamProfileCardTrigger is deprecated and no longer provides any profile card functionality.**
11
+ It simply renders its children as-is without any popup or interaction behavior.
15
12
 
16
- ## Usage
13
+ ### Migration
17
14
 
18
- ### Using the ProfileCardTrigger
15
+ Use \`TeamProfileCardWithTrigger\` from \`@atlassian/team-profilecard\` instead:
19
16
 
20
17
  ${code`
21
- import ProfileCardTrigger from '@atlaskit/profilecard/user';
22
- import ProfileClient from '@atlaskit/profilecard/client';
23
-
24
- const profileClient = new ProfileClient({
25
- url: 'https://directory-graphql-service/endpoint' // GraphQL service endpoint
26
- });
18
+ // Before (deprecated - no longer works)
19
+ import { TeamProfileCardTrigger } from '@atlaskit/profilecard';
27
20
 
28
21
  <TeamProfileCardTrigger
29
22
  orgId="SOME-ORG-ID"
@@ -32,47 +25,29 @@ const profileClient = new ProfileClient({
32
25
  >
33
26
  <Avatar ... />
34
27
  </TeamProfileCardTrigger>
35
- `}
36
-
37
- ${(
38
- <Example
39
- packageName="@atlaskit/profilecard"
40
- Component={require('../examples/09-team-profilecard-trigger').default}
41
- title="Profilecard"
42
- source={require('!!raw-loader!../examples/09-team-profilecard-trigger')}
43
- />
44
- )}
45
28
 
46
- Here are some relevant examples for better understanding the \`trigger\` and \`triggerLinkType\`
47
- props:
29
+ // After (use this instead)
30
+ import { TeamProfileCardWithTrigger } from '@atlassian/team-profilecard/trigger';
48
31
 
49
- ${(
50
- <ul>
51
- <li>
52
- <TeamsLink
53
- href="/examples/people-and-teams/profilecard/trigger-link-types"
54
- intent="reference"
55
- >
56
- Trigger link types
57
- </TeamsLink>
58
- </li>
59
- <li>
60
- <TeamsLink
61
- href="/examples/people-and-teams/profilecard/team-profilecard-trigger"
62
- intent="reference"
63
- >
64
- Team profilecard trigger
65
- </TeamsLink>
66
- </li>
67
- </ul>
68
- )}
32
+ <TeamProfileCardWithTrigger
33
+ teamAri={toTeamARI(teamId)}
34
+ cloudId={cloudId}
35
+ userId={userId}
36
+ trigger="hover"
37
+ showFlag={addFlag}
38
+ >
39
+ <Avatar ... />
40
+ </TeamProfileCardWithTrigger>
41
+ `}
69
42
 
70
- ${(
71
- <Props
72
- heading="TeamProfileCardTrigger Props..."
73
- props={require('!!extract-react-types-loader!../src/components/Team/TeamProfileCardTrigger')}
74
- />
75
- )}
43
+ ### Key differences
76
44
 
45
+ - **teamAri** replaces \`teamId\` and \`orgId\` - use \`toTeamARI(teamId)\` from \`@atlaskit/teams-client\`
46
+ - **cloudId** is now a required prop
47
+ - **userId** is the viewing user's account ID
48
+ - **showFlag** replaces \`addFlag\` for displaying flag notifications
49
+ - **trigger** accepts \`'hover'\`, \`'click'\`, or \`['hover', 'click']\` instead of \`'hover-click'\`
50
+ - **placement** replaces \`position\` for popup placement
51
+ - **resourceClient** is no longer needed - the new component handles data fetching internally via Relay
77
52
  `;
78
53
  export default _default_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "26.2.4",
3
+ "version": "26.3.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -93,6 +93,7 @@
93
93
  "@atlassian/feature-flags-test-utils": "^1.1.0",
94
94
  "@atlassian/platform-storybook-helpers": "^0.3.0",
95
95
  "@atlassian/ptc-test-utils": "^0.13.0",
96
+ "@atlassian/testing-library": "^0.6.0",
96
97
  "@storybook/addon-actions": "^8.6.14",
97
98
  "@storybook/test": "^8.6.14",
98
99
  "@testing-library/react": "^16.3.0",
@@ -145,9 +146,6 @@
145
146
  "cover-header-image-team-profilecard": {
146
147
  "type": "boolean"
147
148
  },
148
- "people-teams-deprecate-profilecard-teams": {
149
- "type": "boolean"
150
- },
151
149
  "rovo_display_ai_disclaimer_on_agent_profile_card": {
152
150
  "type": "boolean"
153
151
  },