fix(dav): Always show example content section #61483
Open
kesselb wants to merge 2 commits into
Open
Conversation
The implementation is within the dav app and indendent of calendar or contacts app. Assisted-by: ClaudeCode:claude-sonnet-4-6 Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
susnux
approved these changes
Jun 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the DAV admin settings UI so the “Example content” settings section is always displayed, independent of whether Calendar/Contacts apps are enabled, and ensures the necessary initial state is always provided from the backend.
Changes:
- Always render the Example Contact and Example Event settings UI (no longer gated by
contactsEnabled/calendarEnabledinitial-state flags). - Always provide initial-state values for example contact/event settings and always return the
groupwaresection for the settings entry. - Update built frontend assets (
dist/) to reflect the source changes.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| dist/dav-settings-admin-example-content.mjs.map | Updated source map output for the always-visible settings section. |
| dist/dav-settings-admin-example-content.mjs | Updated compiled JS bundle reflecting unconditional rendering. |
| apps/dav/src/views/ExampleContentSettingsSection.vue | Removes conditional rendering so both settings components are always shown. |
| apps/dav/lib/Settings/ExampleContentSettings.php | Removes app-enabled checks; always provides initial state and always registers under groupware. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
31
to
+35
| public function getForm(): TemplateResponse { | ||
| $calendarEnabled = $this->appManager->isEnabledForUser('calendar'); | ||
| $contactsEnabled = $this->appManager->isEnabledForUser('contacts'); | ||
| $this->initialState->provideInitialState('calendarEnabled', $calendarEnabled); | ||
| $this->initialState->provideInitialState('contactsEnabled', $contactsEnabled); | ||
|
|
||
| if ($calendarEnabled) { | ||
| $enableDefaultEvent = $this->exampleEventService->shouldCreateExampleEvent(); | ||
| $this->initialState->provideInitialState('create_example_event', $enableDefaultEvent); | ||
| $this->initialState->provideInitialState( | ||
| 'has_custom_example_event', | ||
| $this->exampleEventService->hasCustomExampleEvent(), | ||
| ); | ||
| } | ||
|
|
||
| if ($contactsEnabled) { | ||
| $this->initialState->provideInitialState( | ||
| 'enableDefaultContact', | ||
| $this->exampleContactService->isDefaultContactEnabled(), | ||
| ); | ||
| $this->initialState->provideInitialState( | ||
| 'hasCustomDefaultContact', | ||
| $this->appConfig->getAppValueBool('hasCustomDefaultContact'), | ||
| ); | ||
| } | ||
| $this->initialState->provideInitialState('create_example_event', $this->exampleEventService->shouldCreateExampleEvent()); | ||
| $this->initialState->provideInitialState('has_custom_example_event', $this->exampleEventService->hasCustomExampleEvent()); | ||
| $this->initialState->provideInitialState('enableDefaultContact', $this->exampleContactService->isDefaultContactEnabled()); | ||
| $this->initialState->provideInitialState('hasCustomDefaultContact', $this->appConfig->getAppValueBool('hasCustomDefaultContact')); |
Comment on lines
13
to
20
| <template> | ||
| <NcSettingsSection | ||
| id="example-content" | ||
| :name="t('dav', 'Example content')" | ||
| :description="t('dav', 'Example content serves to showcase the features of Nextcloud. Default content is shipped with Nextcloud, and can be replaced by custom content.')"> | ||
| <ExampleContactSettings v-if="hasContactsApp" /> | ||
| <ExampleEventSettings v-if="hasCalendarApp" /> | ||
| <ExampleContactSettings /> | ||
| <ExampleEventSettings /> | ||
| </NcSettingsSection> |
Contributor
Author
|
/backport to stable34 |
Contributor
Author
|
/backport to stable33 |
ChristophWurst
approved these changes
Jun 22, 2026
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.
Close #61256
Close #61259
Summary
The implementation is within the dav app and indendent of calendar or
contacts app.
Checklist
3. to review, feature component)stable32)AI (if applicable)