ScratchAddons icon indicating copy to clipboard operation
ScratchAddons copied to clipboard

Scrollable Comments

Open Samq64 opened this issue 3 years ago • 12 comments
trafficstars

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.

image

Samq64 avatar Dec 09 '21 22:12 Samq64

Please enable actions here: https://github.com/Samq64/ScratchAddons/actions

Idea: make the comment height configurable?

cobaltt7 avatar Dec 10 '21 01:12 cobaltt7

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.

Samq64 avatar Dec 10 '21 01:12 Samq64

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.

cobaltt7 avatar Dec 10 '21 02:12 cobaltt7

Should I add myself to the add-on credits?

Samq64 avatar Dec 11 '21 14:12 Samq64

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.

cobaltt7 avatar Dec 11 '21 14:12 cobaltt7

image 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.

Samq64 avatar Dec 18 '21 16:12 Samq64

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.

Samq64 avatar Dec 19 '21 22:12 Samq64

I'm working on some changes to Scratch 2.0 → 3.0 that should make this easier.

mxmou avatar Dec 20 '21 07:12 mxmou

Could someone please add the pending label to this?

Samq64 avatar Dec 23 '21 16:12 Samq64

The maximum height on profile comments is a bit off when scratchr2 is enabled, but other than that, everything looks good.

Samq64 avatar Jan 22 '22 22:01 Samq64

@Samq64 I fixed the issue with 2.0 → 3.0.

Could the setting be enabled by default?

mxmou avatar Jun 12 '22 09:06 mxmou

@Samq64 I fixed the issue with 2.0 → 3.0.

Thanks!

Samq64 avatar Jun 12 '22 14:06 Samq64

There's a git conflict caused by #4828

WorldLanguages avatar Sep 10 '22 21:09 WorldLanguages

I'm working on dynamic settings now.

Samq64 avatar Sep 11 '22 00:09 Samq64

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.

Samq64 avatar Sep 11 '22 01:09 Samq64

Why not 4em so it will always be 4 lines?

Secret-chest avatar Sep 11 '22 14:09 Secret-chest

Why not 4em so it will always be 4 lines?

The line height is more than 1em.

mxmou avatar Sep 11 '22 15:09 mxmou

Why not 4em so it will always be 4 lines?

The line height is more than 1em.

But something em-based should be used.

Secret-chest avatar Sep 13 '22 05:09 Secret-chest

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.

Is this a blocker? Or can this be merged as-is?

WorldLanguages avatar Sep 16 '22 22:09 WorldLanguages

@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.

mxmou avatar Sep 17 '22 07:09 mxmou