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

Fancy crumbs and element action menus #13902

Merged
merged 68 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
11152b8
WIP on additional menu in the toolbar
i-just Jul 31, 2023
f61f17c
refactor additional menu WIP
i-just Aug 2, 2023
93994f1
use anchor tag as default
i-just Aug 2, 2023
6d5924b
edit user to use the additional menu, not its own version
i-just Aug 2, 2023
c832d97
tweaks to support grouping - tbc
i-just Aug 2, 2023
b7c6c6e
asset additional components + cleanup
i-just Aug 16, 2023
28e9777
include additional menu btn in a slideout
i-just Aug 16, 2023
566bcf1
rename event
i-just Aug 16, 2023
1542d86
make formsubmit links work
i-just Aug 16, 2023
26e052b
compiled assets
i-just Aug 16, 2023
e5ece99
define menu component event needs to know the element
i-just Aug 16, 2023
cb18318
ensure formsubmit class only for action component
i-just Aug 16, 2023
34ca512
formsubmit - allow use of btn data-form
i-just Aug 16, 2023
c23a6c1
edit user - move compiling actions to user element
i-just Aug 16, 2023
a0ae6c5
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
i-just Aug 16, 2023
f2fde24
WIP formsubmit() in a disclosureMenu in a slideoout
i-just Aug 18, 2023
5f8ccf0
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
i-just Sep 26, 2023
6295d4a
formsubmit() in a disclosureMenu in a slideoout
i-just Sep 26, 2023
718a08c
cleanup
i-just Sep 26, 2023
bb04f44
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
i-just Sep 27, 2023
c540530
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
i-just Oct 19, 2023
dbc3eaa
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
i-just Oct 19, 2023
dff4811
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
brandonkelly Oct 19, 2023
c0bc5a1
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
brandonkelly Oct 30, 2023
3b13f70
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
brandonkelly Nov 1, 2023
a02ffa3
Merge branch '5.0' into feature/dev-1165-edit-element-additional-tool…
brandonkelly Nov 2, 2023
10874c1
A very crumby commit
brandonkelly Nov 2, 2023
7986754
Action menus
brandonkelly Nov 2, 2023
2716b15
Use a site crumb on element index pages
brandonkelly Nov 2, 2023
aed15b8
Action menu button cleanup
brandonkelly Nov 2, 2023
6e7bf9a
Bring the element action menu into selectable chips & cards
brandonkelly Nov 2, 2023
43e8465
"Open in Image Editor"
brandonkelly Nov 2, 2023
5f3afb1
Fixed a couple site menu bugs and made it more configurable
brandonkelly Nov 3, 2023
ef8af19
Element editor updates
brandonkelly Nov 3, 2023
ec84bb9
Merge branch '5.0' into feature/cms-1213-fancy-crumbs-action-menus
brandonkelly Nov 3, 2023
1c48313
Fill in missing user action icons
brandonkelly Nov 3, 2023
566b46b
Merge branch '5.0' into feature/cms-1213-fancy-crumbs-action-menus
brandonkelly Nov 6, 2023
7ac7392
Unused
brandonkelly Nov 7, 2023
c9d2525
Release notes
brandonkelly Nov 7, 2023
b09b3f8
Merge branch '5.0' into feature/cms-1213-fancy-crumbs-action-menus
brandonkelly Nov 7, 2023
23b193c
User inner focus ring for hamburger button
brianjhanson Nov 8, 2023
ccbcd3b
Make `.label-link` focus visible
brianjhanson Nov 8, 2023
54aeab4
Add ability to label disclosure menu button
brianjhanson Nov 9, 2023
0b0b9f8
Separate link from button
brianjhanson Nov 9, 2023
11b61c8
Fix scrollbar flash on load
brianjhanson Nov 9, 2023
61ce86d
Separate current label text from button
brianjhanson Nov 9, 2023
5a16d93
Move icon into link
brianjhanson Nov 9, 2023
de51736
Rebuild
brianjhanson Nov 9, 2023
59ecb94
Hamburger hover follows links
brianjhanson Nov 10, 2023
0ec795d
Darken button text on hover
brianjhanson Nov 10, 2023
2413807
Build assets
brianjhanson Nov 10, 2023
a417e73
Cleanup disclosure menu hover states
brianjhanson Nov 13, 2023
34ae329
Remove titles
brianjhanson Nov 13, 2023
f14da63
Context -> Select context
brianjhanson Nov 13, 2023
96428ac
Revert spacing
brianjhanson Nov 13, 2023
60f0f39
Hide icon
brianjhanson Nov 13, 2023
f18c47b
Fix speak property (hopefully)
brianjhanson Nov 13, 2023
bacfd8e
Remove h6 from revisions menu
brianjhanson Nov 13, 2023
426966f
Refactor status html
brianjhanson Nov 13, 2023
5392c6d
Better error fix
brianjhanson Nov 13, 2023
98f3b0e
Adjust heading level
brianjhanson Nov 13, 2023
bd2885b
Make checkmark unpronouncable
brianjhanson Nov 13, 2023
1f0dc6f
Add hidden selected text
brianjhanson Nov 15, 2023
9862a71
Ability to add `headingAttributes` for menu groups
brianjhanson Nov 15, 2023
0821c2d
Allow customizing item heading tags
brianjhanson Nov 16, 2023
5979732
Merge pull request #13923 from craftcms/feature/cms-1213-fancy-crumbs…
brandonkelly Nov 17, 2023
9713bb2
CSS cleanup
brandonkelly Nov 19, 2023
2edbe82
Merge branch '5.0' into feature/cms-1213-fancy-crumbs-action-menus
brandonkelly Nov 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 42 additions & 3 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Release Notes for Craft CMS 5.0 (WIP)

### Content Management
- Redesigned the global breadcrumb bar to include quick links to other areas of the control panel, page context menus, and action menus. ([#13902](https://github.com/craftcms/cms/pull/13902))
- All elements can now have thumbnails, provided by Assets fields. ([#12484](https://github.com/craftcms/cms/discussions/12484), [#12706](https://github.com/craftcms/cms/discussions/12706))
- Element indexes and relational fields now have the option to use card views. ([#6024](https://github.com/craftcms/cms/pull/6024))
- Element indexes now support inline editing for some custom field values.
- Element chips and cards now include quick action menus. ([#13902](https://github.com/craftcms/cms/pull/13902))
- Entry edit pages now include quick links to other sections’ index sources.
- Asset edit pages now include quick links to other volumes’ index sources.
- Entry conditions can now have a “Matrix field” rule. ([#13794](https://github.com/craftcms/cms/discussions/13794))
- User addresses are now displayed within an embedded element index.
- Selected elements within relational fields now include a context menu with “View in a new tab”, “Edit”, and “Remove” options.
- Selected elements within relational fields now include a dedicated drag handle.
- Selected assets within Assets fields now include a “Preview file” option within their context menu.
- Selected assets within Assets fields no longer open the file preview modal when their thumbnail is clicked on. The “Preview file” context menu option, or <kbd>Shift</kbd> + <kbd>Spacebar</kbd> keyboard shortcut can be used instead.
- Selected assets within Assets fields no longer open the file preview modal when their thumbnail is clicked on. The “Preview file” quick action, or the <kbd>Shift</kbd> + <kbd>Spacebar</kbd> keyboard shortcut, can be used instead.
- Improved the styling of element chips.
- Improved checkbox-style deselection behavior for control panel items, to account for double-clicks.
- Table views are no longer available for element indexes on mobile.
Expand Down Expand Up @@ -48,6 +51,7 @@
- Entry queries now have `field`, `fieldId`, `primaryOwner`, `primaryOwnerId`, `owner`, `ownerId`, `allowOwnerDrafts`, and `allowOwnerRevisions` params.
- Entries’ GraphQL type names are now formatted as `<entryTypeHandle>_Entry`, and are no longer prefixed with their section’s handle. (That goes for Matrix-nested entries as well.)
- Matrix fields’ GraphQL mutation types now expect nested entries to be defined by an `entries` field rather than `blocks`.
- Added the `|firstWhere` and `|flatten` Twig filters.
- Removed the `craft.matrixBlocks()` Twig function. `craft.entries()` should be used instead.
- Controller actions which require a `POST` request will now respond with a 405 error code if another request method is used. ([#13397](https://github.com/craftcms/cms/discussions/13397))

Expand All @@ -59,16 +63,22 @@
- All core element query param methods now return `static` instead of `self`. ([#11868](https://github.com/craftcms/cms/pull/11868))
- Migrations that modify the project config no longer need to worry about whether the same changes were already applied to the incoming project config YAML files.
- Selectize menus no longer apply special styling to options with the value `new`. The `_includes/forms/selectize.twig` control panel template should be used instead (or `craft\helpers\Cp::selectizeHtml()`/`selectizeFieldHtml()`), which will append an styled “Add” option when `addOptionFn` and `addOptionLabel` settings are passed. ([#11946](https://github.com/craftcms/cms/issues/11946))
- Added the `elementChip()` and `elementCard()` global functions for control panel templates.
- Added the `disclosureMenu()`, `elementCard()`, `elementChip()`, `elementIndex()`, and `siteMenuItems()` global functions for control panel templates.
- The `assets/move-asset` and `assets/move-folder` actions no longer include `success` keys in responses. ([#12159](https://github.com/craftcms/cms/pull/12159))
- The `assets/upload` controller action now includes `errors` object in failure responses. ([#12159](https://github.com/craftcms/cms/pull/12159))
- Element action triggers’ `validateSelection()` and `activate()` methods are now passed an `elementIndex` argument, with a reference to the trigger’s corresponding element index.
- Added `craft\base\Element::EVENT_DEFINE_ACTION_MENU_ITEMS`.
- Added `craft\base\Element::EVENT_DEFINE_INLINE_ATTRIBUTE_INPUT_HTML`.
- Added `craft\base\Element::crumbs()`.
- Added `craft\base\Element::destructiveActionMenuItems()`.
- Added `craft\base\Element::inlineAttributeInputHtml()`.
- Added `craft\base\Element::safeActionMenuItems()`.
- Added `craft\base\Element::shouldValidateTitle()`.
- Added `craft\base\ElementContainerFieldInterface`, which should be implemented by fields which contain nested elements, such as Matrix.
- Added `craft\base\ElementInterface::getActionMenuItems()`.
- Added `craft\base\ElementInterface::getCardBodyHtml()`.
- Added `craft\base\ElementInterface::getChipLabelHtml()`.
- Added `craft\base\ElementInterface::getCrumbs()`.
- Added `craft\base\ElementInterface::getInlineAttributeInputHtml()`.
- Added `craft\base\ElementInterface::hasDrafts()`.
- Added `craft\base\ElementInterface::hasThumbs()`.
Expand Down Expand Up @@ -152,9 +162,12 @@
- Added `craft\helpers\ArrayHelper::lastValue()`.
- Added `craft\helpers\Cp::checkboxGroupFieldHtml()`.
- Added `craft\helpers\Cp::checkboxGroupHtml()`.
- Added `craft\helpers\Cp::disclosureMenu()`.
- Added `craft\helpers\Cp::elementCardHtml()`.
- Added `craft\helpers\Cp::elementChipHtml()`.
- Added `craft\helpers\Cp::elementIndexHtml()`.
- Added `craft\helpers\Cp::normalizeMenuItems()`.
- Added `craft\helpers\Cp::siteMenuItems()`.
- Added `craft\helpers\Db::defaultCollation()`.
- Added `craft\helpers\Db::prepareForJsonColumn()`.
- Added `craft\helpers\ElementHelper::actionConfig()`.
Expand Down Expand Up @@ -185,6 +198,15 @@
- Added `craft\services\ProjectConfig::find()`.
- Added `craft\services\ProjectConfig::flush()`.
- Added `craft\services\ProjectConfig::writeYamlFiles()`.
- Added `craft\web\CpScreenResponseBehavior::$actionMenuItems`.
- Added `craft\web\CpScreenResponseBehavior::$contextMenuItems`.
- Added `craft\web\CpScreenResponseBehavior::$selectableSites`.
- Added `craft\web\CpScreenResponseBehavior::$site`.
- Added `craft\web\CpScreenResponseBehavior::actionMenuItems()`.
- Added `craft\web\CpScreenResponseBehavior::contextMenuItems()`.
- Added `craft\web\CpScreenResponseBehavior::selectableSites()`.
- Added `craft\web\CpScreenResponseBehavior::site()`.
- Added `craft\web\Request::getQueryParamsWithoutPath()`.
- Added `craft\web\twig\variables\Cp::getEntryTypeOptions()`.
- All of the `craft\services\Sections` members have been moved into `craft\services\Entries`.
- Renamed `craft\base\BlockElementInterface` to `NestedElementInterface`, and added the `getField()`, `getSortOrder()`, and `setOwner()` methods to it.
Expand Down Expand Up @@ -242,10 +264,13 @@
- `craft\services\Elements::duplicateElement()` no longer has a `$trackDuplication` argument.
- `craft\services\Plugins::getPluginLicenseKeyStatus()` now returns a `craft\enums\LicenseKeyStatus` case.
- `craft\services\ProjectConfig::saveModifiedConfigData()` no longer has a `$writeExternalConfig` argument, and no longer writes out updated project config YAML files.
- `craft\helpers\Html::tag()` and `beginTag()` now ensure that the passed-in attributes are normalized.
- `craft\helpers\Html::normalizeTagAttributes()` now supports a `removeClass` key.
- Deprecated the `_elements/element.twig` control panel template. `elementChip()` or `elementCard()` should be used instead.
- Deprecated the `cp.elements.element` control panel template hook.
- Deprecated `craft\events\DefineElementInnerHtmlEvent`.
- Deprecated `craft\helpers\Cp::elementHtml()`. `elementChipHtml()` or `elementCardHtml()` should be used instead.
- Removed the `_includes/revisionmenu.twig` control panel template.
- Removed `craft\base\ApplicationTrait::getMatrix()`.
- Removed `craft\base\Element::$contentId`.
- Removed `craft\base\Element::ATTR_STATUS_MODIFIED`. `craft\enums\AttributeStatus::Modified` should be used instead.
Expand All @@ -269,6 +294,7 @@
- Removed `craft\controllers\Sections::actionEntryTypesIndex()`.
- Removed `craft\controllers\Sections::actionReorderEntryTypes()`.
- Removed `craft\controllers\Sections::actionSaveEntryType()`.
- Removed `craft\controllers\UsersController::EVENT_REGISTER_USER_ACTIONS`. `craft\base\Element::EVENT_DEFINE_ACTION_MENU_ITEMS` should be used instead.
- Removed `craft\db\Table::FIELDGROUPS`.
- Removed `craft\elements\MatrixBlock`.
- Removed `craft\elements\db\ElementQuery::$contentTable`.
Expand All @@ -280,6 +306,7 @@
- Removed `craft\errors\MatrixBlockTypeNotFoundException`.
- Removed `craft\events\BlockTypesEvent`.
- Removed `craft\events\FieldGroupEvent`.
- Removed `craft\events\RegisterUserActionsEvent`.
- Removed `craft\fields\Matrix::EVENT_SET_FIELD_BLOCK_TYPES`.
- Removed `craft\fields\Matrix::PROPAGATION_METHOD_ALL`. `craft\enums\PropagationMethod::All` should be used instead.
- Removed `craft\fields\Matrix::PROPAGATION_METHOD_CUSTOM`. `craft\enums\PropagationMethod::Custom` should be used instead.
Expand Down Expand Up @@ -348,7 +375,19 @@
- Removed `craft\services\ProjectConfig::PATH_MATRIX_BLOCK_TYPES`.
- Removed `craft\services\ProjectConfig::updateStoredConfigAfterRequest()`.
- Removed `craft\services\Sections::reorderEntryTypes()`.
- Removed `craft\web\CpScreenResponseBehavior::$contextMenuHtml`. `$contextMenuItems` should be used instead.
- Removed `craft\web\CpScreenResponseBehavior::contextMenuHtml()`. `contextMenuItems()` should be used instead.
- Removed `craft\web\CpScreenResponseBehavior::contextMenuTemplate()`. `contextMenuItems()` should be used instead.
- Added `Craft.BaseElementSelectInput::defineElementActions()`.
- Added `Craft.CP::setSiteCrumbMenuItemStatus()`.
- Added `Craft.CP::showSiteCrumbMenuItem()`.
- Added `Craft.CP::updateContext()`.
- Added `Garnish.DisclosureMenu::addGroup()`.
- Added `Garnish.DisclosureMenu::addHr()`.
- Added `Garnish.DisclosureMenu::addItem()`.
- Added `Garnish.DisclosureMenu::createItem()`.
- Added `Garnish.DisclosureMenu::getFirstDestructiveGroup()`.
- Added `Garnish.DisclosureMenu::isPadded()`.
- `Craft.appendBodyHtml()` and `appendHeadHtml()` are now promise-based, and load JavaScript resources over Ajax.

### System
Expand Down
6 changes: 3 additions & 3 deletions packages/craftcms-sass/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ $radioSize: 16px;

@mixin icon {
font-family: 'Craft';
speak: none;
speak: never;
-webkit-font-feature-settings: 'liga', 'dlig';
-moz-font-feature-settings: 'liga=1, dlig=1';
-moz-font-feature-settings: 'liga', 'dlig';
Expand Down Expand Up @@ -612,15 +612,15 @@ $radioSize: 16px;
0 5px 20px transparentize($grey900, 0.75);
}

@mixin menu-option-styles {
@mixin menu-item-styles {
margin: 0 -14px;
padding: 10px 14px;
color: $menuOptionColor;
text-decoration: none;
white-space: nowrap;
}

@mixin menu-option-active-styles {
@mixin menu-item-active-styles {
color: $menuOptionActiveColor;
background-color: $menuOptionActiveBackgroundColor;
}
Expand Down
Loading