-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Admin tabs order not working properly #16175
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
Admin tabs order not working properly #16175
Conversation
|
Hi @tiagosampaio. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
|
@tiagosampaio thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
|
|
||
| if ($this->_activeTab === null) { | ||
| /** @var TabInterface $tab */ | ||
| foreach ($this->_tabs as $tab) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tiagosampaio. You can select first array tab uses reset() and current() methods, please use theirs.
| /** | ||
| * @return array | ||
| */ | ||
| protected function reorderTabs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to Magento backward-compatible guide we can't create new protected methods.
| * @return array | ||
| */ | ||
| protected function reorderTabs() | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, divide code in this function to few separate private functions.
|
Hi @tiagosampaio, thank for fixes. Please, fix fails of the static tests |
|
@VladimirZaets I removed the multiple lines and committed again. |
|
Hi @tiagosampaio. Thanks for changes |
|
Hi @tiagosampaio. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Description
When you add 2 or more tabs to admin area, like order view page, by using the method addTabAfter and the second new tab is placed after the first new tab the sort order does not work as expected.
More details in the issue.
Fixed Issues
Manual testing scenarios
Described in the issue.
Contribution checklist