[GH-ISSUE #5881] [FR] Add more functionality to code blocks in addition to a shortcut key #2613

Open
opened 2026-03-23 21:23:45 +00:00 by mirror · 3 comments
Owner

Originally created by @usshauler on GitHub (Aug 5, 2024).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/5881

Description

Currently, code blocks in most applications are pretty standard with a copy button and the ability to change the coding language with the use of a drop-down button as in Appflowy. Adding the line numbers to the left of the code block is a great feature. My suggestion here is to please enhance and add further functionality to the code blocks themselves to make this app stand out over the rest. I am sure a vast majority of users store code as YML files or other ENV's and because of this I believe it would be great to add the ability to toggle viewing spacing in the code blocks like in VS Code. Other great options would be to further enhance code blocks by adding toggle options in settings for this and perhaps allow resizing of the code boxes and appearance. The option to lock the blocks themselves from editing would also be a welcome update. Thank you for your time and I hope you take my input into consideration.

Impact

Code Blocks revamp. More options for code blocks is better.

Additional Context

No response

Originally created by @usshauler on GitHub (Aug 5, 2024). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/5881 ### Description Currently, code blocks in most applications are pretty standard with a copy button and the ability to change the coding language with the use of a drop-down button as in Appflowy. Adding the line numbers to the left of the code block is a great feature. My suggestion here is to please enhance and add further functionality to the code blocks themselves to make this app stand out over the rest. I am sure a vast majority of users store code as YML files or other ENV's and because of this I believe it would be great to add the ability to toggle viewing spacing in the code blocks like in VS Code. Other great options would be to further enhance code blocks by adding toggle options in settings for this and perhaps allow resizing of the code boxes and appearance. The option to lock the blocks themselves from editing would also be a welcome update. Thank you for your time and I hope you take my input into consideration. ### Impact Code Blocks revamp. More options for code blocks is better. ### Additional Context _No response_
Author
Owner

@Xazin commented on GitHub (Aug 5, 2024):

I've made a recap of your suggestions here:

  • Toggle show/hide spacing
  • Collapse/expand methods/classes
  • Customize appearance of the Code Block

Additionally you mentioned being able to resize the code block, do you mean its height? So that it's a fixed height and the code inside it is scrollable vertically instead.

<!-- gh-comment-id:2270001100 --> @Xazin commented on GitHub (Aug 5, 2024): I've made a recap of your suggestions here: - Toggle show/hide spacing - Collapse/expand methods/classes - Customize appearance of the Code Block Additionally you mentioned being able to resize the code block, do you mean its height? So that it's a fixed height and the code inside it is scrollable vertically instead.
Author
Owner

@usshauler commented on GitHub (Aug 5, 2024):

I appreciate the recap. I see the width as being sometimes overly large for
the code contained within it. I am more concerned with this versus height.
Perhaps being able to customize the code block background color as well
would be nice. I’m all for code blocks if you can’t tell. Thank you !

On Mon, Aug 5, 2024 at 5:06 PM Mathias Mogensen @.***>
wrote:

I've made a recap of your suggestions here:

  • Toggle show/hide spacing
  • Collapse/expand methods/classes
  • Customize appearance of the Code Block

Additionally you mentioned being able to resize the code block, do you
mean its height? So that it's a fixed height and the code inside it is
scrollable vertically instead.


Reply to this email directly, view it on GitHub
https://github.com/AppFlowy-IO/AppFlowy/issues/5881#issuecomment-2270001100,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALZ6SKPDIGHUZJXB7GOVYVDZP7ZPLAVCNFSM6AAAAABMA2KQH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGAYDCMJQGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2270070333 --> @usshauler commented on GitHub (Aug 5, 2024): I appreciate the recap. I see the width as being sometimes overly large for the code contained within it. I am more concerned with this versus height. Perhaps being able to customize the code block background color as well would be nice. I’m all for code blocks if you can’t tell. Thank you ! On Mon, Aug 5, 2024 at 5:06 PM Mathias Mogensen ***@***.***> wrote: > I've made a recap of your suggestions here: > > - Toggle show/hide spacing > - Collapse/expand methods/classes > - Customize appearance of the Code Block > > Additionally you mentioned being able to resize the code block, do you > mean its height? So that it's a fixed height and the code inside it is > scrollable vertically instead. > > — > Reply to this email directly, view it on GitHub > <https://github.com/AppFlowy-IO/AppFlowy/issues/5881#issuecomment-2270001100>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ALZ6SKPDIGHUZJXB7GOVYVDZP7ZPLAVCNFSM6AAAAABMA2KQH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGAYDCMJQGA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@moojet commented on GitHub (Nov 8, 2024):

Being able to set the relative font size of code blocks would be great (eg. in Workspace settings, under 'workspace font').
Currently (set to Albert Sans & font size set to the 4th dot from left) the code text is larger than the sidebar text.
Imho it should be the same or smaller.
image

<!-- gh-comment-id:2464184815 --> @moojet commented on GitHub (Nov 8, 2024): Being able to set the relative font size of code blocks would be great (eg. in Workspace settings, under 'workspace font'). Currently (set to Albert Sans & font size set to the 4th dot from left) the code text is larger than the sidebar text. Imho it should be the same or smaller. <img width="674" alt="image" src="https://github.com/user-attachments/assets/dd30f670-d5b0-46ff-9e55-cdfdf30e040c">
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#2613
No description provided.