webplatform / annotation-service

Hypothes.is’ container project to customize for notes.webplatform.org
1 stars 0 forks source link

Ability to set annotation privacy setting to 'Public' by default. #27

Closed renoirb closed 9 years ago

renoirb commented 9 years ago

As a W3C spec contributor, most of the work is in the open. Some users asked why they can’t see their own annotations when not logged in.

Could it be possible to set as "Public" by default for our annotations.

Some notes

In hypothesis/h version @84c6283

Around this section or in annotation.coffee around value.permissions.

Current hypothesis/h @master branch

After some code reading, it feels like its not configurable. Closest to making it default might be to change directives/privacy.coffee at line 67. Set VISIBILITY_PUBLIC instead of VISIBILITY_PRIVATE.

azaroth42 commented 9 years ago

+1 to defaulting to public

dwhly commented 9 years ago

Our newest branch does this.

renoirb commented 9 years ago

Great. How to make it so in our own. See updated description.

tilgovi commented 9 years ago

Our newest branch does this.

@dwhly no, it doesn't.

shepazu commented 9 years ago

@tilgovi, do you know how we can do this? Renoir found this line of code that he thought might help: https://github.com/hypothesis/h/blob/84c62837cda5d717870a4a0d5ca2d669cd01f531/h/static/scripts/directives.coffee#L10

This doesn't seem like it should be hard to do.

tilgovi commented 9 years ago

That line does not help. That line is about determining when the drop-down says "Public" and when it says "Only Me".

The way to do it on the version of h you're using would be to change the line here to read: ['group:__world__', token.userId].

On our current master branch, the approach is different, but also cleaner, and doesn't require forking. After next week, or maybe late next week, I should be able to help you move to our latest code and make these changes.

shepazu commented 9 years ago

@tilgovi, thanks for the fix. Which line do we change, and will that still let people make private annotations if they choose?

tilgovi commented 9 years ago

Oh, sorry. I forgot to hit paste.

https://github.com/hypothesis/h/blob/84c62837cda5d717870a4a0d5ca2d669cd01f531/h/static/scripts/controllers.coffee#L171

tilgovi commented 9 years ago

will that still let people make private annotations if they choose

yes

renoirb commented 9 years ago

Thanks! i’ll do that!

dwhly commented 9 years ago

@dwhly no, it doesn't.

Yep. It does.

Create a new account-- the visibility defaults to public now. Just confirmed it again. I believe @aron made this change recently. Can't recall which pull request it was exactly.

tilgovi commented 9 years ago

Create a new account-- the visibility defaults to public now. Just confirmed it again.

I promise you that's not the case :-D.

Copying my message from the email thread:

No. It's not. The solution we implement with local storage isn't tied to your account, it's tied to your browser. Log in, even to your same account, with a private browsing window and you will see the default is private.
dwhly commented 9 years ago

I promise you that's not the case :-D.

Holy mother of god did I think I had you on that one. :)

renoirb commented 9 years ago

Deployed and running.