-
Notifications
You must be signed in to change notification settings - Fork 259
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
refactor/Hide-Show #304
base: main
Are you sure you want to change the base?
refactor/Hide-Show #304
Conversation
Hey, I'm having issues with the workflow. The tests are running fine on my local machine, but I suspect there might be a problem related to ttyd. After reviewing the code, I noticed that I'm the first one using the |
What are your opinions on making this the behaviour of I think this type of behaviour fits quite well with |
@maaslalani I'm complete agree with that! If we add these new commands, users will probably get confused. And could be hard to explain the difference in the documentation between But yes, I would just move this logic to |
Hey @maaslalani I've removed |
@maaslalani conflicts solved |
Thanks so much @elmarsan, I'm excited for this one. |
@maaslalani is everything ok? |
What has happened to this PR? It would make VHS infinitely more useful! |
Hey! Sorry about forgetting about this PR, I will take a look since it is a great feature that I think would make VHS more useful! |
@maaslalani let me know if you need any help. |
I agree that this should be the default behavior of Hide / Show. As a new user I was very confused when "Hide" did not actually seem to hide anything. Breaking changes are always hard, but it won't get any easier later :) Maybe rename the old functionality to "fast forward" "start/stop"? :) |
@maaslalani would love to see this feature! It's very hard to set up the demo environment before recording, since any rc files are disabled (otherwise this would be a great alternative). The current behavior, showing all the pre-set up commands, detracts from the demo itself (using hacks like |
This pull request adds two new commands,
Pause
andResume
.All commands between
Pause
andResume
will be executed but not include into the output gif.In order to achieve this behavior I did the following:
Pause
command is executed, all the commands will be processed into new instance of ttyd.VHS
fields into newTerminal
struct.VHS
now hascurrentTerm
,mainTerm
andhiddenTerm
which are pointers to Terminal instances.mainTerm
: Styling is only applied to this instance.hiddenTerm
: Simple ttyd terminal with the default configuration.currentTerm
: It's a mirror ofmainTerm
when execution is not pause and mirror ofhiddenTerm
when execution is paused.Demo
Output
Closes #130