Skip to content

Conversation

@tig
Copy link
Collaborator

@tig tig commented Sep 27, 2020

This PR address #109 by adding a -Filter switch to ocgv.

tig and others added 30 commits March 11, 2020 15:55
Co-Authored-By: Tyler James Leonhardt <tylerl0706@gmail.com>
LoadData();
AddRows(win);

_filterField.Text = _applicationData.Filter;
Copy link
Member

Choose a reason for hiding this comment

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

To make the code more robust, you should handle when Filter is null here instead of setting the default value to empty string in the other file for Filter.

You can do a simple:

_applicationData.Filter ?? string.Empty

And then remove the default value in the cmdlet

public string Title { get; set; }
public OutputModeOption OutputMode { get; set; }
public bool PassThru { get; set; }
public string Filter { get;set; }
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public string Filter { get;set; }
public string Filter { get; set; }

AddRows(win);

_filterField.Text = _applicationData.Filter;
_filterField.CursorPosition = _applicationData.Filter.Length;
Copy link
Member

Choose a reason for hiding this comment

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

Then use

Suggested change
_filterField.CursorPosition = _applicationData.Filter.Length;
_filterField.CursorPosition = _filterField.Text.Length;

@tig
Copy link
Collaborator Author

tig commented Sep 28, 2020

Good feedback. Thanks. Should be good to go now.

@TylerLeonhardt
Copy link
Member

@tig can you also update the markdown doc for ocgv?

@TylerLeonhardt
Copy link
Member

You may want to run that BuildCmdletHelp task locally to debug the CI issue. Looks like you have a missing heading or something.

@TylerLeonhardt
Copy link
Member

Last thing, I promise.

If you rev the version in the psd1 to 0.6.0 and add a section in the psd1 changelog, I can merge this in and snap a release :)

@tig
Copy link
Collaborator Author

tig commented Sep 28, 2020

Wha?

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

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

LGTM

@TylerLeonhardt TylerLeonhardt merged commit 3c189cd into PowerShell:master Sep 28, 2020
@tig tig deleted the filter_switch branch September 28, 2020 19:07
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.

2 participants