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 Request] 代码折叠功能完善建议 #5284

Open
QAbot-zh opened this issue Aug 16, 2024 · 9 comments
Open

[Feature Request] 代码折叠功能完善建议 #5284

QAbot-zh opened this issue Aug 16, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@QAbot-zh
Copy link

🥰 需求描述

注意到已经增加代码折叠功能,尝试后提供两点想法:

  1. 只有“查看全部”,没有“折叠”,所以代码展开后没办法把代码折叠回去,希望在代码展开后增加“代码折叠”选项
  2. 代码块在折叠状态时无法点击右上角的代码复制,希望将代码复制的按钮优先级提高

🧐 解决方案

调整代码折叠的逻辑和样式

📝 补充信息

当前版本运行截图:
image

@QAbot-zh QAbot-zh added the enhancement New feature or request label Aug 16, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Feature Request] Suggestions for improving the code folding function

🥰 Description of requirements

Noticed that the code folding function has been added, and here are two thoughts after trying it:

  1. There is only "View All" and no "Fold", so there is no way to fold the code back after the code is expanded. I hope to add a "Code Folding" option after the code is expanded.
  2. When the code block is in the collapsed state, you cannot click the code copy in the upper right corner. I hope to increase the priority of the code copy button.

🧐 Solution

Adjust code folding logic and style

📝 Supplementary information

Screenshot of the current version running:
image

@TCOTC
Copy link

TCOTC commented Sep 15, 2024

我觉得目前的方案不太合理。应该显示开头的代码,然后把 查看全部 放到底部。

并且还有一个问题是点击 copy 之后会把“查看全部”这四个字也复制上

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I think the current plan is unreasonable. The code at the beginning should be displayed and View All should be moved to the bottom.

And another problem is that after clicking copy, the four words "View All" will also be copied.

@mayfwl mayfwl mentioned this issue Sep 23, 2024
10 tasks
@mayfwl
Copy link
Contributor

mayfwl commented Sep 23, 2024

我觉得目前的方案不太合理。应该显示开头的代码,然后把 放到底部。查看全部

并且还有一个问题是点击 之后会把“查看全部”这四个字也复制上copy

放底部不太好修改,复制‘查看全部‘已修复

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I think the current plan is unreasonable. The code at the beginning should be shown and then placed at the bottom. View all

And another problem is that after clicking, the four words "View All" will also be copied with copy

It’s not easy to modify when placed at the bottom. Copying ‘View All’ has been fixed.

@liudhzhyym
Copy link

是否有办法关闭代码折叠功能?现在是默认开启代码折叠

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Is there a way to turn off code folding? Code folding is now enabled by default

@QAbot-zh
Copy link
Author

是否有办法关闭代码折叠功能?现在是默认开启代码折叠

现在最新代码已经支持关闭代码折叠了:

image

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Is there a way to turn off code folding? Code folding is now enabled by default

The latest code now supports turning off code folding:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants