Skip to content

Commit

Permalink
Merge branch '5.x' into feature/allow-asset-containers-to-be-ordered
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Jun 5, 2024
2 parents 6510857 + 6f8c4c2 commit 351ef06
Show file tree
Hide file tree
Showing 115 changed files with 1,734 additions and 416 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: steps.should-run-tests.outputs.result == 'true'
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
extensions: fileinfo, exif, gd, pdo, sqlite, pdo_sqlite
coverage: none

- name: Install dependencies
Expand Down
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,85 @@
# Release Notes

## 5.7.0 (2024-06-04)

### What's new
- Validation may be added to asset containers for file uploads [#10227](https://github.com/statamic/cms/issues/10227) by @edalzell
- Allow overriding `statusIcons` property in relationship fieldtype [#10253](https://github.com/statamic/cms/issues/10253) by @duncanmcclean

### What's fixed
- Merge defaults into field publish arrays [#10246](https://github.com/statamic/cms/issues/10246) by @jasonvarga
- Merge config field defaults into field config [#10139](https://github.com/statamic/cms/issues/10139) by @duncanmcclean
- Fix dark mode entry and navigation deletion modals [#10254](https://github.com/statamic/cms/issues/10254) by @aaronbushnell
- Fix broken docs URLs; rename docs URL redirect to permalink [#10249](https://github.com/statamic/cms/issues/10249) by @rob
- Localize field titles in collection filter [#10250](https://github.com/statamic/cms/issues/10250) by @robdekort
- Only run parent code in `Revisable` trait when item is an entry [#10245](https://github.com/statamic/cms/issues/10245) by @duncanmcclean
- Make `select` field values in entry tables localizable [#10241](https://github.com/statamic/cms/issues/10241) by @robdekort
- Fix styling of "Live Preview" and "Visit URL" buttons on terms publish form [#10237](https://github.com/statamic/cms/issues/10237) by @duncanmcclean
- Use multibyte methods for obfuscate [#10201](https://github.com/statamic/cms/issues/10201) by @lakkes-ra
- Ensure `prose`-based strong tag is readable in dark mode [#10236](https://github.com/statamic/cms/issues/10236) by @aaronbushnell
- Fix relative modifier test [#10242](https://github.com/statamic/cms/issues/10242) by @jasonvarga
- Decrease the failure rate of RandomTest [#10238](https://github.com/statamic/cms/issues/10238) by @jasonvarga
- Address slow Windows GitHub actions [#10243](https://github.com/statamic/cms/issues/10243) by @jasonvarga
- Danish translations [#10231](https://github.com/statamic/cms/issues/10231) by @mortenebak
- Norwegian translations [#10248](https://github.com/statamic/cms/issues/10248) by @espenlg



## 5.6.2 (2024-05-30)

### What's fixed
- Prevent user registration form saving `password_confirmation` [#10228](https://github.com/statamic/cms/issues/10228) by @ryanmitchell
- Fix needing to deselect an asset to reselect when using max_files 1 [#10225](https://github.com/statamic/cms/issues/10225) by @jackmcdade
- Allow long bard/replicator set names to wrap [#10223](https://github.com/statamic/cms/issues/10223) by @jackmcdade
- Fix Code fieldtype not removing the overflow hidden style on body when closing Fullscreen Mode [#10221](https://github.com/statamic/cms/issues/10221) by @jackmcdade


## 5.6.1 (2024-05-29)

### What's fixed
- Revert `select` modifier. [#10218](https://github.com/statamic/cms/issues/10218) by @jasonvarga
- Make label on Add Set button localizable [#10216](https://github.com/statamic/cms/issues/10216) by @duncanmcclean
- Fix JavaScript length error from Add Set button label [#10217](https://github.com/statamic/cms/issues/10217) by @duncanmcclean
- French translations [#10209](https://github.com/statamic/cms/issues/10209) by @ebeauchamps
- Danish translations [#10214](https://github.com/statamic/cms/issues/10214) by @mortenebak



## 5.6.0 (2024-05-28)

### What's new
- Allow extra `x-data` to be passed to alpine forms [#10174](https://github.com/statamic/cms/issues/10174) by @ryanmitchell
- Add `to_qs` modifier [#10196](https://github.com/statamic/cms/issues/10196) by @godismyjudge95
- Add `site` filter to TermsQuery [#10131](https://github.com/statamic/cms/issues/10131) by @arcs-
- Add `keys` and `values` modifiers [#10185](https://github.com/statamic/cms/issues/10185) by @godismyjudge95
- Add `merge` method to Eloquent User class [#10192](https://github.com/statamic/cms/issues/10192) by @duncanmcclean
- Add `depth` parameter to `flatten` modifier [#10187](https://github.com/statamic/cms/issues/10187) by @godismyjudge95
- ~Add `select` modifier~ (Reverted in 5.6.1) [#10183](https://github.com/statamic/cms/issues/10183) by @godismyjudge95
- Replicator "add set" button label option [#9806](https://github.com/statamic/cms/issues/9806) by @godismyjudge95

### What's fixed
- Static caching file path fallback [#9306](https://github.com/statamic/cms/issues/9306) by @royduin
- Fix error when augmenting Bard fields [#10104](https://github.com/statamic/cms/issues/10104) by @duncanmcclean
- Fix `ensureFieldHasConfig` for imported fields [#9243](https://github.com/statamic/cms/issues/9243) by @aerni
- Allows Antlers & Blade stacks to be used interchangeably [#10200](https://github.com/statamic/cms/issues/10200) by @JohnathonKoster
- Fix error when serializing eloquent query builders [#10189](https://github.com/statamic/cms/issues/10189) by @duncanmcclean
- Fix `@see` in docblock on `FormSubmission` facade [#10197](https://github.com/statamic/cms/issues/10197) by @duncanmcclean
- Maintain order of views after renaming [#10193](https://github.com/statamic/cms/issues/10193) by @duncanmcclean
- Filter out global set variables associated to deleted sites [#10195](https://github.com/statamic/cms/issues/10195) by @duncanmcclean
- Prevent some folders from listing in template fieldtype [#10031](https://github.com/statamic/cms/issues/10031) by @peimn
- Handle `null` in `bardText` modifier [#10199](https://github.com/statamic/cms/issues/10199) by @edalzell
- Fix border and shadow in closed nav [#10186](https://github.com/statamic/cms/issues/10186) by @peimn
- Fix link fieldtype state [#10182](https://github.com/statamic/cms/issues/10182) by @jasonvarga
- Fix Dark Mode Tree Node margins. [#10179](https://github.com/statamic/cms/issues/10179) by @jackmcdade
- Fix wrong dark mode colors in the updater [#10178](https://github.com/statamic/cms/issues/10178) by @jackmcdade
- Add dark mode to new User Wizard [#10171](https://github.com/statamic/cms/issues/10171) by @martyf
- Fix dark mode for Set Picker [#10173](https://github.com/statamic/cms/issues/10173) by @martyf
- Add dark mode support for list items [#10172](https://github.com/statamic/cms/issues/10172) by @martyf
- German translations [#10175](https://github.com/statamic/cms/issues/10175) by @helloDanuk
- French translations [#10170](https://github.com/statamic/cms/issues/10170) by @ebeauchamps



## 5.5.0 (2024-05-22)

### What's new
Expand Down
2 changes: 1 addition & 1 deletion resources/css/components/fieldtypes/assets.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

.assets-fieldtype .drag-drop-text {
@apply rtl:mr-1 ltr:ml-1 text-gray-700;
@apply rtl:mr-1 ltr:ml-1 text-gray-700 dark:text-dark-175;
}

.assets-fieldtype .asset-upload-control {
Expand Down
4 changes: 4 additions & 0 deletions resources/css/components/nav-main.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
.showing-license-banner & {
height: calc(100% - 105px);
}

.nav-closed & {
@apply border-0 shadow-none;
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions resources/css/components/page-tree.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
}
}

.tree-node-children {
@apply dark:mt-1;
}

.draggable-placeholder-inner {
border: 1px dashed #0088F8;
background: rgba(0, 136, 249, 0.09);
Expand Down
5 changes: 3 additions & 2 deletions resources/css/components/updater.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
.update-release {

.date {
@apply font-normal text-gray;
@apply font-normal text-gray dark:text-dark-175;
}

p {
Expand Down Expand Up @@ -78,8 +78,9 @@
width: 6px;
content: "";
top: 7px;
left: 4px ; [dir="rtl"] & { left: auto ; right: 4px ; }
left: 4px ; [dir="rtl"] & { left: auto ; right: 4px ; }

.dark & { @apply bg-dark-200; }
}

.label {
Expand Down
15 changes: 12 additions & 3 deletions resources/css/components/wizard.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@

.step.complete:before,
.step.complete:after {
@apply bg-blue;
@apply bg-blue !important;
}

.ball {
@apply h-10 w-10 bg-gray-300 text-gray text-base rounded-full text-center z-10 mx-auto relative;
@apply h-10 w-10 bg-gray-300 dark:bg-dark-800 text-gray dark:text-dark-150 text-base rounded-full text-center z-10 mx-auto relative;
line-height: 40px;
}

.label {
@apply text-xs mt-1 text-gray;
@apply text-xs mt-1 text-gray dark:text-dark-175;
}

.complete {
Expand All @@ -42,3 +42,12 @@
}
}
}

.dark {
.wizard-steps {
.step:not(:first-child):before,
.step:not(:first-child):after {
@apply bg-dark-800;
}
}
}
2 changes: 1 addition & 1 deletion resources/css/dark.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.prose {
@apply dark:text-dark-150;

:where(h2), :where(h3) {
:where(h2), :where(h3), :where(strong) {
&:not(:where([class~=not-prose] *)) {
@apply dark:text-dark-100;
}
Expand Down
4 changes: 3 additions & 1 deletion resources/js/components/assets/Browser/Browser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ export default {
const i = this.selectedAssets.indexOf(id);
this.$refs.browser.focus()
if (i != -1) {
if (this.maxFiles === 1) {
this.selectedAssets = [id];
} else if (i != -1) {
this.selectedAssets.splice(i, 1);
} else if (! this.reachedSelectionLimit) {
if ($event.shiftKey && this.lastItemClicked !== null) {
Expand Down
6 changes: 5 additions & 1 deletion resources/js/components/assets/Uploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default {
response.status === 200
? this.handleUploadSuccess(id, json)
: this.handleUploadError(id, status, json);
: this.handleUploadError(id, response.status, json);
});
},
Expand All @@ -204,6 +204,10 @@ export default {
} else {
msg = __('Upload failed. The file might be larger than is allowed by your server.');
}
} else {
if (status === 422) {
msg = Object.values(response.errors)[0][0]; // Get first validation message.
}
}
upload.errorMessage = msg;
this.$emit('error', upload, this.uploads);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<div class="text-lg font-medium p-4 pb-0">
{{ __('Delete Entry') }}
</div>
<div class="flex-1 px-4 py-6 text-gray">
<div class="flex-1 px-4 py-6 text-gray dark:text-dark-150">
<p class="mb-4" v-text="__('Are you sure you want to delete this entry?')" />
<label class="flex items-center" v-if="children">
<input type="checkbox" class="rtl:ml-2 ltr:mr-2" v-model="shouldDeleteChildren" />
{{ __n('Delete child entry|Delete :count child entries', children) }}
</label>
</div>
<div class="p-4 bg-gray-200 border-t flex items-center justify-end text-sm">
<button class="text-gray hover:text-gray-900"
<div class="p-4 bg-gray-200 dark:bg-dark-550 border-t dark:border-dark-900 flex items-center justify-end text-sm">
<button class="text-gray dark:text-dark-150 hover:text-gray-900 dark:hover:text-dark-100"
@click="$emit('cancel')"
v-text="__('Cancel')" />
<button class="btn rtl:mr-4 ltr:ml-4 btn-danger"
<button class="rtl:mr-4 ltr:ml-4 btn-danger"
@click="$emit('confirm', shouldDeleteChildren)"
v-text="__('Delete')" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="text-lg font-medium p-4 pb-0">
{{ __('Delete') }}
</div>
<div class="flex-1 px-4 py-6 text-gray">
<div class="flex-1 px-4 py-6 text-gray dark:text-dark-150">
<div class="publish-fields">
<div class="form-group" :class="{ 'has-error': this.error }">
<div class="field-inner">
Expand All @@ -27,11 +27,11 @@
</div>
</div>
</div>
<div class="p-4 bg-gray-200 border-t flex items-center justify-end text-sm">
<button class="text-gray hover:text-gray-900"
<div class="p-4 bg-gray-200 dark:bg-dark-550 border-t dark:border-dark-900 flex items-center justify-end text-sm">
<button class="text-gray dark:text-dark-150 hover:text-gray-900 dark:hover:text-dark-100"
@click="$emit('cancel')"
v-text="__('Cancel')" />
<button class="btn rtl:mr-4 ltr:ml-4 btn-danger"
<button class="rtl:mr-4 ltr:ml-4 btn-danger"
@click="confirm"
v-text="__('Confirm')" />
</div>
Expand Down
42 changes: 26 additions & 16 deletions resources/js/components/data-list/FilterPresets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,24 +168,34 @@ export default {
return;
}
this.$preferences.set(`${this.preferencesKey}.${presetHandle}`, this.presetPreferencesPayload)
.then(response => {
if (this.showRenameModal) {
this.$preferences.remove(`${this.preferencesKey}.${this.activePreset}`)
.then(response => {
this.$toast.success(__('View renamed'));
this.$emit('deleted', this.activePreset);
this.showRenameModal = false;
this.refreshPresets();
})
.catch(error => {
this.$toast.error(__('Unable to rename view'));
this.showRenameModal = false;
});
return;
if (this.showRenameModal) {
let preference = this.$preferences.get(`${this.preferencesKey}`);
preference = Object.fromEntries(Object.entries(preference).map(([key, value]) => {
if (key === this.activePreset) {
return [this.savingPresetSlug, this.presetPreferencesPayload];
}
return [key, value];
}));
this.$preferences.set(`${this.preferencesKey}`, preference)
.then(response => {
this.$toast.success(__('View renamed'));
this.$emit('deleted', this.activePreset);
this.showRenameModal = false;
this.refreshPresets();
})
.catch(error => {
this.$toast.error(__('Unable to rename view'));
this.showRenameModal = false;
});
return;
}
this.$preferences.set(`${this.preferencesKey}.${presetHandle}`, this.presetPreferencesPayload)
.then(response => {
this.$toast.success(__('View saved'));
this.showCreateModal = false;
this.savingPresetName = null;
Expand Down
4 changes: 4 additions & 0 deletions resources/js/components/fieldtypes/CodeFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ export default {
this.codemirror.setOption('fullScreen', this.fullScreenMode);
if (this.fullScreenMode === false) {
document.documentElement.removeAttribute('style');
}
// CodeMirror also needs to be manually refreshed when made visible in the DOM
this.$events.$on('tab-switched', this.refresh);
}
Expand Down
5 changes: 5 additions & 0 deletions resources/js/components/fieldtypes/LinkFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,15 @@ export default {
setTimeout(() => this.$refs.assets.openSelector(), 0);
}
}
this.updateMeta({...this.meta, initialOption: option});
},
urlValue(url) {
if (this.metaChanging) return;
this.update(url);
this.updateMeta({...this.meta, initialUrl: url});
},
meta(meta, oldMeta) {
Expand Down Expand Up @@ -159,11 +162,13 @@ export default {
entriesSelected(entries) {
this.selectedEntries = entries;
this.update(this.entryValue);
this.updateMeta({...this.meta, initialSelectedEntries: entries});
},
assetsSelected(assets) {
this.selectedAssets = assets;
this.update(this.assetValue);
this.updateMeta({...this.meta, initialSelectedAssets: assets});
}
}
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/fieldtypes/bard/Set.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="replicator-set-header" :class="{'collapsed': collapsed, 'invalid': isInvalid }">
<div class="item-move sortable-handle" data-drag-handle />
<div class="flex items-center flex-1 p-2 replicator-set-header-inner cursor-pointer" :class="{'flex items-center': collapsed}" @click="toggleCollapsedState">
<label class="text-xs whitespace-nowrap rtl:ml-2 ltr:mr-2">
<label class="text-xs rtl:ml-2 ltr:mr-2">
<span v-if="isSetGroupVisible">
{{ setGroup.display }}
<svg-icon name="micro/chevron-right" class="w-4" />
Expand Down
Loading

0 comments on commit 351ef06

Please sign in to comment.