-
Notifications
You must be signed in to change notification settings - Fork 500
Add max length configuration for connection info in status bar #19276
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: main
Are you sure you want to change the base?
Add max length configuration for connection info in status bar #19276
Conversation
@microsoft-github-policy-service agree |
@Benjin what do you think of this one? It looks fine to me. Though maybe the default should be -1, or 100. Or maybe 50 is enough for most people? |
@kburtram The default width before this PR was 50 (Constants.maxDisplayedStatusTextLength), so I just left it at that. The servers, databases, and usernames I regularly work with however aren't particularly long and are truncated enough that a good amount of the database name is hidden, so I imagine increasing the default would be a welcome change. |
@kburtram agreed; this is a nice addition! I left one minor comment, then I'd be happy to take it. |
Sorry for taking a while to circle back to this; @bathetrade, can you resolve the conflicts? Then I'll be ready to merge it in :) |
@Benjin I resolved the merge conflicts and made a couple more changes:
While testing, I ran into the following issues (unrelated to this PR)
I tested off Another issue is that the display string is now using icon tokens such as "$(database)". If you specify a max length that lands in the middle of such a token, the user will see something like "myServer: $(data ..." in the status bar. I didn't have time to fix it but would be happy to at some point if deemed worthwhile. |
Allows configuring the display width of the connection info in the status bar.
This makes it possible to extend the width and see the entire server name, database name, and user name without needing to hover over the item with the mouse. This in turn reduces the likelihood that a query is issued to the wrong database and may be more familiar for SSMS users where such information is always displayed in the title bar.