Skip to content

feat: migrate react to vue - #5149

Open
kristian-zendato wants to merge 1 commit into
masterfrom
feat/migrate-react-to-vue
Open

kristian-zendato wants to merge 1 commit into
masterfrom
feat/migrate-react-to-vue

Conversation

@kristian-zendato

Copy link
Copy Markdown
Contributor

Summary

Resolves: #3140

  • App, FolderGroups, QuotaSelect, SortArrow, SubmitInput, AdminGroupSelect, and SubAdminGroupSelect are rewritten as Vue components.
  • ManageAclSelect and DelegatedGroupSelect are added as a new component
  • apiError.ts is added to report API failure.
  • React and its related packages are removed from packages.json for Vite and TypeScript build the Vue entry

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
@kristian-zendato kristian-zendato added enhancement 3. to review Items that need to be reviewed labels Oct 16, 2026
@susnux
susnux requested review from icewind1991, provokateurin and skjnldsv and removed request for nfebe, provokateurin and stediefan October 16, 2026 17:24
@susnux susnux added this to the Nextcloud 36 milestone Oct 16, 2026
Comment thread src/settings/App.vue
</script>

<template>
<div id="groupfolders-app-root"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a settings section, as such the root should rather be a NcSettingsSection

Comment thread src/settings/App.vue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please adjust the app to match our general app structure.
This belongs to views/AdminSettings.vue or similar

Comment thread src/settings/index.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This rather belongs to src/admin-settings.ts following the usual file structure

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This rather should be a NcSelect

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess it makes sense to add a groups pinia store to cache all available groups for rendering them and not reload everytime the component is loaded

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not needed, see for example the files app how it does it.
We just use the proper icon rendered with NcIconSvgWrapper, then on the table header where you use this we use aria-sort so no alt text is needed here.

You can also check the "Usage example: Sorting table columns" here:
https://nextcloud-vue-components.netlify.app/#/Components/NcButton

Comment on lines +145 to +150
<template #search="{ attributes, events }">
<input class="vs__search"
v-bind="attributes"
v-on="events"
@input="onSearchInput">
</template>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why this? just use the NcSelect @search event?
https://vue-select.org/api/events.html#search

Comment thread src/settings/App.vue
Comment on lines +565 to +571
<button v-else
type="button"
class="action-rename"
:aria-label="renameLabel(folder)"
@click.stop="editingMountPoint = folder.id">
{{ folder.mount_point }}
</button>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All the buttons here should be rather NcButton for consistent design.

Comment thread src/settings/App.scss

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

with SFC we use with Vue this rather belongs to the <style> section of App.vue

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great start!

But please follow our usual app layout:

  • Proper file structure (/views, /components, /store, /services...)
  • Make use of Vue SFC, styles do not need to be in separate stylesheets but if they belong to a component they should directly be within the component.
  • Use @nextcloud/vue components where appropriate, e.g. all normal buttons should be NcButton etc.
  • Split API calls out to a service or a store depending on the requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Items that need to be reviewed enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate all React code to Vue

2 participants