Skip to content

Commit fab5ed5

Browse files
authored
Merge pull request #14169 from craftcms/feature/cms-1232-entry-type-icons
Icons and component chips/selects
2 parents 536430e + 9697167 commit fab5ed5

File tree

1,492 files changed

+12773
-3219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,492 files changed

+12773
-3219
lines changed

CHANGELOG-WIP.md

+36-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Table views are no longer available for element indexes on mobile.
2222
- Address conditions now have “Address Line 1”, “Address Line 2”, “Administrative Area”, “Country”, “Dependent Locality”, “First Name”, “Full Name”, “Last Name”, “Locality”, “Organization Tax ID”, “Organization”, “Postal Code”, and “Sorting Code” rules.
2323
- Added live conditional field support to user edit pages. ([#14115](https://github.com/craftcms/cms/pull/14115))
24+
- Earth icons are now localized based on the system time zone.
2425

2526
### User Management
2627
- Added two-step verification support, with built-in “Authenticator App” (TOTP) and “Recovery Codes” methods. Additional methods can be provided by plugins.
@@ -42,8 +43,11 @@
4243
- Relational fields now use the proper list semantics.
4344
- Improved the accessibility of the login page, login modal, and elevated session modal.
4445
- Improved the accessibility of element indexes. ([#14120](https://github.com/craftcms/cms/pull/14120))
46+
- Selected elements within relational fields now include “Move up/down” or “Move forward/backward” in their action menus.
4547

4648
### Administration
49+
- Added the “Icon” entry type setting. ([#14169](https://github.com/craftcms/cms/pull/14169))
50+
- Added the “Icon” field type. ([#14169](https://github.com/craftcms/cms/pull/14169))
4751
- Field layouts can now designate an Assets field as the source for elements’ thumbnails. ([#12484](https://github.com/craftcms/cms/discussions/12484), [#12706](https://github.com/craftcms/cms/discussions/12706))
4852
- Field layouts can now choose to include previewable fields’ content in element cards. ([#12484](https://github.com/craftcms/cms/discussions/12484), [#6024](https://github.com/craftcms/cms/pull/6024))
4953
- Field layouts can now override custom fields’ handles.
@@ -92,7 +96,7 @@
9296
- All core element query param methods now return `static` instead of `self`. ([#11868](https://github.com/craftcms/cms/pull/11868))
9397
- 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.
9498
- 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))
95-
- Added the `disclosureMenu()`, `elementCard()`, `elementChip()`, `elementIndex()`, and `siteMenuItems()` global functions for control panel templates.
99+
- Added the `chip()`, `disclosureMenu()`, `elementCard()`, `elementChip()`, `elementIndex()`, `iconSvg()`, and `siteMenuItems()` global functions for control panel templates.
96100
- The `assets/move-asset` and `assets/move-folder` actions no longer include `success` keys in responses. ([#12159](https://github.com/craftcms/cms/pull/12159))
97101
- The `assets/upload` controller action now includes `errors` object in failure responses. ([#12159](https://github.com/craftcms/cms/pull/12159))
98102
- Element action triggers’ `validateSelection()` and `activate()` methods are now passed an `elementIndex` argument, with a reference to the trigger’s corresponding element index.
@@ -102,7 +106,9 @@
102106
- Added `craft\auth\methods\RecoveryCodes`.
103107
- Added `craft\auth\methods\TOTP`.
104108
- Added `craft\auth\passkeys\CredentialRepository`.
109+
- Added `craft\base\Actionable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
105110
- Added `craft\base\ApplicationTrait::getAuth()`.
111+
- Added `craft\base\Chippable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
106112
- Added `craft\base\Element::EVENT_DEFINE_ACTION_MENU_ITEMS`.
107113
- Added `craft\base\Element::EVENT_DEFINE_INLINE_ATTRIBUTE_INPUT_HTML`.
108114
- Added `craft\base\Element::crumbs()`.
@@ -133,10 +139,14 @@
133139
- Added `craft\base\FieldLayoutElement::isMultiInstance()`.
134140
- Added `craft\base\FieldLayoutProviderInterface::getHandle()`.
135141
- Added `craft\base\FieldTrait::$layoutElement`.
142+
- Added `craft\base\Iconic`. ([#14169](https://github.com/craftcms/cms/pull/14169))
143+
- Added `craft\base\Identifiable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
136144
- Added `craft\base\InlineEditableFieldInterface`.
137145
- Added `craft\base\NestedElementInterface`, which should be implemented by element types which could be nested by other elements.
138146
- Added `craft\base\NestedElementTrait`.
147+
- Added `craft\base\Statusable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
139148
- Added `craft\base\ThumbableFieldInterface`.
149+
- Added `craft\base\Thumbable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
140150
- Added `craft\base\conditions\ConditionInterface::createConditionRule()`.
141151
- Added `craft\behaviors\EventBehavior`.
142152
- Added `craft\controllers\EntryTypesController`.
@@ -223,12 +233,25 @@
223233
- Added `craft\helpers\App::isWindows()`.
224234
- Added `craft\helpers\App::silence()`.
225235
- Added `craft\helpers\ArrayHelper::lastValue()`.
236+
- Added `craft\helpers\Cp::CHIP_SIZE_LARGE`.
237+
- Added `craft\helpers\Cp::CHIP_SIZE_SMALL`.
226238
- Added `craft\helpers\Cp::checkboxGroupFieldHtml()`.
227239
- Added `craft\helpers\Cp::checkboxGroupHtml()`.
240+
- Added `craft\helpers\Cp::chipHtml()`.
241+
- Added `craft\helpers\Cp::customSelectFieldHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
242+
- Added `craft\helpers\Cp::customSelectHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
228243
- Added `craft\helpers\Cp::disclosureMenu()`.
244+
- Added `craft\helpers\Cp::earthIcon()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
229245
- Added `craft\helpers\Cp::elementCardHtml()`.
230246
- Added `craft\helpers\Cp::elementChipHtml()`.
231247
- Added `craft\helpers\Cp::elementIndexHtml()`.
248+
- Added `craft\helpers\Cp::entryTypeSelectFieldHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
249+
- Added `craft\helpers\Cp::entryTypeSelectHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
250+
- Added `craft\helpers\Cp::fallbackIconSvg()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
251+
- Added `craft\helpers\Cp::iconPickerFieldHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
252+
- Added `craft\helpers\Cp::iconPickerHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
253+
- Added `craft\helpers\Cp::iconSvg()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
254+
- Added `craft\helpers\Cp::menuItem()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
232255
- Added `craft\helpers\Cp::moneyFieldHtml()`.
233256
- Added `craft\helpers\Cp::moneyInputHtml()`.
234257
- Added `craft\helpers\Cp::normalizeMenuItems()`.
@@ -312,6 +335,7 @@
312335
- Renamed `craft\base\ElementInterface::getTableAttributeHtml()` to `getAttributeHtml()`.
313336
- Renamed `craft\base\FieldInterface::valueType()` to `phpType()`.
314337
- Renamed `craft\base\PreviewableFieldInterface::getTableAttributeHtml()` to `getPreviewHtml()`.
338+
- Renamed `craft\base\UtilityInterface::iconPath()` to `icon()`, which can now return a system icon name. ([#14169](https://github.com/craftcms/cms/pull/14169))
315339
- Renamed `craft\base\conditions\BaseCondition::EVENT_REGISTER_CONDITION_RULE_TYPES` to `EVENT_REGISTER_CONDITION_RULES`.
316340
- Renamed `craft\base\conditions\BaseCondition::conditionRuleTypes()` to `selectableConditionRules()`.
317341
- Renamed `craft\events\BatchElementActionEvent` to `MultiElementActionEvent`.
@@ -344,6 +368,7 @@
344368
- `craft\base\ElementInterface::setRevisionNotes()` no longer needs to specify a default value for the `notes` argument.
345369
- `craft\base\Field::inputHtml()` now has an `$inline` argument.
346370
- `craft\base\FieldInterface::getIsTranslatable()`, `getTranslationDescription()`, `getInputHtml()`, `normalizeValue()`, `normalizeValueFromRequest()`, and `serializeValue()` no longer need to specify a default value for the `$element` argument.
371+
- `craft\base\WidgetInterface::icon()` can now return a system icon name. ([#14169](https://github.com/craftcms/cms/pull/14169))
347372
- `craft\db\Connection::getSupportsMb4()` is now dynamic for MySQL installs, based on whether the `elements_sites` table has an `mb4` charset.
348373
- `craft\elemens\db\ElementQueryInterface::collect()` now has an `ElementCollection` return type, rather than `Collection`.
349374
- `craft\elements\Entry::getSection()` can now return `null`, for nested entries.
@@ -352,11 +377,13 @@
352377
- `craft\events\AuthenticateUserEvent::$password` can now be null, if the user is being authenticated with a passkey.
353378
- `craft\fields\BaseOptionsField::$multi` and `$optgroups` properties are now static.
354379
- `craft\fields\Matrix::$propagationMethod` now has a type of `craft\enums\PropagationMethod`.
380+
- `craft\fields\fieldlayoutelements\BaseUiElement::selectorIcon()` can now return a system icon name. ([#14169](https://github.com/craftcms/cms/pull/14169))
355381
- `craft\gql\mutations\Entry::createSaveMutations()` now accepts a `$section` argument.
356382
- `craft\helpers\Cp::fieldHtml()` now supports a `labelExtra` config value.
357383
- `craft\helpers\Db::parseParam()`, `parseDateParam()`, `parseMoneyParam()`, and `parseNumericParam()` now return `null` instead of an empty string if no condition should be applied.
358384
- `craft\helpers\Html::id()` and `Craft.formatInputId()` now retain colons and periods, and ensure the string begins with a letter.
359385
- `craft\helpers\Html::normalizeTagAttributes()` now supports a `removeClass` key.
386+
- `craft\helpers\Html::svg()` now has a `$throwException` argument.
360387
- `craft\helpers\Html::tag()` and `beginTag()` now ensure that the passed-in attributes are normalized.
361388
- `craft\helpers\StringHelper::toString()` now supports backed enums.
362389
- `craft\i18n\I18N::getPrimarySiteLocale()` is now deprecated. `craft\models\Site::getLocale()` should be used instead.
@@ -377,11 +404,15 @@
377404
- `craft\services\Users::unshunMessageForUser()` now has a `void` return type, and throws an `InvalidElementException` in case of failure.
378405
- `craft\services\Users::unsuspendUser()` now has a `void` return type, and throws an `InvalidElementException` in case of failure.
379406
- `craft\services\Users::verifyEmailForUser()` now has a `void` return type, and throws an `InvalidElementException` in case of failure.
380-
- Deprecated the `_elements/element.twig` control panel template. `elementChip()` or `elementCard()` should be used instead.
381-
- Deprecated the `cp.elements.element` control panel template hook.
407+
- `craft\web\Controller::asModelSuccess()` now includes a `modelClass` key in the response data (and `modelId` if the model implements `craft\base\Identifiable`).
382408
- Deprecated `craft\events\DefineElementInnerHtmlEvent`.
383409
- Deprecated `craft\events\SearchEvent::$siteId`.
410+
- Deprecated `craft\helpers\Component::iconSvg()`. `craft\helpers\Cp::iconSvg()` and `fallbackIconSvg()` should be used instead. ([#14169](https://github.com/craftcms/cms/pull/14169))
411+
- Deprecated `craft\helpers\Cp::ELEMENT_SIZE_LARGE`. `CHIP_SIZE_LARGE` should be used instead.
412+
- Deprecated `craft\helpers\Cp::ELEMENT_SIZE_SMALL`. `CHIP_SIZE_SMALL` should be used instead.
384413
- Deprecated `craft\helpers\Cp::elementHtml()`. `elementChipHtml()` or `elementCardHtml()` should be used instead.
414+
- Deprecated the `_elements/element.twig` control panel template. `elementChip()` or `elementCard()` should be used instead.
415+
- Deprecated the `cp.elements.element` control panel template hook.
385416
- Removed the `_includes/revisionmenu.twig` control panel template.
386417
- Removed `craft\base\ApplicationTrait::getMatrix()`.
387418
- Removed `craft\base\Element::$contentId`.
@@ -492,6 +523,7 @@
492523
- Removed `craft\web\CpScreenResponseBehavior::contextMenuHtml()`. `contextMenuItems()` should be used instead.
493524
- Removed `craft\web\CpScreenResponseBehavior::contextMenuTemplate()`. `contextMenuItems()` should be used instead.
494525
- Removed `craft\web\User::startElevatedSession()`. `login()` should be used instead.
526+
- Removed `craft\web\twig\variables\Cp::getEntryTypeOptions()`.
495527
- Added `Craft.BaseElementSelectInput::defineElementActions()`.
496528
- Added `Craft.CP::setSiteCrumbMenuItemStatus()`.
497529
- Added `Craft.CP::showSiteCrumbMenuItem()`.
@@ -520,6 +552,7 @@
520552
- Slugs are no longer required for elements that don’t have a URI format that contains `slug`.
521553
- Fixed a bug where multi-site element queries weren’t scoring elements on a per-site basis. ([#13801](https://github.com/craftcms/cms/discussions/13801))
522554
- Fixed an error that could occur if eager-loading aliases conflicted with native eager-loading handles, such as `author`. ([#14057](https://github.com/craftcms/cms/issues/14057))
555+
- Added an SVG icon set based on Font Awesome 6.5.1. ([#14169](https://github.com/craftcms/cms/pull/14169))
523556
- Updated Monolog to v3.
524557
- Updated Axios to 1.6.5.
525558
- Updated D3 to 7.8.5.

CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@
22

33
## Unreleased
44

5+
- Added the “Icon” entry type setting. ([#14169](https://github.com/craftcms/cms/pull/14169))
6+
- Added the “Icon” field type. ([#14169](https://github.com/craftcms/cms/pull/14169))
7+
- Added an SVG icon set based on Font Awesome 6.5.1. ([#14169](https://github.com/craftcms/cms/pull/14169))
8+
- Earth icons are now localized based on the system time zone.
9+
- Selected elements within relational fields now include “Move up/down” or “Move forward/backward” in their action menus.
10+
- Sections’ and Matrix fields’ Entry Types settings now use an entry type select input, with support for reordering selected entry types, and editing entry types via slideouts. ([#14169](https://github.com/craftcms/cms/pull/14169))
11+
- Added `craft\base\Actionable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
12+
- Added `craft\base\Chippable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
13+
- Added `craft\base\Iconic`. ([#14169](https://github.com/craftcms/cms/pull/14169))
14+
- Added `craft\base\Identifiable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
15+
- Added `craft\base\Statusable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
16+
- Added `craft\base\Thumbable`. ([#14169](https://github.com/craftcms/cms/pull/14169))
17+
- Added `craft\helpers\Cp::CHIP_SIZE_LARGE`.
18+
- Added `craft\helpers\Cp::CHIP_SIZE_SMALL`.
19+
- Added `craft\helpers\Cp::chipHtml()`.
20+
- Added `craft\helpers\Cp::customSelectFieldHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
21+
- Added `craft\helpers\Cp::customSelectHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
22+
- Added `craft\helpers\Cp::earthIcon()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
23+
- Added `craft\helpers\Cp::entryTypeSelectFieldHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
24+
- Added `craft\helpers\Cp::entryTypeSelectHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
25+
- Added `craft\helpers\Cp::fallbackIconSvg()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
26+
- Added `craft\helpers\Cp::iconPickerFieldHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
27+
- Added `craft\helpers\Cp::iconPickerHtml()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
28+
- Added `craft\helpers\Cp::iconSvg()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
29+
- Added `craft\helpers\Cp::menuItem()`. ([#14169](https://github.com/craftcms/cms/pull/14169))
30+
- Renamed `craft\base\UtilityInterface::iconPath()` to `icon()`, which can now return a system icon name. ([#14169](https://github.com/craftcms/cms/pull/14169))
31+
- `craft\base\WidgetInterface::icon()` can now return a system icon name. ([#14169](https://github.com/craftcms/cms/pull/14169))
32+
- `craft\fields\fieldlayoutelements\BaseUiElement::selectorIcon()` can now return a system icon name. ([#14169](https://github.com/craftcms/cms/pull/14169))
33+
- `craft\helpers\Html::svg()` now has a `$throwException` argument.
34+
- `craft\web\Controller::asModelSuccess()` now includes a `modelClass` key in the response data (and `modelId` if the model implements `craft\base\Identifiable`).
35+
- Deprecated `craft\helpers\Component::iconSvg()`. `craft\helpers\Cp::iconSvg()` and `fallbackIconSvg()` should be used instead. ([#14169](https://github.com/craftcms/cms/pull/14169))
36+
- Deprecated `craft\helpers\Cp::ELEMENT_SIZE_LARGE`. `CHIP_SIZE_LARGE` should be used instead.
37+
- Deprecated `craft\helpers\Cp::ELEMENT_SIZE_SMALL`. `CHIP_SIZE_SMALL` should be used instead.
38+
- Removed `craft\web\twig\variables\Cp::getEntryTypeOptions()`.
39+
- Added the `chip()` and `iconSvg()` global functions for control panel templates.
540
- Fixed a bug where paths passed to `craft\web\CpScreenResponseBehavior::editUrl()` weren’t getting resolved to absolute URLs.
641
- Fixed an error that occurred when switching entry types, if the entry had any Matrix fields.
742

0 commit comments

Comments
 (0)