|
| 1 | +--- |
| 2 | +RFC: '0057' |
| 3 | +Author: John Zeiders |
| 4 | +Status: Withdrawn |
| 5 | +SupercededBy: |
| 6 | +Version: 0.1 |
| 7 | +Area: Commands |
| 8 | +Comments Due: 6/25/2019 |
| 9 | +--- |
| 10 | + |
| 11 | +# Cross Platform Out-GridView |
| 12 | + |
| 13 | +Out-Gridview was a popular command in Windows PowerShell. |
| 14 | +Its dependence on Windows Presentation Foundation API's meant that it didn't make it into PowerShell Core. |
| 15 | + |
| 16 | +> The Out-GridView cmdlet sends the output from a command to a grid view window where the output is displayed in an interactive table. |
| 17 | +
|
| 18 | +# Motivation |
| 19 | + |
| 20 | +The feature is a commonly cited reason for not migrating to Powershell Core and its implementation will help further adoption. |
| 21 | + |
| 22 | +# Specification |
| 23 | + |
| 24 | +## cmdlet |
| 25 | + |
| 26 | +The cmdlet will be a modern implementation of [Out-GridView](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-gridview?view=powershell-5.1) and also cross platform supported. |
| 27 | + |
| 28 | +```powershell |
| 29 | +Out-GridView |
| 30 | + [-InputObject <PSObject>] |
| 31 | + [-Title <String>] |
| 32 | + [-PassThru] |
| 33 | + [<CommonParameters>] |
| 34 | +
|
| 35 | +Out-GridView |
| 36 | + [-InputObject <PSObject>] |
| 37 | + [-Title <String>] |
| 38 | + [-Wait] |
| 39 | + [<CommonParameters>] |
| 40 | +
|
| 41 | +Out-GridView |
| 42 | + [-InputObject <PSObject>] |
| 43 | + [-Title <String>] |
| 44 | + [-OutputMode <OutputModeOption>] |
| 45 | + [<CommonParameters>] |
| 46 | +``` |
| 47 | + |
| 48 | +## GUI |
| 49 | + |
| 50 | +The GUI will be implemented on top of [Avalonia UI Framework](https://github.com/AvaloniaUI/Avalonia). |
| 51 | +The project was chosen for its active development, implemented capabilities, modeling of WPF, and cross platform support. |
| 52 | + |
| 53 | +A new feature `Show Script` will be added that will generate an equivalent PowerShell script that represents the filters manually applied to Out-GridView. |
| 54 | +The goal being to enable better automation at scale while also allowing graphical editing of filters. |
| 55 | + |
| 56 | +Wireframe of the new design. |
| 57 | +The wireframe is intended for visual reference, it is **not** a pixel perfect representation. |
| 58 | +The most important part to note is the new layout for filters as opposed to the original "Criteria Panel". |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +## Module |
| 63 | + |
| 64 | +Out-GridView will be added to the PowerShell Graphical Tools Module Microsoft.PowerShell.GraphicalTools. |
| 65 | +Forming the basis for future cross-platform graphical commands. |
| 66 | + |
| 67 | +## Removed Features |
| 68 | + |
| 69 | +* Search in Column - Better solved by filters |
| 70 | + |
| 71 | +# Alternative Proposals and Considerations |
| 72 | + |
| 73 | +## GUI Frameworks |
| 74 | + |
| 75 | +### Electron |
| 76 | + |
| 77 | +Despite it's popularity as a cross-platform framework, it's slow boot times make it the wrong choice for a command that is frequently used to create confirmation and selection prompts. |
| 78 | + |
| 79 | +### Web |
| 80 | + |
| 81 | +An interesting concept, particularly interesting for the ability to integrate directly into VSCode. |
| 82 | +However, the dependency on having a browser pre-installed makes it less than ideal. |
0 commit comments