Code Block Collapsing Feature
Are there plans to add a code block collapsing feature in the next update?
I don't have plans for that in the next version but it's something I want to add eventually. I need to do a major update which includes some breaking changes, and plan to start focusing on that in the coming weeks. It might be awhile though. I don't have a timeline.
Hi @KevinBatdorf, I did a round of testing of your wonderful Code plugin. I used the Enable frontend max height feature quite a bit, and wondered if there could be a add-on to have a similar overlay to the "See more text" overlay, that says "Collapse" and revert to "see more feature" just on the frontend.
Do you mean so that it returns back to the shorter height? I think it should be pretty easy to impliment. I'll look into it this weekend.
Yes. Exactly. Oh, that would be wonderful 👏
I just made a release with this feature :) Let me know if you have any issues using it
Hi there, Kevin... That's awesome! Thank you! You can see it in action in this post
When you collapse it, you, however, lose your place on the post... I expected to get back to the vicinity where jumped off when used the "Click to see more" button..
Good point. Thanks for that feedback. Let me look into that
I have a PR here with an update. I think it works ok but I can check again on your page after you update it. I can make a release in a day or two also, but if you want you can get a build here (that won't have any issues updating).
Build (at the bottom of the page) https://github.com/KevinBatdorf/code-block-pro/actions/runs/14967719452
PR: https://github.com/KevinBatdorf/code-block-pro/pull/362
Thank you Kevin. I'll give it another try tomorrow.
The PR seems to do the trick nicely! It a great experience now on the front end. Thank you, @KevinBatdorf for making the modification so fast. 🎉
@tanmb Does that work for your use case as well?
This should be live in a few minutes. I'll go ahead and close this issue but feel free to reopen or leave a comment @tanmb if you were looking for something else :)
Thanks @bph for the push to implement it and feedback.