8000 Improve rendering of Progress · Issue #14426 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
Improve rendering of Progress #14426
@SteveL-MSFT

Description

@SteveL-MSFT

Summary of the new feature/enhancement

The current rendering of progress has a few issues:

  1. there is a difference in behavior between Windows and Linux/macOS
  2. there is quite a bit of empty space that is re-rendered each time and takes up space and affects perf
  3. the current progress is rendered using buffercells which is more complex than strings and require more computation and also doesn't support ANSI escape sequences

Proposed technical implementation details

Borrow ideas from popular Linux native commands to have a single line progress bar (although multiple bars are supported at once as well as nested bars) by using ANSI escape inverse sequence to render a progressive bar showing progress over the status description text.

Screen-Recording-2021-01-28-at-7

Some discussion topics:

  1. do we want to have a consistent experience across all platforms or keep Windows distinct where the progress renders at the top rather than the bottom
  • current proposal allows for existing rendering for those who prefer it and adds a new minimal renderer across all platforms
  1. do we want to retain existing behavior to clear the progress bar once it's complete or keep the last update (which many Linux commands do)
  • based on discussion and also due to how progress rendering works currently, we'll need to clear it to avoid strange artifacts being on the screen particularly when scrolling occurs
  1. do we want to limit the width of the progress bar or let it render the full width of the terminal? (will spend more time rendering on wide terminals as well as making it more effort to look across the full width for progress information, in my opinion)
  • made this a configurable setting that defaults to 120 chars (this value is used as default in many formatting situations already)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifIssue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0