Skip to content

Commit 237e060

Browse files
authored
CRM: Update FullCalendar from v3 to v6 (#43970)
* Fix zeroBSCRM_getLocale If one ever requested the short version of the locale, it would always return the short version on subsequent calls, even if requesting the full version. We now cache the full version, and derive the short version from that as needed. * Bump to FullCalendar 5 This also temporarily removes avatar and completion checkmark event UI modifications, since styling has changed significantly between versions and will likely continue to do so as we continue upgrades. * Bump to FullCalendar 6 * Remove FullCalendar style overrides * Add styles and task completion * Add changelog * Remove peer dependency hack * Update pnpm-lock.yaml * Update Phan baseline * Reduce explicit dependencies * Update pnpm-lock.yaml * Prevent error on task edit page * Fix links on list view * Adjust header styles for small screens * More adjustments * Show user dropdown for all task-perms people
1 parent 46db388 commit 237e060

13 files changed

+309
-355
lines changed

.pnpmfile.cjs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,6 @@ function fixPeerDeps( pkg ) {
305305
}
306306
}
307307

308-
// Remove jQuery peer dependency, given it's already bundled in WordPress.
309-
// The next version of FullCalendar (v4) removes the dependency altogether.
310-
if ( pkg.name === 'fullcalendar' && pkg.peerDependencies?.jquery ) {
311-
delete pkg.peerDependencies.jquery;
312-
}
313-
314308
// It assumes hoisting to find its plugins. Sigh. Add peer deps for the plugins we use.
315309
// https://github.com/ai/size-limit/issues/366
316310
if ( pkg.name === 'size-limit' ) {

pnpm-lock.yaml

Lines changed: 74 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/plugins/crm/.phan/baseline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
'includes/ZeroBSCRM.InvoiceBuilder.php' => ['PhanPluginDuplicateAdjacentStatement', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginRedundantAssignment', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredTypeReturnType', 'PhanUndeclaredVariable'],
214214
'includes/ZeroBSCRM.Jetpack.php' => ['PhanPluginDuplicateConditionalNullCoalescing'],
215215
'includes/ZeroBSCRM.List.Columns.php' => ['PhanPluginMixedKeyNoKey'],
216-
'includes/ZeroBSCRM.List.Tasks.php' => ['PhanRedundantCondition', 'PhanTypeMismatchArgument'],
216+
'includes/ZeroBSCRM.List.Tasks.php' => ['PhanTypeMismatchArgument'],
217217
'includes/ZeroBSCRM.List.php' => ['PhanPossiblyUndeclaredVariable', 'PhanRedundantCondition', 'PhanTypeArraySuspicious', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal'],
218218
'includes/ZeroBSCRM.Mail.php' => ['PhanImpossibleCondition', 'PhanPluginMixedKeyNoKey', 'PhanPluginRedundantAssignment', 'PhanPluginUnreachableCode', 'PhanRedundantCondition', 'PhanSuspiciousValueComparison', 'PhanTypeMismatchArgumentInternalReal', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredClassCatch', 'PhanUndeclaredClassInstanceof', 'PhanUndeclaredClassMethod', 'PhanUndeclaredClassProperty', 'PhanUndeclaredClassReference', 'PhanUndeclaredVariable', 'PhanUnreferencedUseNormal'],
219219
'includes/ZeroBSCRM.MailTracking.php' => ['PhanTypeArraySuspiciousNullable'],
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: changed
3+
4+
Tasks: Update FullCalendar to latest version.

projects/plugins/crm/includes/ZeroBSCRM.Core.Localisation.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -571,23 +571,21 @@ function zeroBSCRM_format_quantity( $quantity ) {
571571

572572
function zeroBSCRM_getLocale( $full = true ) {
573573

574+
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
574575
global $zeroBSCRM_locale;
575576

576-
if ( isset( $zeroBSCRM_locale ) ) {
577-
return $zeroBSCRM_locale;
577+
if ( ! isset( $zeroBSCRM_locale ) ) {
578+
$zeroBSCRM_locale = get_bloginfo( 'language' );
578579
}
579580

580-
$zeroBSCRM_locale = get_bloginfo( 'language' );
581-
582581
if ( ! $full ) {
583-
584-
$zeroBSCRM_locale = str_replace( '_', '-', $zeroBSCRM_locale ); // just in case en_GB?
585-
$langParts = explode( '-', $zeroBSCRM_locale );
586-
$zeroBSCRM_locale = $langParts[0];
587-
582+
$zeroBSCRM_locale_short = str_replace( '_', '-', $zeroBSCRM_locale ); // just in case en_GB?
583+
$zeroBSCRM_locale_short = explode( '-', $zeroBSCRM_locale_short )[0];
584+
return $zeroBSCRM_locale_short;
588585
}
589586

590587
return $zeroBSCRM_locale;
588+
// phpcs:enable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
591589
}
592590

593591
// getLocale wrapper

0 commit comments

Comments
 (0)