Plots2: PLANNING ISSUE: Draft Feature

Created on 28 Apr 2018  ·  86Comments  ·  Source: publiclab/plots2

Hi @jywarren @steviepubliclab,

I want to inform you guys that my exams are scheduled from 21st May to 6th June, so I wouldn't be able to do much in that time period. I would be available for task discussions/calls/messages. I will try to open and solve small issues in-between exams. So, I would try to do as much work as possible till 18th May and possibly we would be done with this issue till then.

Issue progress: #2307 contains checklist but some more points need to be added and discussed that's why I opened this issue. Most of Back-end for this feature is ready #2308.

Remaining Tasks:

  1. [x] Displaying Draft on author's, moderator and admin's dashboard (Solved in #2666 )
  2. [x] Change in _node_default.html.erb and _node_meta.html.erb to distinguish draft from normal notes as we do for first-timer posts (Solved in #2747 )
  3. [x] Addition of "draft" field in output data of PublicLab editor object (Solved in https://github.com/publiclab/PublicLab.Editor/pull/138 )
  4. [x] Addition of checkbox and JavaScript function in rich.html.erb (Solved in #2747 )
  5. [x] Addition of "Draft" label on notes/show.html.erb (Solved in #2682 )
  6. [x] Publish_draft method in the controller (Solved in #2747 )
  7. [x] Addition of Publish button on notes/show.html.erb (Solved in #2747 )
  8. [x] Adding tests for publish method and the overall test of feature (In progress in #2747 )
  9. [x] Writing wiki page about the draft feature
  10. [x] An alert at the top of a draft page that offers a shareable link to the post for sending around
  11. [x] Like, a secret URL token that allows access to the post even if someone doesn't have an account?

I have tried to divide the issue in minimum part as possible, I can solve 2,4,5,6 and 7 in a single PR or multiple, but I see that some parts can be good FTO candidates like 2,3,5 and 7. What do you guys think, should I open FTO's or not ? Thanks.

enhancement feature planning summer-of-code

Most helpful comment

hey @jywarren @ebarry @steviepubliclab , I just published an article https://medium.com/@gauravano/https-medium-com-gauravano-gsoc-18-with-public-lab-46588104ad0d . Your comments and suggestions are welcome. Should I post it on PL website?

All 86 comments

I think ftos would be great and if any new community members are joining
our soc programs this summer and haven't had the experience of helping a
newcomer complete a PR this could be a great chance! @publiclab/reviewers
what do you think?

On Fri, Apr 27, 2018, 7:12 PM Gaurav Sachdeva notifications@github.com
wrote:

Hi @jywarren https://github.com/jywarren @steviepubliclab
https://github.com/steviepubliclab,

I want to inform you guys that my exams are scheduled from 21st May to
6th June, so I wouldn't be able to do much in that time period. I would be
available for task discussions/calls/messages. I will try to open and solve
small issues in-between exams. So, I would try to do as much work as
possible till 18th May and possibly we would be done with this issue till
then.

Issue progress: #2307 https://github.com/publiclab/plots2/issues/2307
contains checklist but some more points need to be added and discussed
that's why I opened this issue. Most of Back-end for this feature is ready

2308 https://github.com/publiclab/plots2/pull/2308.

Remaining Tasks:

  1. Displaying Draft on author's, moderator and admin's dashboard ---
    In progress at #2666 https://github.com/publiclab/plots2/pull/2666
  2. Change in _node_default.html.erb and _node_meta.html.erb to
    distinguish draft from normal notes as we do for first-timer posts
  3. Addition of "draft" field in output data of PublicLab editor object
    (discussion at #2594 https://github.com/publiclab/plots2/issues/2594
    )
  4. Addition of checkbox and JavaScript function in rich.html.erb
  5. Addition of "Draft" label on notes/show.html.erb
    6.[ ] Publish_draft method in controller and its testing
  6. Addition of Publish button on notes/show.html.erb

I have tried to divide the issue in minimum part as possible, I can solve
2,4,5,6 and 7 in a single PR or multiple , but I see that some parts can be
good FTO candidates like 2,3,5 and 7. What do you guys think, should I open
FTO's or not ? Thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667, or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJysec5AdjKUQweaB_-acJgyw_Pb_ks5ts6XLgaJpZM4TrH7C
.

Ok, I will open FTO issues.

@jywarren which label class would be appropriate for Draft. We are using danger class for unpublished
unpub

How about -success -- that'll be green, more friendly :-)

On Fri, Apr 27, 2018, 7:56 PM Gaurav Sachdeva notifications@github.com
wrote:

@jywarren https://github.com/jywarren which label class would be
appropriate for Draft. We are using danger class for unpublished
[image: unpub]
https://user-images.githubusercontent.com/20878070/39389289-92941090-4aa4-11e8-8cca-3bb3962dbc2f.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-385121538,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJy5DdiFABYEY0n2-Iwv8BSATehfLks5ts7AfgaJpZM4TrH7C
.

Hey @Gauravano @ViditChitkara, We all three have same project so what we can do is divide the issues between three of us to work. Let me know when you are free so that we can plan this out.
Thanks!

hi @namangupta01 , totally agreed. Let's open a new issue or move to channel for further discussion. Thanks !

Hi @namangupta01 , @Gauravano !
Should i create a new Planning issue for Reply by Twitter feature as well ?
Thanks !

In our case, we all have same project ideas, so a Planning issue is important to sync with each other. Although, if you create Planning issue for your project, we may get chance to chime in so, good to create one.

:-)))) great going, team!

On Sat, Apr 28, 2018, 3:11 AM Gaurav Sachdeva notifications@github.com
wrote:

In our case, we all have same project ideas, so a Planning issue is
important to sync with each other. Although, if you create Planning issue
for your project, we may get chance to chime in so, good to create one.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-385147758,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJwzD568ZKaC4mB6oCAuTe05KY46tks5ttBX_gaJpZM4TrH7C
.

hey @jywarren @ebarry @steviepubliclab , I just published an article https://medium.com/@gauravano/https-medium-com-gauravano-gsoc-18-with-public-lab-46588104ad0d . Your comments and suggestions are welcome. Should I post it on PL website?

Awesome - great to see this at PublicLab.org now too! https://publiclab.org/profile/gauravano

@publiclab/soc -- if anyone else is interested in writing updates like these, or anything about your work, it's very welcome on PublicLab.org -- thank you!!!!

@jywarren @steviepubliclab which design would be good for displaying draft on the dashboard. Also, please state if user view needs to be different that mod/admin or not. Like, we have for the moderated post.

Design 1: Similar to Moderated node with some text

draft

Design 2: Label with node

draft_label

Or any other ideas are welcome : )

ooh, i like the green label. but could we put it preceding the title on the
same line?

This would only be visible to people who are working on a draft, right? or
to admins? What would set the "publish date" of the post?

On Wed, May 16, 2018 at 12:37 PM, Gaurav Sachdeva notifications@github.com
wrote:

@jywarren https://github.com/jywarren @steviepubliclab
https://github.com/steviepubliclab which design would be good for
displaying draft on the dashboard. Also, please state if user view needs to
be different that mod/admin or not. Like, we have for the moderated post.

Design 1: Similar to Moderated node with some text
[image: draft]
https://user-images.githubusercontent.com/20878070/40139564-e460f23a-596d-11e8-970f-56720a9f3018.png

Design 2: Label with node
[image: draft_label]
https://user-images.githubusercontent.com/20878070/40139788-a74b78ec-596e-11e8-8715-21ea91910fb7.png

Or any other ideas are welcome : )


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-389640499,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJx0eaKIPPURIE5o6FAI2x95HnBlaks5tzIAUgaJpZM4TrH7C
.

How about this position ?
position

Also, please comment on the opacity of the above draft listing.

This would only be visible to people who are working on a draft, right? or
to admins? What would set the "publish date" of the post?

yup, it would be visible to the author, moderator, and admin for now : ) . In above image, you are seeing the date at which draft is created by the user. For publish date, I will update the date entry when user would publish the draft.

After that, we need to decide the position and design of "publish draft" button
For start here it is:

publish_button

Any relevant icon in mind ? please comment on the position too. Thanks.

Oh I also like the green for draft. I think the Publish button might need
to be a bit more prominent?

Best,
Stevie

On Wed, May 16, 2018 at 4:22 PM, Gaurav Sachdeva notifications@github.com
wrote:

After that, we need to decide the position and design of "publish draft"
button
For start here it is design:

[image: publish_button]
https://user-images.githubusercontent.com/20878070/40144745-4499b308-597d-11e8-99ef-77ae7c7fc903.png

Any relevant icon in mind ? please comment on the position too. Thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-389670185,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHJLrp2VzVGFewQYCwfu_e-T-sAqlPv7ks5tzJizgaJpZM4TrH7C
.

We can have a prominent "Publish Draft" button in the alert banner that
says "This is a draft" maybe?

On Wed, May 16, 2018 at 2:37 PM, Stevie notifications@github.com wrote:

Oh I also like the green for draft. I think the Publish button might need
to be a bit more prominent?

Best,
Stevie

On Wed, May 16, 2018 at 4:22 PM, Gaurav Sachdeva >
wrote:

After that, we need to decide the position and design of "publish draft"
button
For start here it is design:

[image: publish_button]
597d-11e8-99ef-77ae7c7fc903.png>

Any relevant icon in mind ? please comment on the position too. Thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/publiclab/plots2/issues/2667#issuecomment-389670185
,
or mute the thread
auth/AHJLrp2VzVGFewQYCwfu_e-T-sAqlPv7ks5tzJizgaJpZM4TrH7C>

.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-389673834,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ9ZQExWi3iqFH9V3E6UaF7k2KkT_ks5tzJv-gaJpZM4TrH7C
.

okay, I'll post new design for "Publish draft" button in few hours. Thanks.

ok, I guess "green" is liked by all of us so just a final call in-between these two:

1. With Opacity: 0.5 (Similar to Moderated)

first_opt

2. With normal Opacity:

sec_opt

Which one for dashboard ? After this, I can open a FTO for this, if you guys say.

For "Publish draft" --

We use design like this for moderated alerts at top:
this_2

If we want to highlight the button, providing color is one way, which would look like this
design_here

We can choose color for button from these
btn_style

keeping in mind the label color, please provide your thoughts on this. Thanks.

Hi Gaurav - I was wondering a couple things. First, does everyone get to
see drafts on the dashboard (meaning just title and photo)? Or did I read
that logic wrong. Maybe it should be just the author...

Second, we set a final url with the publish date in it. I wonder if we
should reset the url at the moment of final publication, and before then we
can use a temporary one, resetting this on publication? This is a little
complex but seems workable, no? There's a generate_path method to
recalculate the path with the current title and date. That way the title
could be changed as well and this would reflect in the final URL.

On Thu, May 17, 2018, 7:20 AM Gaurav Sachdeva notifications@github.com
wrote:

Reopened #2667 https://github.com/publiclab/plots2/issues/2667.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#event-1632098192, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABfJ_FDf975eCJTR5qHysgYhRqDxfHMks5tzYbugaJpZM4TrH7C
.

hi @jywarren, in #2666 I have changed the logic as

logic_show

so, author of the draft, moderator and admin would be able to see the draft on the dashboard and access it too. Do you think this logic needs correction?

ok, I would call generate_path method to generate new URL at time of final publishing of draft. I would push commits on unstable soon, so we can test features there.

Great that looks right! Sometimes conditional logic is tough to follow.
Great work!

On Thu, May 17, 2018, 8:23 AM Gaurav Sachdeva notifications@github.com
wrote:

hi @jywarren https://github.com/jywarren, in #2666
https://github.com/publiclab/plots2/pull/2666 I have changed the logic
as

[image: logic_show]
https://user-images.githubusercontent.com/20878070/40186175-16845186-5a12-11e8-9f28-9f4a651eeb15.png

so, author of the draft, moderator and admin would be able to see the
draft on the dashboard and access it too. Do you think this logic needs
correction?

ok, I would call generate_path method to generate new URL at time of final
publishing of draft. I would push commits on unstable soon, so we can
test features there.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-389905671,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ0KErU1N_08_DWiXJUJ1VNvtUFHJks5tzZXYgaJpZM4TrH7C
.

Hey @jywarren please merge #2735 and #2666 in unstable whenever you are free. Thanks. And, what do you think about https://github.com/publiclab/plots2/issues/2667#issuecomment-389809487 ?

Hi, @Gauravano -- you should be able to merge to unstable with git push -f [email protected]:publiclab/plots2.git unstable -- just drop in a note to the chatroom when you do so you're not colliding with others!

I like the dimmed title version above -- and the green button on the alert! Thanks!!! 💪 🎉 😄

hi @jywarren I have pushed #2666 on unstable and wanted to check the status of https://unstable.publiclab.org/ before pushing further changes but the page shows 502. Could you help?

Hi @icarito did you see this and could you chime in? Thanks!

On Thu, May 24, 2018, 6:36 AM Gaurav Sachdeva notifications@github.com
wrote:

hi @jywarren https://github.com/jywarren I have pushed #2666
https://github.com/publiclab/plots2/pull/2666 on unstable and wanted to
check the status of https://unstable.publiclab.org/ before pushing
further changes but the page shows 502. Could you help?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-391668025,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ42HFPfYWBCqBgoOuZuTmNsF4ByQks5t1o0CgaJpZM4TrH7C
.

Sure, I hadn't seen it. I'll have a look.

The issue is we haven't yet merged changes to the Makefile. I'll add one commit that has it.

Note the unstable build logs are here:
https://jenkins.laboratoriopublico.org/job/Plots-Unstable/lastFailedBuild/console

I've just pushed commit b0848a4484a17d0525d44e15395b03ac2e14abe8 on top of unstable and it' building now. We're transitioning our deployment procedure to an automated process handled by Makefile and managed in Git along with the repository. At the current time only Unstable is using Makefile but once we've merged https://github.com/publiclab/plots2/pull/2593 I can setup Stable to use it too.

Hi @jywarren @steviepubliclab @ebarry @icarito , I am done with the initial implementation of Draft Feature. Here's the demo ---
https://drive.google.com/file/d/1SA_pFA3BOKj9DMzuqqNERXH0gl5WWw9T/view?usp=sharing

I have done work in #2744 and will merge into unstable where we can further test it and build it further. Hopefully, unstable would be back soon @icarito is working in #2593 . Thanks @icarito.

There is a decision to make whether we want to give this functionality to first-timers or not (keeping spam in mind). Currently, they can save as draft too. What do you think about it ? Thanks.

hi @jywarren @icarito there is error from my part while merging #2666 . Please check here https://github.com/publiclab/plots2/pull/2666#issuecomment-391979076 .Thanks.

Hi,
Interesting question about first timers on drafting. I'm split on it. Can
we say no, first time posters don't have a draft option for now, see how it
goes for a bit then add it later? Or do we need to decide now and set it in
stone?

Another couple questions on implications of this feature for co-publishing:
1) can you both edit the draft? I think that would be great. Also, what
would it look like to each person?
2) who has the ability to publish the draft? Anyone who's an author? I
think this makes sense for now.
3) If we restrict the draft feature to those who have published before,
would it prevent those who are publishing with someone who's not a first
timer to have this feature on a piece they're working on together? I think
as long as there's someone on the post who's not a first time poster the
draft option should be available if we can work it that way.

Thanks for your work on this! I wasn't able to get the GIF to work, but I'm
sure it looks great. Is there another way to share it?

Best!
-Stevie

On Fri, May 25, 2018 at 11:22 AM, Gaurav Sachdeva notifications@github.com
wrote:

hi @jywarren https://github.com/jywarren @icarito
https://github.com/icarito there is error from my part while merging

2666 https://github.com/publiclab/plots2/pull/2666 . Please check here #2666

(comment)
https://github.com/publiclab/plots2/pull/2666#issuecomment-391979076
.Thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-392109993,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHJLrv7pRlos4LYTvCuGr60_eYChLsOwks5t2C_ggaJpZM4TrH7C
.

Can
we say no, first time posters don't have a draft option for now, see how it
goes for a bit then add it later? Or do we need to decide now and set it in
stone?

We can change later, I will just hide this option for first-timers for now if you want.

1) can you both edit the draft? I think that would be great. Also, what
would it look like to each person?

yes, the power of editing the draft would be there with the author, co-author, moderators, admins.

2) who has the ability to publish the draft? Anyone who's an author? I
think this makes sense for now.

The power of publishing is there with the author, co-author, moderators, and admin. Should I change publishing power only to note creator i.e., author?

3) If we restrict the draft feature to those who have published before,
would it prevent those who are publishing with someone who's not a first
timer to have this feature on a piece they're working on together? I think
as long as there's someone on the post who's not a first-time poster the
draft option should be available if we can work it that way.

That's a nice one. For this, the user who is not a first-timer had to create a draft and after that, he/she can collaborate with anyone by just adding that user as co-author.

Currently, co-author can't see the draft on his dashboard but can access it by the link. I am working on it and would be ready by tomorrow, otherwise from a single-user point of view draft feature is ready and can be tested in few hours on https://unstable.publiclab.org/ . Any other question?

Thanks @steviepubliclab and @publiclab/community-reps please feel free to add more questions as it will ensure that no bug is there. Thanks :smiley: .

hi @jywarren @steviepubliclab Draft feature is working at http://unstable.publiclab.org . please try. Thanks.

hi @steviepubliclab , unstable crashes many times, it's up for now, please try now. Thanks.

hi @steviepubliclab @jywarren , here are some designs for starting:

Design 1:
design1

Design 2:
design2

These look pretty good! What if we made it the same font/color/size as 2 of 2 steps left and added it there -- so [ ] Save as draft | 2 of 2 steps left [Publish]

Then the red notice could be also right-aligned, the same font and size as
"Save as draft" (although still red?) and say "Others won't be able to see
this until you're ready - _Learn more_" with a link to a page we'll make at
/wiki/drafts

How does that sound? Thanks-- this looks amazing!!!

On Tue, May 29, 2018 at 3:44 PM, Gaurav Sachdeva notifications@github.com
wrote:

hi @steviepubliclab https://github.com/steviepubliclab @jywarren
https://github.com/jywarren , here are some designs for starting:

Design 1:
[image: design1]
https://user-images.githubusercontent.com/20878070/40680921-46556eee-63a5-11e8-9637-bc761f19a9bc.png

Design 2:
[image: design2]
https://user-images.githubusercontent.com/20878070/40681310-685849c0-63a6-11e8-8e9c-24ffeff1abbb.gif


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-392918154,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJzzclM3dGgruHtIoXXT2Tx20r7V9ks5t3aUKgaJpZM4TrH7C
.

Like you asked for @jywarren

design3
Any more improvements?

Amazing! Two small things. How does that look on a mobile display - should
we disable that feature for mobile or does it wrap nicely?

Second, perhaps the Publish button should change to Save when you check the
box?

Fantastic work!

On Wed, May 30, 2018, 4:12 PM Gaurav Sachdeva notifications@github.com
wrote:

Like you asked for @jywarren https://github.com/jywarren

[image: design3]
https://user-images.githubusercontent.com/20878070/40744916-a60272d2-6473-11e8-8a9e-446d009a304e.gif
Any more improvements?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-393301796,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ89Igxj7IuYhEGuKpOO5ZtIQ3zMvks5t3v0DgaJpZM4TrH7C
.

How does that look on a mobile display - should
we disable that feature for mobile or does it wrap nicely?

Looking messy on mobile view. You can try it on https://unstable.publiclab.org

Second, perhaps the Publish button should change to Save when you check the
box?

Done

new_view

You can test yourself also by making the window narrower - maybe worth
hiding this feature with the "hidden-xs" class so it's not awkward on
smartphones? What do you think?

On Wed, May 30, 2018, 6:21 PM Gaurav Sachdeva notifications@github.com
wrote:

How does that look on a mobile display - should
we disable that feature for mobile or does it wrap nicely?

Looking messy on mobile view. You can try it on
https://unstable.publiclab.org

Second, perhaps the Publish button should change to Save when you check the
box?

Done

[image: new_view]
https://user-images.githubusercontent.com/20878070/40750614-7d415248-6485-11e8-97bf-19078d83dc63.gif


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-393338578,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ4yGUpEDwdVwyMpjFyYj631glPNyks5t3xtYgaJpZM4TrH7C
.

In GIF, I have also tried mobile view. How about trying media queries first ?

Well, the Bootstrap hidden classes use those and are designed to be more
succinct, since they require only a few characters to implement. Give them
a try! Otherwise we'll have to write and maintain several lines of CSS,
which isn't too bad either.

On Wed, May 30, 2018, 6:41 PM Gaurav Sachdeva notifications@github.com
wrote:

In GIF, I have also tried mobile view. How about trying media queries
first ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-393342781,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ1KedAsGl7tn8R5LyWUzCWqGuqFCks5t3yAVgaJpZM4TrH7C
.

@jywarren here's the mobile view

screenshot_20180601-050026

screenshot_20180601-050031

hi @jywarren @steviepubliclab , here's the current notice text after draft is published.

note_after_publishing_draft

Please suggest the new one or changes if any. Also, @jywarren I have added the generate_method in PR. Thanks.

This looks perfect. I think it's ready for merge if you agree?

On Sat, Jun 2, 2018 at 11:52 AM, Gaurav Sachdeva notifications@github.com
wrote:

hi @jywarren https://github.com/jywarren @steviepubliclab
https://github.com/steviepubliclab , here's the current notice text
after draft is published.

[image: note_after_publishing_draft]
https://user-images.githubusercontent.com/20878070/40879317-aed7cfac-66bb-11e8-8567-7b014b0d02e6.png

Please suggest the new one or changes if any. Also, @jywarren
https://github.com/jywarren I have added the generate_method in PR.
Thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-394104919,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ5eamyzHxIjZcsyvCsWm28q7gCGTks5t4tDfgaJpZM4TrH7C
.

Here are the draft related priviledges

| User role | Draft Creation | Draft Editing | Draft publishing |
|-------------|--------------------|-------------------|-----------------------|
|New Comer | No | Yes, if co-author made by normal user | Yes, if co-author |
| Normal User | Yes | yes, if creator or co-author | Yes, if creator or co-author |
| Moderator and admin | yes | yes | yes |

Any change required in this ?

i think that looks good!

On Sat, Jun 2, 2018 at 12:02 PM, Gaurav Sachdeva notifications@github.com
wrote:

Here are the draft related priviledges
User role Draft Creation Draft Editing Draft publishing
New Comer No Yes, if co-author made by normal user Yes, if co-author
Normal User Yes yes, if creator or co-author Yes, if creator or co-author
Moderator and admin yes yes yes

Any change required in this ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-394105517,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ5T3dppEz0VbNlBccH9mWYLHuvEMks5t4tNQgaJpZM4TrH7C
.

Awesome so the feature is complete. Let me throw some final tests and then we could merge it. Thanks.

Amazing! Maybe this could use a little documentation on a wiki page using
your table above, and I wonder if the contributor looking to do technical
writing would be interested?

On Sat, Jun 2, 2018, 12:10 PM Gaurav Sachdeva notifications@github.com
wrote:

Awesome so the feature is complete. Let me throw some final tests and then
we could merge it. Thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-394105946,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ91Ibl1yEKXKc9Q31i9KMVNvmHGAks5t4tUCgaJpZM4TrH7C
.

Actually, I was also thinking of the same, also we could maintain a new doc (or existing) to store the different status values i.e., for nodes, comments, users, etc. How about this?

That's a really good idea!!!!

On Sat, Jun 2, 2018, 1:06 PM Gaurav Sachdeva notifications@github.com
wrote:

Actually, I was also thinking of the same, also we could maintain a new
doc (or existing) to store the different status values i.e., for nodes,
comments, users, etc. How about this?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-394109457,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJx83NUf-4E8-yMPLwQTsvs1JLZ3Qks5t4uIFgaJpZM4TrH7C
.

hi @jywarren , there are some things which hadn't been considered about the feature

  1. Changes in API for hiding draft -- how about we check API in separate PR?
  2. Currently, the user would be able to access his/her draft only through dashboard just like moderated notes.
  3. Although, I have checked all suspicious areas where the draft can appear on our website, but can't find one. So, only eligible users would be able to see. After merging this, I guess we can be attentive if we see any draft content publically.
  4. This set_sidebar method is giving me some pain as I am unable to get control on these lines https://github.com/publiclab/plots2/blob/master/app/controllers/application_controller.rb#L38-L57 after trying many routes, I guess some API may be using this.
  5. Do you know any area where index method is in use https://github.com/publiclab/plots2/blob/master/app/controllers/notes_controller.rb#L5-L8 ?

Thanks

Update:

  1. index method was used in old tests and show the recent, popular, etc. -- This one is resolved.

As basic implementation of Draft feature is done, should I begin with the next stage which would be sharing secret URL with non-PL users or I can implement Subscription part of #2104 , and @ViditChitkara and I can merge our work after that? Thanks.

That sounds wonderful!

Hi @jywarren @steviepubliclab , I am starting on Subscription settings part, some points to discuss:

  1. How about making a settings page where we would have different sub-sections?
  2. Do you guys like this design:

settings

Also, @jywarren could you please approve my post https://stable.publiclab.org/notes/Gaurav/06-05-2018/first-note at https://stable.publiclab.org
Thanks!

I love the design and I just approved your post! Super work, Gaurav!

On Tue, Jun 5, 2018 at 1:05 PM, Gaurav Sachdeva notifications@github.com
wrote:

Hi @jywarren https://github.com/jywarren @steviepubliclab
https://github.com/steviepubliclab , I am starting on Subscription
settings part, some points to discuss:

  1. How about making a settings page where we would have different
    sub-sections?
  2. Do you guys like this design:

https://user-images.githubusercontent.com/20878070/37797928-44caff74-
2e41-11e8-925b-36e91080c3b0.gif

Also, @jywarren https://github.com/jywarren could you please approve my
post https://stable.publiclab.org/notes/Gaurav/06-05-2018/first-note at
https://stable.publiclab.org
Thanks!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-394824494,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ895AYsPoDAYFkdYd8imhrci3KaYks5t5tZlgaJpZM4TrH7C
.

Hi @jywarren @steviepubliclab , I have my last exam on 13th as I notified here . After that I will start working on this issue and subscription part. Thanks.

Super, good luck!!

On Mon, Jun 11, 2018 at 3:15 PM, Gaurav Sachdeva notifications@github.com
wrote:

Hi @jywarren https://github.com/jywarren @steviepubliclab
https://github.com/steviepubliclab , I have my last exam on 13th as I
notified here
https://github.com/publiclab/plots2/issues/2764#issuecomment-395860635
. After that I will start working on this. Thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-396354777,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ-8x_GGgfuAz2DNVAxvlLX2wKUMPks5t7sHSgaJpZM4TrH7C
.

Thanks!

Hi @jywarren @steviepubliclab I have created the wiki page about the Draft feature at https://publiclab.org/wiki/draft-feature , please edit it or tell if you think any modifications are required. Thanks.

Hi, @jywarren @steviepubliclab #2796 would take some time to merge as it depends on Vidit's PR.In the meantime, I would like to give this one a final push.

Here's the plan, we want to give a secret URL to people for having their review. For this, we need to store a token somewhere which would make Secret URL effective. Now, instead of storing URL for each note in the database, we can generate user_tag containing token. That token would be deleted at the time of publishing draft. how does it sound?

Hi @jywarren @steviepubliclab , I have a raised a PR for final part of Draft feature ie., sharing secret URL. Here's demo : https://drive.google.com/file/d/1lxhz-v2WhPwBR9GMut83SrOAwPxdH-mX/view?usp=sharing

Also, I have pushed on unstable , you can try there too.

Here's some queries regarding design:

  1. Where the "Generate secret URL" should be placed and how should it look?
    Current view:

screen1

  1. The URL is shared via a alert for now - is it appropriate?
    Current view:

screen2

Thanks.

Wow this is very cool. I'd say, let's display the prompt to share within
the Draft Note alert at top, with a button that says "Share a secret link".
And i like your using an alert() but we can do one better -- a
prompt('This link will give recipients access to ','link') -- what do you
think?

What about using a normal node tag, since the URL will not be visible
anyways... i guess the node tag may appear in some listings, so it's not as
secure. But user tags also will be publicly visible...

Could we hide this particular user tag? It seems a little bit delicate for
maintainability, to use user tags in such a unique way. But you're right, I
can't think of another easy way.

Wait -- what if we added a unique hash to the end of the draft URL path,
since that's not public, and since we'll overwrite it on publication?

And then the notice of "Draft Note" could explain that "the temporary URL
of this post can be shared to give others access to read it. Click here to
add a co-author"... what do you think?

Thanks for thinking this through!!

On Sat, Jun 16, 2018 at 5:55 PM Gaurav Sachdeva notifications@github.com
wrote:

Hi @jywarren https://github.com/jywarren @steviepubliclab
https://github.com/steviepubliclab , I have a raised a PR for part of
Draft feature ie., sharing secret URL. Here's demo :
https://drive.google.com/file/d/1lxhz-v2WhPwBR9GMut83SrOAwPxdH-mX/view?usp=sharing

Also, I have pushed on unstable , you can try there too.

Here's some queries regarding design:

  1. Where the "Generate secret URL" should be placed and how should it
    look?
    Current view:

[image: screen1]
https://user-images.githubusercontent.com/20878070/41502694-bd048ffc-71dd-11e8-9581-9d0aa4ba5839.png

  1. The URL is shared via a alert for now - is it appropriate?
    Current view:

[image: screen2]
https://user-images.githubusercontent.com/20878070/41502701-ee7abab6-71dd-11e8-85a4-c270cd5f3d5d.png

Thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-397840908,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJwpIPY9fmEkigMFhtnfKZ0p1vZ6Oks5t9X6xgaJpZM4TrH7C
.

Hi @jywarren, i will use prompt, thanks for pointing!

Wait -- what if we added a unique hash to the end of the draft URL path,
since that's not public, and since we'll overwrite it on publication?

Just to be sure we are on the same page - I am storing a unique token in a power tag as you can see and then secret URL is generated by appending that token to the end of normal URL, as you said, at time of publishing, the URL is changed. Do you mean something like hash function?

The only issue is that any tag is readable to the public, even if it's not super obvious. like they're listed alphabetically on /tags, for example. So since:

  • the node.slug field is only viewable to admins and authors/coauthors when it's a draft, AND
  • we change it anyways once published

we could use that to append an alphanumeric hash to the end like slug-of-node-abcdefg which is relatively secret (not shown anywhere publicly). Make sense?

Aha, for example, in unstable, i saw:

screen shot 2018-06-21 at 1 09 05 pm

Hard to predict where it might pop up! Maybe best to not use a tag.

Yes, you are right @jywarren. I will update my PR. Thanks.

Hey @jywarren , I updated my PR with slug to save the secret token and also changed alert to prompt. Please review it. Thanks!

Also, please comment about the "Generate secret URL" button and prompt text. Thanks again!

prompt_using_slug

Let's name the button "share private link" and put it in the alert?

And "with which" instead of "using which" -- and then this looks good!

@jywarren putting button in an alert?

Do you mean notice?

Great work on this, btw!!!

Thanks! Here's the updated view

pic_draft

Oops, yeah - you got it. Maybe just "This is a draft note. Once you're
ready, click [Publish] to make it public. You can share it with
collaborators [using this private link]" ?

Exciting!!

On Sat, Jun 23, 2018 at 3:42 PM Gaurav Sachdeva notifications@github.com
wrote:

Here's the updated view

[image: pic_draft]
https://user-images.githubusercontent.com/20878070/41813038-8502ef7c-774b-11e8-9785-4d7c8a8b4820.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-399703396,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ68BrFB8h5PEl6iobtaspbJ8PdpIks5t_pn5gaJpZM4TrH7C
.

@jywarren we can also generate the sharable link at the time of draft creation and then can show it in notice as you mentioned, instead of "Generate link" button in notice. What do you think?

Also, I have opened an issue at #2920 regarding the display of Drafts, I would like to have your thoughts there @jywarren @steviepubliclab .Thanks!

That sounds good - one step simpler?

On Wed, Jun 27, 2018 at 12:48 PM Gaurav Sachdeva notifications@github.com
wrote:

Also, I have opened an issue at #2920
https://github.com/publiclab/plots2/issues/2920 regarding the display
of Drafts, I would like to have your thoughts there @jywarren
https://github.com/jywarren @steviepubliclab
https://github.com/steviepubliclab .Thanks!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-400750609,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ-7TbOyb1xRlZ_r_Z_6NV_jnPlB1ks5uA7dbgaJpZM4TrH7C
.

Any other change @jywarren ? Thanks.

draft_notice

Looks fantastic!!!

On Sat, Jun 30, 2018, 6:09 AM Gaurav Sachdeva notifications@github.com
wrote:

Any other change @jywarren https://github.com/jywarren ? Thanks.

[image: draft_notice]
https://user-images.githubusercontent.com/20878070/42124164-96b63906-7c7b-11e8-96f3-1c0e3cb80a50.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-401531461,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ6CW_J4h3jEPsP1FmW3zamrbDenRks5uB04tgaJpZM4TrH7C
.

Let's do it!

On Sat, Jun 30, 2018, 9:07 AM Jeffrey Warren jeff@unterbahn.com wrote:

Looks fantastic!!!

On Sat, Jun 30, 2018, 6:09 AM Gaurav Sachdeva notifications@github.com
wrote:

Any other change @jywarren https://github.com/jywarren ? Thanks.

[image: draft_notice]
https://user-images.githubusercontent.com/20878070/42124164-96b63906-7c7b-11e8-96f3-1c0e3cb80a50.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2667#issuecomment-401531461,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ6CW_J4h3jEPsP1FmW3zamrbDenRks5uB04tgaJpZM4TrH7C
.

Ping me when you're ready to merge it! Great work!

It's ready @jywarren! :smiley:

Was this page helpful?
0 / 5 - 0 ratings