Skip to content

Add toggle button to hide/show R input lines in screen output#28

Open
hupponen wants to merge 3 commits intomasterfrom
hide-screen-output-input-lines
Open

Add toggle button to hide/show R input lines in screen output#28
hupponen wants to merge 3 commits intomasterfrom
hide-screen-output-input-lines

Conversation

@hupponen
Copy link
Copy Markdown
Contributor

Summary

  • Adds a 'Hide input lines' / 'Show input lines' button next to the Screen Output title in the job details view
  • Button is only shown for R tools (tool ID ending with .R)
  • Clicking the button filters out lines starting with > (echoed R input commands)
  • Button is right-aligned, consistent with the Cancel all button style
  • Filter state resets when switching to a different job

Adds a 'Hide/Show input lines' button next to the Screen Output title
in the job details view, visible only for R tools. Clicking it filters
out lines starting with '>' (echoed R input commands).
@klemela
Copy link
Copy Markdown
Contributor

klemela commented Apr 22, 2026

  1. I tried this in an example session "08_microbial_community_analysis_16S_preprocessing_ASV_DADA2" and selected the latest job. Does R use also "+" to mark code blocks?
> if (fileNotOk("multiqc_report.html")) {
+   system("mv stderr.log error_log.txt")
+ }

When this is enabled, the last two lines stay visible. Those should probably be hidden too?

  1. We could think about enabling this by default.
  2. My first test session didn't have any ">" -characters, which made me think if the button should be disabled until there is something to hide. But this session was probably from the old client, so this shouldn't be an issue anymore.

Lines starting with '+' are continuations of multi-line R inputs and should
be hidden together with '>' prompt lines when the hide-input-lines toggle is on.
- Hide the toggle button when the screen output has no '>' input lines
- Default to hiding input lines when opening a job
@hupponen
Copy link
Copy Markdown
Contributor Author

hupponen commented Apr 22, 2026

  1. Good point, fixed.
  2. Thought that too, input lines now hidden by default.
  3. Ended up hiding the button if no input lines, looks cleaner that way. Also with disabled, it's sometimes not super clear if the buttons is disabled or not, especially with the grey 'secondary' buttons.

@klemela klemela self-requested a review April 22, 2026 13:46
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