kgabryje commented on code in PR #31029: URL: https://github.com/apache/superset/pull/31029#discussion_r1853860772
########## superset-frontend/src/dashboard/components/Header/index.jsx: ########## @@ -383,58 +403,79 @@ class Header extends PureComponent { certification_details: dashboardInfo.certification_details, css: customCss, dashboard_title: dashboardTitle, - last_modified_time: lastModifiedTime, + last_modified_time: actualLastModifiedTime, owners: dashboardInfo.owners, roles: dashboardInfo.roles, slug, metadata: { ...dashboardInfo?.metadata, color_namespace: currentColorNamespace, color_scheme: currentColorScheme, - positions, - refresh_frequency: refreshFrequency, + positions: layout, + refresh_frequency: shouldPersistRefreshFrequency + ? refreshFrequency + : dashboardInfo.metadata?.refresh_frequency, }, }; // make sure positions data less than DB storage limitation: - const positionJSONLength = safeStringify(positions).length; + const positionJSONLength = safeStringify(layout).length; const limit = - dashboardInfo.common.conf.SUPERSET_DASHBOARD_POSITION_DATA_LIMIT || + dashboardInfo.common?.conf?.SUPERSET_DASHBOARD_POSITION_DATA_LIMIT || DASHBOARD_POSITION_DATA_LIMIT; if (positionJSONLength >= limit) { - this.props.addDangerToast( + boundActionCreators.addDangerToast( t( 'Your dashboard is too large. Please reduce its size before saving it.', ), ); } else { if (positionJSONLength >= limit * 0.9) { - this.props.addWarningToast('Your dashboard is near the size limit.'); + boundActionCreators.addWarningToast( + 'Your dashboard is near the size limit.', Review Comment: nice catch! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org