-
Notifications
You must be signed in to change notification settings - Fork 112
Allow toolbar buttons visibility to be configured via settings #1598
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
base: master
Are you sure you want to change the base?
Allow toolbar buttons visibility to be configured via settings #1598
Conversation
WalkthroughThis update modifies the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant E as Editor
participant C as Config Checker
participant X as Command Executor
U->>E: Attempt to trigger SQL action (e.g., Execute SQL)
E->>C: Check corresponding dbt configuration (e.g., dbt.enableExecuteSql)
C-->>E: Return true/false
alt Configuration enabled
E->>X: Execute corresponding SQL command
X-->>U: Command executed
else Configuration disabled
E-->>U: Command not available
end
Suggested reviewers
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 253ae83 in 2 minutes and 44 seconds
More details
- Looked at
124
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. package.json:229
- Draft comment:
New configuration settings for toolbar button visibility are added correctly. Consider updating the README or documentation to describe these new options, so users know how to customize the toolbar. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative and suggests updating documentation, which is against the rules. It doesn't provide a specific code suggestion or highlight a potential issue with the code itself.
2. package.json:868
- Draft comment:
When conditions in the menu contributions now include configuration checks. To reduce repetitive code, consider extracting the common language regex (resourceLangId =~ /^sql$|^jinja-sql$/) into a reusable constant or variable. - Reason this comment was not posted:
Comment was on unchanged code.
3. package.json:958
- Draft comment:
Updated 'editor/title/run' menu commands include config checks for build model actions. Ensure that the selected configuration key (e.g., config.dbt.enableBuildModel) is used consistently with your intended behavior, especially since there are separate settings for running a model vs building a model. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the author to ensure that a configuration key is used consistently with the intended behavior. This is a request for confirmation of intention, which violates the rules. The comment does not provide a specific code suggestion or ask for a specific test to be written. Therefore, it should be removed.
4. package.json:232
- Draft comment:
New configuration properties for toggling toolbar buttons are added here. Please update the README/documentation to describe these new settings so users know how to control toolbar visibility. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is asking the PR author to update the documentation, which is not allowed according to the rules. The comment is purely informative and does not provide a specific code suggestion or ask for a test to be written.
5. package.json:869
- Draft comment:
Toolbar command entries now consistently append configuration checks (e.g., '&& config.dbt.enableExecuteSql'). Verify that using 'dbt.enableBuildModel' for both model and project build commands is the intended behavior. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
6. package.json:262
- Draft comment:
Minor typographical inconsistency: in the description for 'dbt.enableConvertToModel', 'model' is written in lowercase ('Convert to dbt model') while similar settings use 'Model' (e.g., 'Run dbt Model', 'Test dbt Model'). Consider capitalizing it ('Convert to dbt Model') for consistency. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
Looking at the rules, UI and styling changes should be ignored. While this is technically about consistency in labels, it falls under UI styling which we're told to assume the author handled correctly. Additionally, this is a very minor issue that doesn't affect functionality.
Could inconsistent capitalization in UI elements cause confusion for users? Could this be considered a documentation issue rather than just UI styling?
While consistency is good, this is fundamentally about UI presentation and button labels, which the rules explicitly tell us to ignore. The meaning is clear regardless of capitalization.
Delete the comment as it relates to UI styling choices which we're instructed to ignore.
Workflow ID: wflow_QaPh12cvgq7qVStH
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
You're right! However, I think this can't be configured through |
"group": "inline" | ||
}, | ||
{ | ||
"command": "dbtPowerUser.runCurrentModel", | ||
"when": "resourceLangId =~ /^sql$|^jinja-sql$/", | ||
"when": "resourceLangId =~ /^sql$|^jinja-sql$/ && config.dbt.enableBuildModel", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be enableRunModel? @matthieucan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one is trickier than the others: all the actions within the single button "Build project" are behind a single flag.
This allows to display/hide the entire group (the button with the down arrow), rather than sub-items in this group. Only hiding a subset of the sub-items within this button would not hide the button itself, therefore it would be less useful IMO.
Does that make sense?
@mdesmet @saravmajestic We will have to update the docs also - https://docs.myaltimate.com/setup/configuration/ |
Overview
Problem
Hi! Thanks for the great extension.
I would like the toolbar buttons to be configurable so they can be hidden. I find the long list (7 buttons) prone to misclicks, and there are some that I don't use as they are not relevant for my projects.
Solution
Make every button conditionally appear, via an associated setting. By default, they are all present, so this does not alter the current behavior.
Screenshot/Demo
A simplified toolbar with only the "Run" and "Test" buttons enabled:

How to test
Checklist
README.md
updated and added information about my changeImportant
Toolbar buttons in SQL files are now configurable via new boolean settings in
package.json
, allowing users to hide unused buttons.package.json
.dbt.enableBuildModel
,dbt.enableExecuteSql
,dbt.enableSqlQuickPick
,dbt.enableRunModel
,dbt.enableTestModel
,dbt.enableSqlPreview
,dbt.enableConvertToModel
.editor/title
andeditor/title/run
commands to check new settings before displaying buttons.This description was created by
for 253ae83. It will automatically update as commits are pushed.
Summary by CodeRabbit