ep_comments_page icon indicating copy to clipboard operation
ep_comments_page copied to clipboard

comment in a read-only Pad?

Open gulaschskanone opened this issue 10 years ago • 20 comments

How do you think? Could it be possible to comment in a read-only Pad? They are stored to database, too

key:

comments:padID 

value:

"commentId":{ "author": data.author, "name": data.name, "text": data.text, "changeTo": data.changeTo, "changeFrom": data.changeFrom, "timestamp": new Date().getTime()}

(commentManager.js, line 62, right?)

But in

key:

pad:padId

there won't be the comment (commentId), so after reload the pad the comment won't be shown. Is that the consciously behavior? Does anyone know a way / fix to save comments on read-only pads?

gulaschskanone avatar Jun 30 '15 13:06 gulaschskanone

You can already comment in a read only pad afaik.

JohnMcLear avatar Jun 30 '15 13:06 JohnMcLear

Or is it you can see them but not reply?

JohnMcLear avatar Jun 30 '15 13:06 JohnMcLear

After press on "Comment" the input is visible like in the editable view - but after reload no more. In the database I also can't find the given input. Deletion comments in read-only mode (saved in editable mode) will also not working persistently. It's a uncommon behavior on my system, right?

gulaschskanone avatar Jun 30 '15 14:06 gulaschskanone

I swear I added support for this.. Did you checkout latest version?

JohnMcLear avatar Jun 30 '15 14:06 JohnMcLear

I added via "npm install ep_comments_page" version 0.0.32 after reinstall via "git clone" it's unfortunately the same behavior

gulaschskanone avatar Jun 30 '15 14:06 gulaschskanone

Mheh, will take a look tonight or tomorrow.

JohnMcLear avatar Jun 30 '15 14:06 JohnMcLear

https://github.com/JohnMcLear/ep_comments/pull/39

JohnMcLear avatar Jun 30 '15 22:06 JohnMcLear

I'm not gonna get time to look at this now until Late August, apologies!

JohnMcLear avatar Jun 30 '15 22:06 JohnMcLear

Hey, how would you fix this? Maybe one of us can try.

gulaschskanone avatar Sep 17 '15 14:09 gulaschskanone

Just allow comments through as an allowed message type and add the comments container to the read only view.

JohnMcLear avatar Sep 18 '15 14:09 JohnMcLear

If you say that, it sounds so easy... I have no idea how I can define comments as allowed.

gulaschskanone avatar Sep 18 '15 16:09 gulaschskanone

@gulaschskanone I'm available as a gun for hire if you want to get this done sooner than I get spare time?

JohnMcLear avatar Sep 18 '15 16:09 JohnMcLear

Current (ep: 1.8.3, ep_comments: 0.1.0) behavior is like this: Comments can be added on the pad as well as on the read-only pad, but the contents of the comments cannot be seen in the other version. The corresponding regions are highlighted in both though.

Would be nice if one could also see the contents of the comments in both, pad and read-only pad, regardless of the origin of the comment.

thmo avatar May 01 '20 17:05 thmo

@thmo it's probably not a huge job to fix, assuming this is for a commercial project did you want to setup a bounty so we can get more eyes on it else it's gonna just fall naturally on our roadmap.

JohnMcLear avatar May 01 '20 17:05 JohnMcLear

Just found a real bug: You can make and later accept a suggestion in a read-only pad, resulting the original pad text to be changed.

(No, it's not for a commercial project.)

thmo avatar May 01 '20 17:05 thmo

Ah okies, well when we're doing our next big push on ep_comments we will try address these bugs. Fair point RE the security issue, that should be getting rejected!

JohnMcLear avatar May 01 '20 17:05 JohnMcLear

Is there any activity on this? Or can someone point out where the issue could be? I might be able to come up with a fix.

pr4xx avatar Oct 01 '20 17:10 pr4xx

Take a stab!

JohnMcLear avatar Oct 01 '20 19:10 JohnMcLear

I did some more testing and my PR did not seem to resolve the issue completely. I have to take another look. Right now live syncing does not happen, only after refresh. And the readonly side cannot make new comments but only comment an existing one.

pr4xx avatar Oct 10 '20 13:10 pr4xx

Hello, I can make comments in readonly pad but they disappear after the refresh. Is this an expected behaviour? Thanks!

erkaner avatar Jun 02 '21 19:06 erkaner