Skip to content
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

[CT-246] [Feature] Have a space after model name before the alignment periods, for ease of double-click selection #4737

Closed
1 task done
joellabes opened this issue Feb 17, 2022 · 1 comment · Fixed by #4744
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! logging

Comments

@joellabes
Copy link
Contributor

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

In VS Code, double-clicking a model name selects it and all of the dots that line up the results:
image

07:00:06  1 of 1 START seed file dbt_jlabes.data_star_aggregate_expected.................. [RUN]
07:00:18  1 of 1 OK loaded seed file dbt_jlabes.data_star_aggregate_expected.............. [INSERT 3 in 11.49s]

If there was a space after expected and before the first period, it wouldn't select them all

Describe alternatives you've considered

Using dbt Cloud in Chrome, which has different word boundary calculation logic

Who will this benefit?

VS Code users, maybe other IDEs?

Are you interested in contributing this feature?

Sure

Anything else?

No response

@joellabes joellabes added enhancement New feature or request triage labels Feb 17, 2022
@github-actions github-actions bot changed the title [Feature] Have a space after model name before the alignment periods, for ease of double-click selection [CT-246] [Feature] Have a space after model name before the alignment periods, for ease of double-click selection Feb 17, 2022
@jtcohen6 jtcohen6 added good_first_issue Straightforward + self-contained changes, good for new contributors! logging labels Feb 17, 2022
@jtcohen6
Copy link
Contributor

You're so right! This has bugged me in the past.

I bet it's a one-liner in here:

truncate_width = ui.printer_width() - 3
justified = prefix.ljust(ui.printer_width(), ".")
if truncate and len(justified) > truncate_width:
justified = justified[:truncate_width] + "..."
if execution_time is None:
status_time = ""
else:
status_time = " in {execution_time:0.2f}s".format(execution_time=execution_time)
output = "{justified} [{status}{status_time}]".format(
justified=justified, status=status, status_time=status_time
)

Anyone want to take a crack at it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! logging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants