Skip to content

refactor: migrate product gallery from ExtJS to Vue#150

Merged
biz87 merged 2 commits intobetafrom
refactor/gallery-vue
Mar 16, 2026
Merged

refactor: migrate product gallery from ExtJS to Vue#150
biz87 merged 2 commits intobetafrom
refactor/gallery-vue

Conversation

@biz87
Copy link
Copy Markdown
Member

@biz87 biz87 commented Mar 16, 2026

Summary

Closes #112

  • Replaced ExtJS gallery (panel, toolbar, view, window, ddview) with pure Vue components
  • New architecture: ProductGalleryProductGalleryGrid + ProductGalleryToolbar + GalleryUploader + ProductGalleryEditDialog
  • New useGalleryApi composable for all gallery API calls (connector direct, not REST API)
  • New UpdateSource processor for changing product media source
  • Removed gallery-uploader entry point — Uppy now bundled into product-tabs

What changed

Created

File Purpose
useGalleryApi.js Composable: all Gallery processor calls via connector
ProductGallery.vue Orchestrator: state, API, confirm dialogs
ProductGalleryGrid.vue Image grid: vuedraggable, PrimeVue ContextMenu, search, pagination
ProductGalleryToolbar.vue Source selector + bulk actions menu
ProductGalleryEditDialog.vue File properties edit dialog
UpdateSource.php Processor: change product source_id

Modified

File Change
ProductTabs.vue Gallery tab: type: 'extjs'type: 'vue', removed ExtJS gallery init code
product-tabs.js Added ConfirmationService
GalleryUploader.vue Removed defineExpose, added watch on sourceId, extended Uppy locale
update.class.php Removed ExtJS gallery script loading, added sources to config
vite.config.js Removed gallery-uploader entry, added .uppy- to PostCSS exclude
main.css Removed Gallery CSS sections
Lexicons (en/ru) New keys for search, empty state, Uppy strings

Deleted (6 files)

  • gallery.panel.js, gallery.toolbar.js, gallery.view.js, gallery.window.js
  • ext.ddview.js, gallery-uploader.js entry

Test plan

  • Upload files via Uppy (single + multiple)
  • Drag-and-drop reorder images
  • Context menu: edit, open in new window, regenerate thumbnails, delete
  • Double-click → edit dialog
  • Search by filename
  • Pagination (with 20+ files)
  • Bulk actions: regenerate all thumbnails, delete all files (with confirmation)
  • Change media source (with confirmation, page reload)
  • Product thumbnail updates after gallery operations
  • New product (gallery unavailable before save)

🤖 Generated with Claude Code

biz87 added 2 commits March 16, 2026 11:41
Replace ExtJS gallery panel (panel, toolbar, view, window, ddview)
with pure Vue components: ProductGallery, ProductGalleryGrid,
ProductGalleryToolbar, ProductGalleryEditDialog.

- Add useGalleryApi composable for all gallery API calls
- Add UpdateSource processor for changing media source
- Embed GalleryUploader (Uppy) into product-tabs bundle
- Remove gallery-uploader separate entry point
- Add ConfirmationService to product-tabs
- Add PrimeVue ContextMenu for file actions
- Extend Uppy locale strings (back, dropHint, error, etc.)
- Add new lexicon keys for gallery search and empty state
- Remove ExtJS gallery CSS from main.css
- Add .uppy- prefix to PostCSS exclude list
- Fix unhandled promise in onChangeSource (add async/await + try/catch)
- Pass allowedFileTypes, maxWidth, maxHeight from media source config
  to GalleryUploader (prevents regression for custom media sources)
- Fix drag-drop UX: use local ref + watch instead of read-only computed
  so vuedraggable can mutate array for instant visual reorder
- Change pageSize from 20 to 50 (matches old ExtJS behavior)
- Sort media sources list by name in controller
@biz87 biz87 merged commit 0c47a95 into beta Mar 16, 2026
@biz87 biz87 deleted the refactor/gallery-vue branch March 16, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Переезд вкладки Галерея на Vue

1 participant