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

GH-7521: Enabled Select All in the Output #7523

Merged
merged 2 commits into from
Apr 8, 2020
Merged

GH-7521: Enabled Select All in the Output #7523

merged 2 commits into from
Apr 8, 2020

Conversation

kittaakos
Copy link
Contributor

What it does

It enables the Select All functionality in the Output widget. Enabled only if the Output widget is the active widget in the shell. It should work with Ctrl/Cmd+A keybindings by default. Closes #7521.

How to test

  • Make you have some input for the Output widget. You can use the API Sample: Log to Output command.
  • Activate the widget and try to select all with the keybinding.
  • Make sure the Output widget is visible but not active
    • perform a Select All via the keyboard whilst the editor is active,
    • perform a Select All via the keyboard whilst the SIW widget is active and input has the focus.
  • Verify the same in electron.

Review checklist

Reminder for reviewers

`dynamic` -> `dymanic`

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos
Copy link
Contributor Author

I am going to drop 7d97ebe once the review is over.

@vince-fugnitto vince-fugnitto added the output issues related to the output label Apr 8, 2020
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I verified the changes on both the browser and electron targets under different use-case conditions and the select all in the output-view works very well compared to master 👍

if (this.outputChannelManager.selectedChannel) {
const element = document.getElementById(OutputWidget.IDs.CONTENTS);
if (element) {
const selectElementContent = (what: HTMLElement) => {
Copy link
Member

Choose a reason for hiding this comment

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

[minor] perhaps we can find a better name instead of what.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you suggest?

Copy link
Member

Choose a reason for hiding this comment

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

What do you suggest?

I'm not sure, either content or even htmlElement?

Closes #7521.

Signed-off-by: Akos Kitta <[email protected]>
Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

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

The issue is about "Select All" in the output view, works fine.
Question:
Could it be a side effect if I "Select All" from the Problem view. It looks like it selects all the "Problem" view content as well as selecting all line ranges in the open editor

@vince-fugnitto
Copy link
Member

Question:
Could it be a side effect if I "Select All" from the Problem view. It looks like it selects all the "Problem" view content as well as selecting all line ranges in the open editor

@lmcbout it is not a side-effect of this pull-request since the bug currently occurs on master.
We will need to address the 'select all' for the problems-view as well similarly to this pull-request.

Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

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

Thanks,
Works well for the output view

@kittaakos
Copy link
Contributor Author

Thank you for the review, @vince-fugnitto, and @lmcbout 👍

@kittaakos kittaakos merged commit b8c4269 into master Apr 8, 2020
@kittaakos kittaakos deleted the GH-7521 branch April 8, 2020 13:38
@lmcbout
Copy link
Contributor

lmcbout commented Apr 8, 2020

@lmcbout it is not a side-effect of this pull-request since the bug currently occurs on master.
We will need to address the 'select all' for the problems-view as well similarly to this pull-request.

@vince-fugnitto is there an issue where the "Select all" for the Problem" view is tracked

@kittaakos
Copy link
Contributor Author

@vince-fugnitto is there an issue where the "Select all" for the Problem" view is tracked

No, but there is a conversation here: #7525 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
output issues related to the output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a user I want to copy the content of the current Output channel with Ctrl/Cmd+A
3 participants