@atlaskit/editor-plugin-card 6.6.1 → 6.6.3

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,19 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 6.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#166368](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166368)
8
+ [`5f46eb74d8fa5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f46eb74d8fa5) -
9
+ [ux] ED-27810: Added the link preference button when control is on
10
+
11
+ ## 6.6.2
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 6.6.1
4
18
 
5
19
  ### Patch Changes
@@ -674,10 +674,24 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
674
674
  // testId is required to show focus on trigger button on ESC key press
675
675
  // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
676
676
  var testId = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
677
- toolbarItems.push({
678
- type: 'separator',
679
- fullHeight: true
680
- });
677
+
678
+ // When canShowAppearanceSwitch is true, and platform_editor_controls is on, the link appearance dropdown shows, which includes a link preference button
679
+ // So only add the link appearance button when canShowAppearanceSwitch is false
680
+ if (!canShowAppearanceSwitch() && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_12')) {
681
+ var linkPreferenceButton = getSettingsButton(intl, editorAnalyticsApi, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.userPreferencesLink);
682
+ toolbarItems.push({
683
+ type: 'separator',
684
+ fullHeight: true
685
+ }, linkPreferenceButton, {
686
+ type: 'separator',
687
+ fullHeight: true
688
+ });
689
+ } else {
690
+ toolbarItems.push({
691
+ type: 'separator',
692
+ fullHeight: true
693
+ });
694
+ }
681
695
  var overflowMenuConfig = [{
682
696
  type: 'overflow-dropdown',
683
697
  testId: testId,
@@ -667,10 +667,24 @@ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hove
667
667
  // testId is required to show focus on trigger button on ESC key press
668
668
  // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
669
669
  const testId = fg('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
670
- toolbarItems.push({
671
- type: 'separator',
672
- fullHeight: true
673
- });
670
+
671
+ // When canShowAppearanceSwitch is true, and platform_editor_controls is on, the link appearance dropdown shows, which includes a link preference button
672
+ // So only add the link appearance button when canShowAppearanceSwitch is false
673
+ if (!canShowAppearanceSwitch() && fg('platform_editor_controls_patch_12')) {
674
+ const linkPreferenceButton = getSettingsButton(intl, editorAnalyticsApi, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.userPreferencesLink);
675
+ toolbarItems.push({
676
+ type: 'separator',
677
+ fullHeight: true
678
+ }, linkPreferenceButton, {
679
+ type: 'separator',
680
+ fullHeight: true
681
+ });
682
+ } else {
683
+ toolbarItems.push({
684
+ type: 'separator',
685
+ fullHeight: true
686
+ });
687
+ }
674
688
  const overflowMenuConfig = [{
675
689
  type: 'overflow-dropdown',
676
690
  testId,
@@ -665,10 +665,24 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
665
665
  // testId is required to show focus on trigger button on ESC key press
666
666
  // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
667
667
  var testId = fg('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
668
- toolbarItems.push({
669
- type: 'separator',
670
- fullHeight: true
671
- });
668
+
669
+ // When canShowAppearanceSwitch is true, and platform_editor_controls is on, the link appearance dropdown shows, which includes a link preference button
670
+ // So only add the link appearance button when canShowAppearanceSwitch is false
671
+ if (!canShowAppearanceSwitch() && fg('platform_editor_controls_patch_12')) {
672
+ var linkPreferenceButton = getSettingsButton(intl, editorAnalyticsApi, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.userPreferencesLink);
673
+ toolbarItems.push({
674
+ type: 'separator',
675
+ fullHeight: true
676
+ }, linkPreferenceButton, {
677
+ type: 'separator',
678
+ fullHeight: true
679
+ });
680
+ } else {
681
+ toolbarItems.push({
682
+ type: 'separator',
683
+ fullHeight: true
684
+ });
685
+ }
672
686
  var overflowMenuConfig = [{
673
687
  type: 'overflow-dropdown',
674
688
  testId: testId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "6.6.1",
3
+ "version": "6.6.3",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/analytics-next": "^11.1.0",
38
38
  "@atlaskit/button": "^23.2.0",
39
39
  "@atlaskit/custom-steps": "^0.11.0",
40
- "@atlaskit/editor-common": "^106.3.0",
40
+ "@atlaskit/editor-common": "^106.5.0",
41
41
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
42
42
  "@atlaskit/editor-plugin-base": "^3.0.0",
43
43
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
@@ -63,7 +63,7 @@
63
63
  "@atlaskit/primitives": "^14.8.0",
64
64
  "@atlaskit/smart-card": "^38.8.0",
65
65
  "@atlaskit/theme": "^18.0.0",
66
- "@atlaskit/tmp-editor-statsig": "^5.14.0",
66
+ "@atlaskit/tmp-editor-statsig": "^6.0.0",
67
67
  "@atlaskit/tokens": "^5.1.0",
68
68
  "@babel/runtime": "^7.0.0",
69
69
  "@emotion/react": "^11.7.1",
@@ -141,6 +141,9 @@
141
141
  "platform_editor_controls_patch_9": {
142
142
  "type": "boolean"
143
143
  },
144
+ "platform_editor_controls_patch_12": {
145
+ "type": "boolean"
146
+ },
144
147
  "smart_link_editor_update_toolbar_open_link": {
145
148
  "type": "boolean"
146
149
  },