Skip to content

feat(vue-docx): add showUpload and showDownload props - #3

Merged
eric8810 merged 2 commits into
arcships:masterfrom
Taozizz:feat/docx-viewer-upload-download-props
Jul 24, 2026
Merged

feat(vue-docx): add showUpload and showDownload props#3
eric8810 merged 2 commits into
arcships:masterfrom
Taozizz:feat/docx-viewer-upload-download-props

Conversation

@Taozizz

@Taozizz Taozizz commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds showUpload and showDownload props to DocxViewer so read-only preview hosts can hide the upload and download entry points independently, instead of dropping the entire toolbar via showToolbar.

  • Both props default to true, so existing behavior is unchanged.
  • showUpload: false also hides the empty-state "Choose Word file" and error-state "Choose another Word file" buttons, since they open the same local file picker as the toolbar button.
  • Naming follows the existing XlsxViewer showUpload convention.
  • The demo page gains a props panel that exposes showToolbar, showUpload, showDownload, defaultThumbnailsOpen, isDark and defaultZoom as live toggles. defaultThumbnailsOpen is folded into the viewer key because it is only read on mount.

Commits

  • feat(vue-docx): add showUpload and showDownload props — component, toolbar, docs, CHANGELOG, component tests
  • feat(demo): add a props panel to the DocxViewer page — demo-only

Test plan

  • Added component-test coverage in tests/component/vue-components.test.mjs: default visibility, both props hidden with the toolbar still rendering, and the error state with only showUpload disabled (download button retained).

Closes #2

@eric8810
eric8810 merged commit b955a4d into arcships:master Jul 24, 2026
1 check passed
@Taozizz
Taozizz deleted the feat/docx-viewer-upload-download-props branch July 28, 2026 03:17
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 request: DocxViewer props to hide the built-in Upload/Download toolbar buttons

2 participants