@atlaskit/rovo-agent-components 2.5.1 → 2.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#137721](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/137721)
8
+ [`37f0da49fa1ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/37f0da49fa1ba) -
9
+ Prevent agent avatar from squishing when next to longer text in the AgentCard
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 2.5.1
4
16
 
5
17
  ### Patch Changes
@@ -2,6 +2,8 @@
2
2
  ._1bsb1lk2{width:95%}
3
3
  ._1bsb1osq{width:100%}
4
4
  ._1e0c1txw{display:flex}
5
+ ._1tkezwfg{min-height:2pc}
6
+ ._1ul9zwfg{min-width:2pc}
5
7
  ._4cvr1h6o{align-items:center}
6
8
  ._4t3i1lk2{height:95%}
7
9
  ._4t3i1osq{height:100%}
@@ -13,6 +13,7 @@ var _runtime = require("@compiled/react/runtime");
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
14
  var _reactIntlNext = require("react-intl-next");
15
15
  var _avatar = require("@atlaskit/avatar");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _compiled = require("@atlaskit/primitives/compiled");
17
18
  var _generatedAvatars = require("./generated-avatars");
18
19
  var _messages = require("./messages");
@@ -22,6 +23,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
22
23
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
24
  var styles = {
24
25
  agentAvatar: "_1e0c1txw _1bah1h6o _4cvr1h6o _mkrz1k6g",
26
+ agentAvatarPreventSquish: "_1e0c1txw _1bah1h6o _4cvr1h6o _mkrz1k6g _1ul9zwfg _1tkezwfg",
25
27
  image: "_5ral1dfr _4t3i1osq _1bsb1osq",
26
28
  avatarContentContainer: "_1bsb1osq _4t3i1osq _1e0c1txw _1bah1h6o _4cvr1h6o"
27
29
  };
@@ -46,7 +48,7 @@ var AgentAvatar = exports.AgentAvatar = function AgentAvatar(_ref) {
46
48
  var imgUrl = isForgeAgent && forgeAgentIconUrl ? forgeAgentIconUrl : imageUrl;
47
49
  return /*#__PURE__*/React.createElement(_compiled.Box, {
48
50
  "aria-label": label,
49
- xcss: styles.agentAvatar,
51
+ xcss: (0, _platformFeatureFlags.fg)('rovo_chat_bugfix_agent_avatar_squish') ? styles.agentAvatarPreventSquish : styles.agentAvatar,
50
52
  style: _objectSpread({
51
53
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values
52
54
  height: _avatar.AVATAR_SIZES[size],
@@ -2,6 +2,8 @@
2
2
  ._1bsb1lk2{width:95%}
3
3
  ._1bsb1osq{width:100%}
4
4
  ._1e0c1txw{display:flex}
5
+ ._1tkezwfg{min-height:2pc}
6
+ ._1ul9zwfg{min-width:2pc}
5
7
  ._4cvr1h6o{align-items:center}
6
8
  ._4t3i1lk2{height:95%}
7
9
  ._4t3i1osq{height:100%}
@@ -4,11 +4,13 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useIntl } from 'react-intl-next';
6
6
  import { AVATAR_SIZES } from '@atlaskit/avatar';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { Box } from '@atlaskit/primitives/compiled';
8
9
  import { GeneratedAvatar } from './generated-avatars';
9
10
  import { messages } from './messages';
10
11
  const styles = {
11
12
  agentAvatar: "_1e0c1txw _1bah1h6o _4cvr1h6o _mkrz1k6g",
13
+ agentAvatarPreventSquish: "_1e0c1txw _1bah1h6o _4cvr1h6o _mkrz1k6g _1ul9zwfg _1tkezwfg",
12
14
  image: "_5ral1dfr _4t3i1osq _1bsb1osq",
13
15
  avatarContentContainer: "_1bsb1osq _4t3i1osq _1e0c1txw _1bah1h6o _4cvr1h6o"
14
16
  };
@@ -33,7 +35,7 @@ export const AgentAvatar = ({
33
35
  const imgUrl = isForgeAgent && forgeAgentIconUrl ? forgeAgentIconUrl : imageUrl;
34
36
  return /*#__PURE__*/React.createElement(Box, {
35
37
  "aria-label": label,
36
- xcss: styles.agentAvatar,
38
+ xcss: fg('rovo_chat_bugfix_agent_avatar_squish') ? styles.agentAvatarPreventSquish : styles.agentAvatar,
37
39
  style: {
38
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values
39
41
  height: AVATAR_SIZES[size],
@@ -2,6 +2,8 @@
2
2
  ._1bsb1lk2{width:95%}
3
3
  ._1bsb1osq{width:100%}
4
4
  ._1e0c1txw{display:flex}
5
+ ._1tkezwfg{min-height:2pc}
6
+ ._1ul9zwfg{min-width:2pc}
5
7
  ._4cvr1h6o{align-items:center}
6
8
  ._4t3i1lk2{height:95%}
7
9
  ._4t3i1osq{height:100%}
@@ -7,11 +7,13 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import { useIntl } from 'react-intl-next';
9
9
  import { AVATAR_SIZES } from '@atlaskit/avatar';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { Box } from '@atlaskit/primitives/compiled';
11
12
  import { GeneratedAvatar } from './generated-avatars';
12
13
  import { messages } from './messages';
13
14
  var styles = {
14
15
  agentAvatar: "_1e0c1txw _1bah1h6o _4cvr1h6o _mkrz1k6g",
16
+ agentAvatarPreventSquish: "_1e0c1txw _1bah1h6o _4cvr1h6o _mkrz1k6g _1ul9zwfg _1tkezwfg",
15
17
  image: "_5ral1dfr _4t3i1osq _1bsb1osq",
16
18
  avatarContentContainer: "_1bsb1osq _4t3i1osq _1e0c1txw _1bah1h6o _4cvr1h6o"
17
19
  };
@@ -36,7 +38,7 @@ export var AgentAvatar = function AgentAvatar(_ref) {
36
38
  var imgUrl = isForgeAgent && forgeAgentIconUrl ? forgeAgentIconUrl : imageUrl;
37
39
  return /*#__PURE__*/React.createElement(Box, {
38
40
  "aria-label": label,
39
- xcss: styles.agentAvatar,
41
+ xcss: fg('rovo_chat_bugfix_agent_avatar_squish') ? styles.agentAvatarPreventSquish : styles.agentAvatar,
40
42
  style: _objectSpread({
41
43
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values
42
44
  height: AVATAR_SIZES[size],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/primitives": "^14.3.0",
50
50
  "@atlaskit/skeleton": "^2.0.0",
51
- "@atlaskit/tokens": "^4.6.0",
51
+ "@atlaskit/tokens": "^4.7.0",
52
52
  "@atlaskit/tooltip": "^20.0.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@compiled/react": "^0.18.3",
@@ -112,6 +112,9 @@
112
112
  "platform-feature-flags": {
113
113
  "rovo_chat_add_template_tab_to_modal": {
114
114
  "type": "boolean"
115
+ },
116
+ "rovo_chat_bugfix_agent_avatar_squish": {
117
+ "type": "boolean"
115
118
  }
116
119
  }
117
120
  }