Skip to content

[settings] Use new components#393

Merged
julien-nc merged 7 commits into
mainfrom
enh/385/reoranize-settings
Nov 14, 2025
Merged

[settings] Use new components#393
julien-nc merged 7 commits into
mainfrom
enh/385/reoranize-settings

Conversation

@julien-nc

@julien-nc julien-nc commented Nov 10, 2025

Copy link
Copy Markdown
Member

refs #385

And fix some style issues.

  • Update vue and nextcloud/vue
  • Use NcFormGroup, NcFormBox and NcFormBoxSwitch for boolean settings
  • Remove redundant words like "Enable" in labels
  • Hide switch group titles
  • Only in admin settings
    • Replace first admin settings hint with a note card
    • Fix style issue in some note cards (extra bottom space)
    • Move notecards below the switches
  • Only in personal settings
    • Replace old custom warning hint with a note card
Location Before After
Admin image image image image
Personal image image

@julien-nc

julien-nc commented Nov 10, 2025

Copy link
Copy Markdown
Member Author

@marcoambrosini Can you guide us with this? Does this more or less covers the requirements of nextcloud/server#55667 ?

@julien-nc julien-nc changed the title [admin settings] Use new components [settings] Use new components Nov 10, 2025
Comment thread src/components/AdminSettings.vue Outdated
@marcoambrosini

Copy link
Copy Markdown
Member

@julien-nc I think everything should wrap to the same width of the new components. Copying @kra-mo for further input

@julien-nc

Copy link
Copy Markdown
Member Author

@marcoambrosini Done. Updated the initial comment.

@lukasdotcom lukasdotcom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for something unrelated I noticed could be improved.

Comment thread src/components/AdminSettings.vue Outdated
Comment thread src/components/PersonalSettings.vue Outdated
Comment on lines +14 to +43
<NcFormBoxSwitch v-if="state.assistant_available"
:model-value="state.assistant_enabled"
@update:model-value="onCheckboxChanged($event, 'assistant_enabled')">
{{ t('assistant', 'Enable Nextcloud Assistant in header') }}
</div>
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="state.audio_chat_available"
:model-value="state.autoplay_audio_chat"
@update:model-value="onCheckboxChanged($event, 'autoplay_audio_chat')">
<div class="checkbox-text">
</NcFormBoxSwitch>
<NcFormBoxSwitch v-if="state.audio_chat_available"
:model-value="state.autoplay_audio_chat"
@update:model-value="onCheckboxChanged($event, 'autoplay_audio_chat')">
{{ t('assistant', 'Auto-play audio chat responses') }}
</div>
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="state.free_prompt_picker_available"
:model-value="state.free_prompt_picker_enabled"
@update:model-value="onCheckboxChanged($event, 'free_prompt_picker_enabled')">
<div class="checkbox-text">
</NcFormBoxSwitch>
<NcFormBoxSwitch v-if="state.free_prompt_picker_available"
:model-value="state.free_prompt_picker_enabled"
@update:model-value="onCheckboxChanged($event, 'free_prompt_picker_enabled')">
{{ t('assistant', 'Enable AI text generation in smart picker') }}
</div>
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="state.text_to_image_picker_available"
:model-value="state.text_to_image_picker_enabled"
@update:model-value="onCheckboxChanged($event, 'text_to_image_picker_enabled')">
<div class="checkbox-text">
</NcFormBoxSwitch>
<NcFormBoxSwitch v-if="state.text_to_image_picker_available"
:model-value="state.text_to_image_picker_enabled"
@update:model-value="onCheckboxChanged($event, 'text_to_image_picker_enabled')">
{{ t('assistant', 'Enable AI image generation in smart picker') }}
</div>
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="state.text_to_sticker_picker_available"
:model-value="state.text_to_sticker_picker_enabled"
@update:model-value="onCheckboxChanged($event, 'text_to_sticker_picker_enabled')">
<div class="checkbox-text">
</NcFormBoxSwitch>
<NcFormBoxSwitch v-if="state.text_to_sticker_picker_available"
:model-value="state.text_to_sticker_picker_enabled"
@update:model-value="onCheckboxChanged($event, 'text_to_sticker_picker_enabled')">
{{ t('assistant', 'Enable AI sticker generation in smart picker') }}
</div>
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="state.speech_to_text_picker_available"
:model-value="state.speech_to_text_picker_enabled"
@update:model-value="onCheckboxChanged($event, 'speech_to_text_picker_enabled')">
<div class="checkbox-text">
</NcFormBoxSwitch>
<NcFormBoxSwitch v-if="state.speech_to_text_picker_available"
:model-value="state.speech_to_text_picker_enabled"
@update:model-value="onCheckboxChanged($event, 'speech_to_text_picker_enabled')">
{{ t('assistant', 'Enable AI transcription in smart picker') }}
</div>
</NcCheckboxRadioSwitch>
<div v-if="noProvidersAvailable" class="settings-hint">
<InformationOutlineIcon class="icon" />
<span>
{{ t('assistant', 'No suitable providers are available. They must first be enabled by your administrator.') }}
</span>
</div>
</NcFormBoxSwitch>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the NcFormBox* components are supposed to be used inside the <NcFormBox> component.(maybe not clear from the documentation, but follows Vue naming convention).

It makes it visually grouped with the rounded box effect and a small gap.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you saying it's fine to have a <NcFormGroup> wrapping a <NcFormGroup> wrapping <NcFormBox*> like this?

<NcFormGroup>
    <NcFormBox>
        <NcFormBoxSwitch />
    </NcFormBox>
</NcFormGroup>

Comment thread src/components/AdminSettings.vue Outdated
Comment on lines +26 to +29
<NcFormBoxSwitch :model-value="state.assistant_enabled"
@update:model-value="onCheckboxChanged($event, 'assistant_enabled')">
{{ t('assistant', 'Enable Nextcloud Assistant in header') }}
</div>
</NcCheckboxRadioSwitch>
<NcNoteCard v-if="!state.text_processing_available" type="warning">
{{ t('assistant', 'To be able to use this feature, please install at least one AI task processing provider.') }}
</NcNoteCard>
<NcCheckboxRadioSwitch
:model-value="state.free_prompt_picker_enabled"
:disabled="!state.free_prompt_task_type_available"
@update:model-value="onCheckboxChanged($event, 'free_prompt_picker_enabled')">
<div class="checkbox-text">
</NcFormBoxSwitch>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be less important for a single item, but better to still put it into the box to follow the structure.

@julien-nc julien-nc Nov 13, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean. Should we only have NcFormBox* inside NcFormBox? No NcNoteCard?

Here is how it looks now with some NcFormBoxSwitch and NcNoteCard inside one NcFormBox:

image

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, I miss looking at the collapsed diff view on GitHub.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, NcNoteCard inside NcFormBox does look a bit off because of the extra margin it adds.

But I'll leave it to designers 👀

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'll leave it to designers 👀

Yeah, no haha. I wouldn't put it in the box with such margins.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the notecards below the group. They are not close to their related switch anymore but it's close enough:

image

…issues

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc force-pushed the enh/385/reoranize-settings branch from 2178283 to 5e03dab Compare November 13, 2025 11:39

@kra-mo kra-mo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I said, and the boxes. But I'll let you developers sort that out :)

</ul>
</div>
</NcNoteCard>
<NcFormGroup :label="t('assistant', 'Select which features you want to enable')"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very redundant. Can we kill it? :D

Just label the group "Assistant features" or something for a11y and hide the label.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't want to change strings with this PR, that is also fine, just hide it for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I can see you changed other strings.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A general note to labelling — it should be the name of a thing but not an instruction to the end user. Even if it is hidden, because for a11y using assistive technology with "Assistant features landmark" or "Assistant features group" is easier than "Select which features you want to enable landmark".

A long instruction if needed can be added to the description.

Comment thread src/components/AdminSettings.vue Outdated
Comment thread src/components/AdminSettings.vue Outdated
…ve switch labels

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc

Copy link
Copy Markdown
Member Author

The screenshots in the initial comment have been updated.

@julien-nc julien-nc requested review from ShGKme and kra-mo and removed request for ShGKme November 14, 2025 11:41
@marcelklehr

Copy link
Copy Markdown
Member

Thanks @kra-mo @ShGKme @julien-nc ! Looks great now :)

@julien-nc julien-nc merged commit a6c96ab into main Nov 14, 2025
17 checks passed
@julien-nc julien-nc deleted the enh/385/reoranize-settings branch November 14, 2025 12:51
@julien-nc julien-nc linked an issue Nov 14, 2025 that may be closed by this pull request
@janepie janepie mentioned this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assistant settings reorganization

6 participants