Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winter 1.2.8 support #57

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

winter 1.2.8 support #57

wants to merge 7 commits into from

Conversation

mjauvin
Copy link
Member

@mjauvin mjauvin commented Mar 15, 2025

Depends on wintercms/winter#1312

Update Winter.User to use formcontroller behavior's default views.

@mjauvin mjauvin requested a review from LukeTowers March 15, 2025 19:05
@mjauvin mjauvin self-assigned this Mar 15, 2025
@mjauvin mjauvin marked this pull request as draft March 15, 2025 19:06
@mjauvin
Copy link
Member Author

mjauvin commented Mar 15, 2025

@LukeTowers I started converting this plugin but encountered an issue with the default update view breadcrumbs... it is showing "Users" twice, as can be seen in the screenshot below:

image

@mjauvin
Copy link
Member Author

mjauvin commented Mar 15, 2025

The breadcrumb can be fixed by adding this commit to the Behavior default views PR:

diff --git a/modules/backend/layouts/_breadcrumb.php b/modules/backend/layouts/_breadcrumb.php
index c9f575539..cc56ddfda 100644
--- a/modules/backend/layouts/_breadcrumb.php
+++ b/modules/backend/layouts/_breadcrumb.php
@@ -12,7 +12,7 @@
 <?php if ($menu): ?>
 <ul>
     <li><a href="<?= $menu->url ?>"><?= e(trans($menu->label)) ?></a></li>
-    <?php if ($sideMenu): ?>
+    <?php if ($sideMenu && $sideMenu->url !== $menu->url): ?>
         <li><a href="<?= $sideMenu->url ?>"><?= e(trans($sideMenu->label)) ?></a></li>
     <?php elseif ($settingsItem): ?>
         <li><a href="<?= $settingsItem->url ?>"><?= e(trans($settingsItem->label)) ?></a></li>

@mjauvin mjauvin marked this pull request as ready for review March 15, 2025 19:49
/**
* @var array `RelationController` configuration, by extension.
*/
public $relationConfig;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could technically be a breaking change for plugins that extend this controller without using the addDynamicProperty() approach

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 0852e19. @firemankurt are you still using this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could technically be a breaking change for plugins that extend this controller without using the addDynamicProperty() approach

Good point, I was actually thinking about this myself. I'll revert this part.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with only keeping the relationConfig property, the other two should be fine to get rid of.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might create problems with plugins we don't know about. Doesn't really hurt keeping those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants