-
Notifications
You must be signed in to change notification settings - Fork 638
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
Feature/dev 1165 edit element additional toolbar menu #13847
Merged
brandonkelly
merged 26 commits into
5.0
from
feature/dev-1165-edit-element-additional-toolbar-menu
Nov 19, 2023
Merged
Feature/dev 1165 edit element additional toolbar menu #13847
brandonkelly
merged 26 commits into
5.0
from
feature/dev-1165-edit-element-additional-toolbar-menu
Nov 19, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bar-menu # Conflicts: # src/controllers/ElementsController.php # src/web/assets/cp/dist/cp.js # src/web/assets/cp/dist/cp.js.map # src/web/assets/cp/dist/css/cp.css # src/web/assets/cp/dist/css/cp.css.map # src/web/assets/garnish/dist/garnish.js # src/web/assets/garnish/dist/garnish.js.map
…bar-menu # Conflicts: # src/web/assets/cp/dist/cp.js # src/web/assets/cp/dist/cp.js.map
brandonkelly
deleted the
feature/dev-1165-edit-element-additional-toolbar-menu
branch
November 19, 2023 19:37
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
element edit pages now contain an additional menu, which is placed after the save button; most buttons were moved to it;
the additional menu also shows in a slideout, but in there, we don’t show any destructive options
destructive items are at the end of the list
base\Element
class has a newgetAdditionalMenuComponents()
method, which should be used to add items to the additional menu;there’s also
EVENT_DEFINE_ADDITIONAL_MENU_COMPONENTS
event which can be used to add items to the menu;User
element whereEVENT_REGISTER_USER_ACTIONS
is still used;data-form="userform"
- seeUsersController::actionEditUser()
for more an exampleeach component should be an array that can consist of:
'label'
=> text to show in thea
orbutton
tag; can be an empty string'tag'
=> optional; defaults toa
; you can usebutton
too andhr
if you want to add a visual separator between items'data'
=> optional; data attributes'aria'
=> optional; aria attributes'options'
=> optional; any other attributes, e.g. classRelated issues
dev-1165