feat(tab-progress-bars): add tab and single-tab progress bars#645
feat(tab-progress-bars): add tab and single-tab progress bars#645claaslange wants to merge 4 commits into
Conversation
|
On second look through the code I realized that the spinner already handles basically everything. The only thing that confused me so far is the spinner disappearing when the tab is selected. If the spinner would always be visible while work is ongoing, it would solve my request already. |
|
Would be nice! |
gnachman
left a comment
There was a problem hiding this comment.
Thanks for the PR! This is a nice proof of concept. A few things to address:
Tahoe tab style: The progress bar needs to be enclosed within the pill-shaped tab when drawn in the active tab. Right now it's positioned at the bottom of the cell frame, which will extend outside the pill shape.
Inline progress bar visibility: When there are split panes, inline progress bars should still be shown. Likewise, when the tab bar is not visible (e.g., in fullscreen, tabs are sometimes hidden), inline progress bars should remain visible since there's no tab to show progress on.
showInlineProgressBar ownership: PTYSession should not be reasoning about showInlineProgressBar — that logic should be delegated to the window controller (WindowControllerInterface). Currently both PTYSession (in reallySetPreferencesFromAddressBookEntry:) and PseudoTerminal (in updateSessionProgressBarVisibility) have logic to calculate and set the value of SessionView.showInlineProgressBar, and they compute different things. This should live only in PseudoTerminal.
Progress bar ownership: It's questionable to have iTermTabBarControlView hold the _tabProgressBars dictionary. It would make more sense for PSMTabBarControl to own them, similar to how it owns PSMProgressIndicator. That way, when tabs move from one window to another, the progress bar naturally follows without having to manage that in a second place.
- add tab-level progress bars in the tab bar view - show inline session progress only for single-tab windows - keep progress bars non-interactive and synced with tab count
- centralize inline progress bar visibility in PseudoTerminal - show inline progress for split panes and hidden tab bars - move tab progress bar ownership into PSMTabBarControl - keep Tahoe tab progress inside the selected pill - aggregate tab progress across split panes
6b6e99d to
1d5dd48
Compare
|
Out of curiosity, how do we trigger those loaders from zsh or Node? I find them really cool and wonder how to trigger them. cc @gnachman |
|
It's described in the progress bar section at https://iterm2.com/documentation-escape-codes.html |
|
@claaslange Thank you! |
- render tab progress bars vertically for left-side tab bars - place vertical progress bars along the left edge of tab cells - animate determinate and indeterminate progress in vertical mode
- add an advanced setting for left-side tab progress bar orientation - keep vertical progress bars as the default for left-side tabs - update tab progress bar layout to respect the new setting
|
I've added a setting to the Advanced -> Tab section to switch between horizontal and vertical progress bars on horizontal tab bar. When using it daily the vertical bars are a lot less confusing. |
|
@claaslange We might have an issue with that as I also use the top border for the tab groups. I'm happy to find another way but I think it would be beneficial to discuss about the UI direction we want. |
|
@kud this relates to #594, correct? So far it only contains one screenshot, so I can't really tell how prevalent the group borders are but both definitely compete for the same area in the ui. For me this mostly boils down to the direction that @gnachman wants to take his project. I simply decided to re-use the existing progress bar and placed them at the top of bars to replicate what is happening in the session view. The one thing I already learned however is that this feature makes a big difference as soon you work with more than one coding agent in parallel 😅 As I wrote earlier we could change the approach of this PR to take over the existing progress indicator (spinner/blue circle) that appears at the right hand side of the tab: In that case the approach would change a little bit:
We might replace the spinner with a green circle that's animated similarly to the progress bar. Combined with tab groups it might still feel a bit like "disco" though. |
Show OSC 9;4 progress indicators in the tab bar for background tabs. Inline (in-session) progress bars are shown when the tab bar is not visible (single tab, fullscreen with hidden tab bar) or when split panes are present. Tab bar progress bars are clipped to the Tahoe pill shape with a transparent background so the tab color shows through. Progress bar state is preserved when sessions move between split panes. Co-Authored-By: Claas Lange <claaslange@users.noreply.github.com>
|
Merged with changes as commit 6908b3d. Thanks! |
|
@gnachman Did you decide to leave out the option for vertical progress bars on purpose? I find them a lot clearer (albeit unusual for sure) for tabs on the left. If you'd still consider it, I'm happy to provide a separate PR for it. |
|
@claaslange @gnachman It's quite intense. Is there a way I can disable the progess bar on the pane while I keep it on the tab, by any chance? The double progress bar is too much for me. |
It didn't look right to my eye. I agree that it was clearer, but I think the look was so odd that it outweighted the benefit of clarity—and I also think the clarity benefit would be short-lived as you'll get used to knowing how they relate to the tab. |







PoC for feature request https://gitlab.com/gnachman/iterm2/-/work_items/12808
The version in here respects the session settings for progress bars (hide/show and color scheme). If only a single tab is opened the progress bar is shown at the top of the session view, as soon as multiple tabs are opened the progress bar moves to the tab itself.