Skip to content

Add settings for customizing toolbar commands #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 29, 2025

Conversation

jackgriffiths
Copy link
Contributor

This PR adds settings that make is possible to customize the toolbar commands/buttons. Additional toolbar commands can be specified and the default toolbar commands can be hidden.

Closes #307.

@martipops
Copy link

This would be a game changer. Was looking for exactly this.

@newcat newcat requested a review from Copilot May 29, 2025 17:27
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces customizable settings for toolbar commands, allowing users to specify additional commands and selectively hide default ones. Key changes include:

  • Adding and exporting default toolbar commands and subgraph commands in toolbarCommands.ts.
  • Refactoring Toolbar.vue to retrieve commands from viewModel settings via computed properties.
  • Updating settings and documentation to support toolbar customization including a playground example with a custom command.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/renderer-vue/src/toolbar/toolbarCommands.ts New command definitions and default command arrays are added.
packages/renderer-vue/src/toolbar/Toolbar.vue Refactored to use computed toolbar commands from settings.
packages/renderer-vue/src/settings.ts Updated settings interface and default values for toolbar options.
packages/renderer-vue/playground/App.vue Added a custom command example showcasing toolbar customization.
docs/visual-editor/toolbar.md Expanded documentation on configuring and customizing the toolbar.

@newcat
Copy link
Owner

newcat commented May 29, 2025

Sorry for the late reply and thank you for the PR! I expanded on your idea and changed it so it is also possible to change the default commands or only use a subset of them.

@newcat newcat merged commit 67c10ba into newcat:master May 29, 2025
@jackgriffiths jackgriffiths deleted the custom-toolbar-commands branch May 29, 2025 19:56
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.

Adding Toolbar Commands
3 participants