Skip to content

feat: SmartArt text pane UI for all editors - #3205

Open
MGRAFF2006 wants to merge 4 commits into
ONLYOFFICE:masterfrom
MGRAFF2006:feature/smartart-text-pane
Open

feat: SmartArt text pane UI for all editors#3205
MGRAFF2006 wants to merge 4 commits into
ONLYOFFICE:masterfrom
MGRAFF2006:feature/smartart-text-pane

Conversation

@MGRAFF2006

Copy link
Copy Markdown

Summary

  • Add shared SmartArt text pane component with inline text editing, node operations, and keyboard shortcuts
  • Integrate text pane into Document Editor, Presentation Editor, and Spreadsheet Editor right sidebars
  • Add CSS styling for the text pane following existing panel conventions

Changes

Shared Components

  • apps/common/main/lib/view/SmartArtTextPane.js (NEW) - Backbone view that displays SmartArt data as a bulleted text outline with contenteditable spans, toolbar buttons (Add/Remove/Promote/Demote/Move), keyboard shortcuts (Tab/Shift+Tab/Enter/Backspace), and bidirectional sync via asc_onSmartArtDataChanged callback
  • apps/common/main/lib/util/utils.js - Add SmartArtText: 14 to documentSettingsType enum
  • apps/common/main/resources/less/common.less - Add SmartArt text pane styles

Document Editor

  • Add panel div and button to RightMenu.template
  • Register panel in RightMenu.js view (button, settings entry, setApi)
  • Add SmartArt detection in RightMenu.js controller (onFocusObject) to auto-show panel

Presentation Editor

  • Same pattern as Document Editor applied to presentationeditor/ files

Spreadsheet Editor

  • Same pattern as Document Editor applied to spreadsheeteditor/ files

Related PR

SDK core changes: ONLYOFFICE/sdkjs#4876

…Editor

Add Common.Views.SmartArtTextPane - a shared Backbone view that displays
SmartArt data as a bulleted text outline with inline editing support:
- Contenteditable text entries synced bidirectionally with SmartArt shapes
- Toolbar: Add/Remove node, Promote/Demote, Move Up/Down
- Keyboard shortcuts: Tab/Shift+Tab/Enter/Backspace
- Live sync via asc_onSmartArtDataChanged callback

Register SmartArtText (14) in documentSettingsType enum.

Integrate into Document Editor:
- Add panel div and button to RightMenu template
- Register SmartArt text pane in RightMenu view and controller
- Auto-show panel when SmartArt is selected (onFocusObject)
…Editors

Apply the same SmartArt text pane integration pattern to both editors:
- Add panel div and button to RightMenu templates
- Register SmartArtText settings in RightMenu views with button, panel, setApi
- Add SmartArt detection in RightMenu controllers (onFocusObject)
  to auto-show the text pane when SmartArt shapes are selected
- Add setButtons registration and localization strings
Add comprehensive styling for the SmartArt text pane in common.less:
- Flexbox layout for header, toolbar, and scrollable content
- Bulleted text items with hover/active states
- Contenteditable input spans with proper line height
- Empty state placeholder styling
- Consistent with existing panel design patterns
The btn-ins-smartart icon class had no CSS sprite definition, making
the sidebar button invisible. Switch to btn-smart-hierarchy which
exists in all editors' small icon sprite sheets.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants