job page - collapsible output for each step item in the before/after/scripts.
### Given that:
1. all of `job.before_script` `job.script` `job.after_script` are an array of strings, in which each string is a set of one or more shell commands
2. these attributes accept also a single string that is converted behind the sceneto an array with a single item (as syntax-sugar).
3. the state and behavior of the modern products in the CI industry (github, circle, travis, jenkins+blue-ocean)
### Then
I would expect the UI of Gitlab job page:
1. to present each script step in it's own collapsible section.
2. to collapse by default sections that have finished running and to keep open by default only the last section (where the one that is currently running is always last).
- Keeping the last open, and not just the running section makes printing success banners, bottom-lines and summary results in the end of the jobs more useful.
3. to respect users selections - e.g. - when a section was collapsed or was rendered in a collapsed state after page reload and the user opened it
- to leave it open as the page updates.
- bonus points if you can preserve this between refreshes for n last-recently-viewed jobs.
4. to feature collapse-all / expand all button, one for high-level sections (which are collapsible already now, but just stay open... :shrug: ), and one for all the steps in the page - and one for all steps inside a single high-level section.
5. to scroll down as the output of the currently running stage exceeds the available viewport
more bonus points:
6. feature a way to inspect the full underlying commands-set of an item of a script step. By a collapsible section, by hover tooltip, upon a click on a link/button - or any way you can think of to be summoned intentionally by the viewing user and not disturb when not asked to, without disrupting copying from the log output.
P.S:
I did see [this](https://docs.gitlab.com/ee/ci/jobs/index.html#custom-collapsible-sections), which is better than nothing - but a very manual and fragile thing when delegated to users to handle...
However - since what you do is compile an actual script for each of these attributes - I would expect you to at least start with baking in them the collapse annotations before and after each script step item.
issue