@capillarytech/creatives-library 8.0.311 → 8.0.312-alpha.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.311",
4
+ "version": "8.0.312-alpha.1",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -2643,7 +2643,7 @@ const MobilePushNew = ({
2643
2643
  const onSuccess = () => handleSave();
2644
2644
 
2645
2645
  // When liquid is enabled and isFullMode is true, skip liquid validation and proceed directly
2646
- if (hasLiquidSupportFeature() && isFullMode) {
2646
+ if (isFullMode) {
2647
2647
  onSuccess();
2648
2648
  return;
2649
2649
  }
@@ -82,6 +82,7 @@ export const SmsTraiEdit = (props) => {
82
82
  eventContextTags,
83
83
  fetchingLiquidTags,
84
84
  getLiquidTags,
85
+ showLiquidErrorInFooter,
85
86
  } = props || {};
86
87
 
87
88
  const { formatMessage } = intl;
@@ -96,6 +97,8 @@ export const SmsTraiEdit = (props) => {
96
97
  const [showMsgLengthNote, updateshowMsgLengthNote] = useState(false);
97
98
  const [liquidErrorMessages, setLiquidErrorMessages] = useState({});
98
99
  const [isLiquidValidationError, setIsLiquidValidationError] = useState(false);
100
+ /** After user closes the validation panel, keep it hidden until Save is clicked again (even if ErrorInfoNote remounts). */
101
+ const [liquidErrorPanelDismissed, setLiquidErrorPanelDismissed] = useState(false);
99
102
  const [showTestAndPreviewSlidebox, setShowTestAndPreviewSlidebox] = useState(false);
100
103
  const SMSTraiFooter = styled.div`
101
104
  background-color: ${CAP_WHITE};
@@ -103,6 +106,12 @@ export const SmsTraiEdit = (props) => {
103
106
  position: fixed;
104
107
  bottom: 2rem;
105
108
  margin-left: -2rem;
109
+ /* Prevent global creatives tabpane min-height from stretching footer validation tabs */
110
+ .error-info-note__tabs {
111
+ .ant-tabs-tabpane {
112
+ min-height: auto !important;
113
+ }
114
+ }
106
115
  .ant-btn {
107
116
  margin-right: ${CAP_SPACE_16};
108
117
  }
@@ -263,6 +272,7 @@ export const SmsTraiEdit = (props) => {
263
272
  const onSubmitWrapper = () => {
264
273
  setIsLiquidValidationError(false);
265
274
  setLiquidErrorMessages({});
275
+ setLiquidErrorPanelDismissed(false);
266
276
  // Liquid validation (extractTags) only in library mode
267
277
  if (isFullMode) {
268
278
  onDoneCallback();
@@ -658,8 +668,20 @@ export const SmsTraiEdit = (props) => {
658
668
  </CapColumn>
659
669
  </CapRow>
660
670
  <SMSTraiFooter>
661
- {isLiquidValidationError && (
662
- <ErrorInfoNote errorMessages={liquidErrorMessages} />
671
+ {isLiquidValidationError && !liquidErrorPanelDismissed && (
672
+ <ErrorInfoNote
673
+ errorMessages={liquidErrorMessages}
674
+ intl={intl}
675
+ onClose={() => {
676
+ setLiquidErrorPanelDismissed(true);
677
+ if (typeof showLiquidErrorInFooter === 'function') {
678
+ showLiquidErrorInFooter({
679
+ STANDARD_ERROR_MSG: [],
680
+ LIQUID_ERROR_MSG: [],
681
+ });
682
+ }
683
+ }}
684
+ />
663
685
  )}
664
686
  <CapButton
665
687
  onClick={handleTestAndPreview}