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

Feature: Process output in a separate area at the mainwindow #252

Open
YoshiMan opened this issue Dec 8, 2016 · 6 comments
Open

Feature: Process output in a separate area at the mainwindow #252

YoshiMan opened this issue Dec 8, 2016 · 6 comments

Comments

@YoshiMan
Copy link

YoshiMan commented Dec 8, 2016

The process output should be displayed in a separated area. We need a setting, where the user can select, if the process output should be displayed or shouldnt. There should be a clear button to reset the process output area. It should be scrollable and should auto scroll to the last input, except the user scrolled a litte bit upwards, the autoscrolling is disabled. New outputs are appended at the bottom. It should be a red colored output, when the process has a non-zero exitvalue or has written something onto the stderr (black otherwise).

Notice:

  • We need a limit of the output lines.
  • Are there any sensitive data nobody should see?

when the user enables process output to be displayed.
then the area will be displayed

when the user disables process output to be displayed.
then the area will not be displayed

given the user enables process output to be displayed.
when the output area contains more then it could show at once.
then the area displays a scrollbar

given the user enables process output to be displayed.
given the output area contains less then it could show at once.
when the user clicks on the clear output button.
then the area will be cleared out.

given the user enables process output to be displayed.
given the output area contains more then it could show at once.
when the user clicks on the clear output button.
then the area will be cleared out and the scrollbar disapears.

given the output area contains more then it could show at once.
when the user clicks on the clear output button.
then the area will be cleared out and the scrollbar disapears.

given the user enables process output to be displayed.
when the show password process returns.
then the output should be displayed in the area for the passwords and not in the separate area.

given the user disables process output to be displayed.
when the show password process returns.
then the output should be displayed in the area for the passwords and not in the separate area.

given the user enables process output to be displayed.
when any other process, e.g. git commit, pass insert, git cp, git pull returns.
then a consecutive number, the executed command with parameter and the output should be displayed in a separate area at the mainwindow at the bottom at itself.

given the user disables process output to be displayed.
when any other process, e.g. git commit, pass insert, git cp, git pull returns.
then a consecutive number, the executed command with parameter and the output should not be displayed anywhere.

given the user enables process output to be displayed.
when any other process, e.g. git commit, pass insert, git cp, git pull returns with an zero exitvalue.
then the output text should be black.

given the user enables process output to be displayed.
when any other process, e.g. git commit, pass insert, git cp, git pull returns with an non-zero exitvalue or has written something onto the stderr.
then the output text should be red.

@YoshiMan YoshiMan changed the title Process output in a separate area at the mainwindow Feature: Process output in a separate area at the mainwindow Dec 8, 2016
@tezeb
Copy link
Contributor

tezeb commented Dec 8, 2016

This shall be relatively easy once I'll finish changing process mgmt into signal-based one. Actually it should be doable already, as all(I hope so ;)) stdout/stderr data is passed with finished(or processFinished) signal, but it will be better separated soon. The only issue is, that at times there is error output of command and there is no error(like 'pass git push', without remote set), that's an upstream bug, that I have to report, but without output in "main area" it hard to tell if command succeded.

Still, nice requirement :).

@YoshiMan
Copy link
Author

YoshiMan commented Dec 8, 2016

I guess it could be a bit difficult, because you want the pass show command displayed some where else.
Oh no. i tryed pass git pull withour remote and it returns with 0 ;(

@tezeb
Copy link
Contributor

tezeb commented Dec 8, 2016

yup, that's the bug I was talking about ;)
As a workaround, checking for output on stderr might work, until it gets fixed upstream(and propagated). I don't get the issue with pass show? It will go with it's own signal PassShow, with stdout and stderr attached, and it can have as many receivers as we like.

@YoshiMan
Copy link
Author

YoshiMan commented Dec 8, 2016

Alright. If there is no problem with pass show I'm happy. This QT and its signal/slot concept is new for me.
Yeah. Maybe we could solve it with the stderr. :)

@annejan
Copy link
Member

annejan commented Dec 8, 2016

I love these user stories . . really useful imo!

Note that stderr is also used for non-error messages that should not end in normal output buffers.
Checking stderr is not empty is no guarantee that there was an error. It's a unix thing that status messages should end up in stderr to help with things like piping output.

@YoshiMan
Copy link
Author

YoshiMan commented Dec 8, 2016

@annejan yeah. and the big andvantage is, that you can use them for BDD and for unit testing.
Later we could paste them into the code and use them as a base for unit tests.
https://www.qtdeveloperdays.com/sites/default/files/presentation_pdf/ReginaldStadlbauer_bdd_qtdd_2014.pdf

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

No branches or pull requests

3 participants