[6.x] Bugfix/settings timezone#18793
Merged
brandonkelly merged 6 commits into6.xfrom May 6, 2026
Merged
Conversation
Changed Files
|
There was a problem hiding this comment.
Pull request overview
Fixes an issue on the General Settings screen where saving the timezone as an environment variable would only submit $, and aligns the 6.x General Settings UI/controller with the newer Inertia/CpScreenResponse patterns.
Changes:
- Refactors
GeneralSettingsController@indexto return aCpScreenResponseand relies on sharedcraft.readOnlyInertia data. - Fixes env-var resolution during validation when saving settings (including boolean env vars via
Env::parseBoolean()). - Replaces legacy combobox usage with new Vue combobox components/utilities and removes the old wrapper component.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/Http/Controllers/Settings/GeneralSettingsControllerTest.php | Updates the read-only assertion to use craft.readOnly shared Inertia props. |
| src/Http/Controllers/Settings/GeneralSettingsController.php | Uses CpScreenResponse for the screen and improves env/boolean parsing on save. |
| resources/js/utils/transformBooleanOptions.ts | Adds helper to decorate boolean env-var options with hint/indicator metadata. |
| resources/js/pages/SettingsGeneralPage.vue | Migrates to new CraftCombobox/CraftInput usage and adds status option decoration. |
| resources/js/components/form/InputComboboxOption.vue | Adds optional indicator rendering within combobox options. |
| resources/js/components/form/InputCombobox.vue | Expands model/value handling and tweaks filtering (now stringifies option values). |
| resources/js/components/form/CraftCombobox.vue | Switches to defineModel() and forwards slots into InputCombobox. |
| resources/js/components/Combobox.vue | Removes deprecated legacy combobox wrapper component. |
Comments suppressed due to low confidence (1)
resources/js/components/form/InputCombobox.vue:40
update:modelValueandtransformModelValueare typed as returning/emittingstring | number, butmodelValuenow also permitsbooleanand the defaulttransformModelValuereturnsnewValue.value(which can be non-string). Update the typings (and any downstream assumptions) so the emitted value type matches the supportedmodelValuetypes.
const emit = defineEmits<{
(e: 'update:modelValue', value: string | number): void;
}>();
const props = withDefaults(
defineProps<{
label?: string;
options?: Array<SelectItem>;
modelValue?: string | number | boolean;
requireOptionMatch?: boolean;
transformModelValue?: (newValue: SelectOption | null) => string;
class?: HTMLAttributes['class'];
placeholder?: string;
disabled?: boolean;
}>(),
{
modelValue: '',
requireOptionMatch: false,
options: () => [],
transformModelValue: (newValue: SelectOption | undefined | null) =>
newValue ? newValue.value : '',
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
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.
Hat tip to @AugustMiller who noticed that trying to save the timezone as an environment variable would only submit the
$.This had already been fixed/updated in #18709 but wanted to make sure this page is working in 6.x nonetheless