ScratchAddons
ScratchAddons copied to clipboard
Scrollable Comments
Resolves #1870
Changes
Adds a toggle to comments-linebreaks which adds a scroll bar to comments that are taller than the specified number of lines.
Reason for changes
Some comments take up a lot of space when the addon is enabled.
Tests
Tested on Edge 96.

Please enable actions here: https://github.com/Samq64/ScratchAddons/actions
Idea: make the comment height configurable?
Please enable actions here: https://github.com/Samq64/ScratchAddons/actions
done.
Idea: make the comment height configurable?
The problem is that if I make it an integer setting I would need to somehow append px to it with CSS or use JS instead.
calc(var(--settingName) * 1px)
From: Samq64 @.> Sent: Thursday, December 9, 2021 7:57:42 PM To: ScratchAddons/ScratchAddons @.> Cc: Paul Reid @.>; Comment @.> Subject: Re: [ScratchAddons/ScratchAddons] Scrollable Comments (PR #3905)
Please enable actions here: https://github.com/Samq64/ScratchAddons/actions
done.
Idea: make the comment height configurable?
The problem is that if I make it an integer setting I would need to somehow append px to it with pure CSS or use JS.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ScratchAddons/ScratchAddons/pull/3905#issuecomment-990527759, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOT5DETNHQSOD4DVAJ4G3G3UQFNBNANCNFSM5JXT6EDQ.
Should I add myself to the add-on credits?
You can if you want
From: Samq64 @.> Sent: Saturday, December 11, 2021 8:36:03 AM To: ScratchAddons/ScratchAddons @.> Cc: Paul Reid @.>; Comment @.> Subject: Re: [ScratchAddons/ScratchAddons] Scrollable Comments (PR #3905)
Should I add myself to the credits?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ScratchAddons/ScratchAddons/pull/3905#issuecomment-991665578, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOT5DERWKKG5GKV67G4RWSLUQNOVHANCNFSM5JXT6EDQ.
It's probably another addon that's interfering, because that never happened before when only comments-linebreaks was enabled.
Edit: It's caused by Scratch 2.0 → 3.0.
Moving the addon to the bottom of addons.json doesn't fix the overflowing text on profiles when Scratch 2.0 → 3.0 is enabled and I don't think there's an easy way to fix it otherwise since styling profile comments with CSS doesn't work, so I probably wouldn't be able to use !important.
I'm working on some changes to Scratch 2.0 → 3.0 that should make this easier.
Could someone please add the pending label to this?
The maximum height on profile comments is a bit off when scratchr2 is enabled, but other than that, everything looks good.
@Samq64 I fixed the issue with 2.0 → 3.0.
Could the setting be enabled by default?
@Samq64 I fixed the issue with 2.0 → 3.0.
Thanks!
There's a git conflict caused by #4828
I'm working on dynamic settings now.
I couldn't get scratch-www scrollbar dynamic enable/disable working because of !important but it's needed to get the scrollbar to appear in the first place.
Why not 4em so it will always be 4 lines?
Why not 4em so it will always be 4 lines?
The line height is more than 1em.
Why not 4em so it will always be 4 lines?
The line height is more than 1em.
But something em-based should be used.
I couldn't get
scratch-wwwscrollbar dynamic enable/disable working because of!importantbut it's needed to get the scrollbar to appear in the first place.
Is this a blocker? Or can this be merged as-is?
@Samq64 !important is not the problem - "updateUserstylesOnSettingsChange": true needs to be added to the addon manifest to allow the setting to be dynamically enabled and disabled.