diff --git a/CHANGELOG.md b/CHANGELOG.md index c47f850786..08fe642b79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # Release Notes +## 5.39.0 (2024-11-22) + +### What's new +- Field actions [#10352](https://github.com/statamic/cms/issues/10352) by @jacksleight +- Field action modals [#11129](https://github.com/statamic/cms/issues/11129) by @jacksleight +- Add ArrayableString to Blade value helper [#11041](https://github.com/statamic/cms/issues/11041) by @ajnsn +- Add `always_augment_to_query` option [#11086](https://github.com/statamic/cms/issues/11086) by @jacksleight + +### What's fixed +- Fix multisite command not moving directories [#11105](https://github.com/statamic/cms/issues/11105) by @duncanmcclean +- Fix asset folder sort across pages [#11130](https://github.com/statamic/cms/issues/11130) by @daun +- Avoid creation of duplicate terms in typeahead input [#11060](https://github.com/statamic/cms/issues/11060) by @daun +- Fix error when using user ID as folder name for avatar asset field in non-admin context [#11141](https://github.com/statamic/cms/issues/11141) by @jonasemde +- Fix incorrect namespaces in tests [#11149](https://github.com/statamic/cms/issues/11149) by @duncanmcclean +- Prevent `str_replace` warning when using Debugbar [#11148](https://github.com/statamic/cms/issues/11148) by @duncanmcclean + + + +## 5.38.1 (2024-11-19) + +### What's fixed +- Fix issue when preprocessing dictionary config [#11133](https://github.com/statamic/cms/issues/11133) by @duncanmcclean +- Prevent unnecessary requests to the Outpost when PHP version is different [#11137](https://github.com/statamic/cms/issues/11137) by @duncanmcclean +- Fix bard text trimming when CP is on root URL [#11127](https://github.com/statamic/cms/issues/11127) by @jacksleight +- Hide "Localizable" button in asset blueprints [#11118](https://github.com/statamic/cms/issues/11118) by @duncanmcclean +- Add upload path traversal tests [#11139](https://github.com/statamic/cms/issues/11139) by @jasonvarga +- Prevent asset folder path traversal [#11136](https://github.com/statamic/cms/issues/11136) by @jasonvarga +- More path traversal fixes [#11140](https://github.com/statamic/cms/issues/11140) by @jasonvarga +- Italian translations [#11145](https://github.com/statamic/cms/issues/11145) by @gioppy + + + ## 5.38.0 (2024-11-12) ### What's new diff --git a/config/system.php b/config/system.php index 95f4c797ff..fc04ee4b02 100644 --- a/config/system.php +++ b/config/system.php @@ -168,6 +168,19 @@ 'update_references' => true, + /* + |-------------------------------------------------------------------------- + | Always Augment to Query + |-------------------------------------------------------------------------- + | + | By default, Statamic will augment relationship fields with max_items: 1 + | to the result of a query, for example an Entry instance. Setting this + | to true will augment to the query builder instead of the result. + | + */ + + 'always_augment_to_query' => false, + /* |-------------------------------------------------------------------------- | Row ID handle diff --git a/resources/css/components/fieldtypes/bard.css b/resources/css/components/fieldtypes/bard.css index 0a26a9c822..be75f358eb 100644 --- a/resources/css/components/fieldtypes/bard.css +++ b/resources/css/components/fieldtypes/bard.css @@ -206,7 +206,7 @@ ========================================================================== */ .bard-fullscreen { - @apply fixed bg-gray-200 dark:bg-dark-700 inset-0 min-h-screen overflow-scroll rounded-none pt-16; + @apply fixed bg-gray-200 dark:bg-dark-700 inset-0 min-h-screen overflow-scroll rounded-none pt-14; & > .bard-editor { @apply bg-white dark:bg-dark-800 shadow dark:shadow-dark max-w-xl mx-auto rounded relative my-6 px-8; diff --git a/resources/css/components/fieldtypes/code.css b/resources/css/components/fieldtypes/code.css index 7b411b7775..63f34caf42 100644 --- a/resources/css/components/fieldtypes/code.css +++ b/resources/css/components/fieldtypes/code.css @@ -12,13 +12,14 @@ } } -.code-fieldtype-toolbar select { +.code-fieldtype-toolbar select, +.code-fieldtype-toolbar-fullscreen select { @apply h-8 text-sm leading-none; } .code-fieldtype-container.code-fullscreen { - @apply fixed bg-gray-200 dark:bg-dark-600 inset-0 min-h-screen overflow-scroll rounded-none pt-12; + @apply fixed bg-gray-200 dark:bg-dark-600 inset-0 min-h-screen overflow-scroll rounded-none pt-14; .code-fieldtype-toolbar { @apply fixed z-2 top-0 w-full px-6 py-2 h-12 shadow dark:shadow-dark text-base rounded-none bg-gradient-to-b from-white to-gray-100 dark:from-dark-550 dark:to-dark-600; diff --git a/resources/css/components/fieldtypes/markdown.css b/resources/css/components/fieldtypes/markdown.css index 9c824f2f71..de611e1354 100644 --- a/resources/css/components/fieldtypes/markdown.css +++ b/resources/css/components/fieldtypes/markdown.css @@ -212,13 +212,12 @@ } .markdown-fieldtype-wrapper.markdown-fullscreen { - @apply fixed bg-gray-200 inset-0 min-h-screen overflow-scroll rounded-none pt-16; + @apply fixed bg-gray-200 inset-0 min-h-screen overflow-scroll rounded-none pt-14 border-0; /* padding-top: 52px; offset the nav */ will-change: transform; .markdown-toolbar { - @apply fixed top-0 w-full px-6 py-2 h-12 shadow text-base flex items-center justify-between; - @apply bg-gradient-to-b from-white to-gray-100; + @apply border-0; } .mode-wrap { diff --git a/resources/css/components/publish.css b/resources/css/components/publish.css index 1095093f76..9c2e52c5cf 100644 --- a/resources/css/components/publish.css +++ b/resources/css/components/publish.css @@ -70,6 +70,20 @@ code.parent-url { @apply absolute inset-0 cursor-not-allowed bg-white/25; z-index: 100; } + + .has-field-dropdown { + .field-inner { + @apply pr-6; + } + .field-dropdown { + @apply block absolute bottom-[-3px] right-0; + } + &:not(.has-field-label) { + .field-inner { + @apply min-h-[19.5px] mb-2; + } + } + } } .publish-field { diff --git a/resources/css/elements/buttons.css b/resources/css/elements/buttons.css index a6d9049fca..fd69a9d664 100644 --- a/resources/css/elements/buttons.css +++ b/resources/css/elements/buttons.css @@ -291,6 +291,19 @@ td .btn-icon { } } +.btn-quick-action { + @apply text-center p-0 text-xl text-gray-600 dark:text-dark-150 rounded-full w-8 h-8 outline-none shrink-0 leading-none inline-flex items-center justify-center; + + &:hover { + @apply bg-gray-400 dark:bg-dark-700; + } + + &:active, &:focus:hover { + outline: none; + @apply bg-gray-500 dark:bg-dark-750; + } +} + .super-btn { @apply p-4 flex items-start hover:bg-gray-200 border border-transparent rounded-md space-x-4 rtl:space-x-reverse; @apply dark:hover:bg-dark-575 dark:hover:border-dark-400; diff --git a/resources/css/elements/dropdowns.css b/resources/css/elements/dropdowns.css index bc47b91285..e75a7077ed 100644 --- a/resources/css/elements/dropdowns.css +++ b/resources/css/elements/dropdowns.css @@ -51,4 +51,44 @@ .align-left & { right: auto ; [dir="rtl"] & { right: auto ; left: auto ; } } + } + +.quick-list { + + @apply relative; + + .quick-list-content { + @apply absolute top-1/2 right-full mr-[8px] -translate-y-1/2 min-w-max transition origin-right flex bg-white dark:bg-dark-550 shadow-quick rounded-full p-0.5; + &::before { + content: ''; + position: absolute; + inset: -8px -8px -8px -20px; + z-index: -1; + } + button, a { + @apply rounded-full p-1.5 text-gray-800 dark:text-dark-100 flex shrink-0; + &:hover { + @apply bg-blue text-white; + } + } + &:empty { + @apply hidden; + } + } + + button.warning, a.warning { + @apply text-red-500; + + &:hover { + @apply bg-red-500 text-white; + } + } + + &:not(:hover) { + .quick-list-content { + @apply opacity-0 pointer-events-none scale-[0.85]; + } + } + +} \ No newline at end of file diff --git a/resources/css/vendors/codemirror.css b/resources/css/vendors/codemirror.css index e36f5f6383..93377c0fec 100644 --- a/resources/css/vendors/codemirror.css +++ b/resources/css/vendors/codemirror.css @@ -342,7 +342,7 @@ .CodeMirror-fullscreen { - @apply fixed h-auto inset-0 top-12 rounded-none; + @apply fixed h-auto inset-0 pt-14 rounded-none; } .CodeMirror-rulers { diff --git a/resources/js/app.js b/resources/js/app.js index 40cfdd4f7c..90c5616dae 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -67,6 +67,7 @@ Vue.prototype.$echo = Statamic.$echo; Vue.prototype.$bard = Statamic.$bard; Vue.prototype.$keys = Statamic.$keys; Vue.prototype.$reveal = Statamic.$reveal; +Vue.prototype.$fieldActions = Statamic.$fieldActions; Vue.prototype.$slug = Statamic.$slug; import Moment from 'moment'; diff --git a/resources/js/bootstrap/components.js b/resources/js/bootstrap/components.js index 545539ab3e..b909ca0ff2 100644 --- a/resources/js/bootstrap/components.js +++ b/resources/js/bootstrap/components.js @@ -8,7 +8,9 @@ import PublishForm from '../components/publish/PublishForm.vue'; import Fields from '../components/publish/Fields.vue'; import FieldsContainer from '../components/publish/FieldsContainer.vue'; // deprecated import Field from '../components/publish/Field.vue'; +import FullscreenHeader from '../components/publish/FullscreenHeader.vue'; import FieldMeta from '../components/publish/FieldMeta.vue'; +import FieldActions from '../components/field-actions/FieldActions.vue'; import ConfigureTabs from '../components/configure/Tabs.vue'; import PublishTabs from '../components/publish/Tabs.vue'; import PublishSections from '../components/publish/Sections.vue'; @@ -56,6 +58,7 @@ import Modal from '../components/Modal.vue'; import ConfirmationModal from '../components/modals/ConfirmationModal.vue'; import FavoriteCreator from '../components/FavoriteCreator.vue'; import KeyboardShortcutsModal from '../components/modals/KeyboardShortcutsModal.vue'; +import FieldActionModal from '../components/field-actions/FieldActionModal.vue'; import ResourceDeleter from '../components/ResourceDeleter.vue'; import Stack from '../components/stacks/Stack.vue'; import StackTest from '../components/stacks/StackTest.vue'; @@ -77,6 +80,8 @@ Vue.component('publish-fields', Fields); Vue.component('publish-fields-container', FieldsContainer); Vue.component('publish-field', Field); Vue.component('publish-field-meta', FieldMeta); +Vue.component('publish-field-actions', FieldActions); +Vue.component('publish-field-fullscreen-header', FullscreenHeader); Vue.component('configure-tabs', ConfigureTabs); Vue.component('publish-tabs', PublishTabs); Vue.component('publish-sections', PublishSections); @@ -140,6 +145,7 @@ Vue.component('confirmation-modal', ConfirmationModal); Vue.component('favorite-creator', FavoriteCreator); Vue.component('keyboard-shortcuts-modal', KeyboardShortcutsModal); Vue.component('resource-deleter', ResourceDeleter); +Vue.component('field-action-modal', FieldActionModal); Vue.component('stack', Stack); Vue.component('stack-test', StackTest); diff --git a/resources/js/components/DropdownList.vue b/resources/js/components/DropdownList.vue index 72329edeab..cb90e5cb0f 100644 --- a/resources/js/components/DropdownList.vue +++ b/resources/js/components/DropdownList.vue @@ -1,8 +1,8 @@