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

Reset ExtraClass on ViewModeSelector include #2787

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

TheBnl
Copy link
Contributor

@TheBnl TheBnl commented Oct 8, 2022

Since silverstripe/silverstripe-admin version 1.11 the include SilverStripe\\Admin\\LeftAndMain_ViewModeSelector uses an ExtraClass parameter. When this parameter is not explicitly set it inherits the ExtraClass of the template it's included in. In CMSMain this causes the ViewMode button to stretch.

Replaces #2782

Parent issue

Since silverstripe/silverstripe-admin version 1.11 the include `SilverStripe\\Admin\\LeftAndMain_ViewModeSelector` uses an [ExtraClass parameter](https://github.com/silverstripe/silverstripe-admin/blob/6d1998707d7cb96e888a83053c9d34b09d842ed2/templates/SilverStripe/Admin/Includes/LeftAndMain_ViewModeSelector.ss#L1). When this parameter is not explicitly set it inherits the ExtraClass of the template it's included in. In CMSMain this causes the ViewMode button to stretch.
Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

Works as expected. Nice.
In future though please try to avoid opening a new separate PR to replace an existing one like that - it's easier if the changes are made in the existing PR.

@GuySartorelli GuySartorelli merged commit 6acaaf9 into silverstripe:4.11 Oct 11, 2022
@TheBnl
Copy link
Contributor Author

TheBnl commented Oct 11, 2022

Ah yes i followed the steps as you provided but i couldn't find any way to retarget the branch to 4.11 other than creating a new PR.

Thanks for the merge!

@TheBnl TheBnl deleted the patch-1 branch October 11, 2022 10:01
@GuySartorelli
Copy link
Member

Ahh okay. For future reference if you click edit next to the title on an open PR it should give you option to target a different branch.

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

Successfully merging this pull request may close these issues.

2 participants