Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLANNING ISSUE: Draft Feature #2667

Closed
11 tasks done
grvsachdeva opened this issue Apr 27, 2018 · 86 comments · Fixed by #2666 or #2835
Closed
11 tasks done

PLANNING ISSUE: Draft Feature #2667

grvsachdeva opened this issue Apr 27, 2018 · 86 comments · Fixed by #2666 or #2835
Assignees
Labels
enhancement explains that the issue is to improve upon one of our existing features feature explains that the issue is to add a new feature planning Planning issues! summer-of-code

Comments

@grvsachdeva
Copy link
Member

grvsachdeva commented Apr 27, 2018

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. Displaying Draft on author's, moderator and admin's dashboard (Solved in Draft display on Dashboard #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 (Solved in Submitting a draft  #2747 )
  3. Addition of "draft" field in output data of PublicLab editor object (Solved in Sending draft status in output from PL Editor #2677 PublicLab.Editor#138 )
  4. Addition of checkbox and JavaScript function in rich.html.erb (Solved in Submitting a draft  #2747 )
  5. Addition of "Draft" label on notes/show.html.erb (Solved in Add Draft Label to the research note if status = 3. Fixes #2678 #2682 )
  6. Publish_draft method in the controller (Solved in Submitting a draft  #2747 )
  7. Addition of Publish button on notes/show.html.erb (Solved in Submitting a draft  #2747 )
  8. Adding tests for publish method and the overall test of feature (In progress in Submitting a draft  #2747 )
  9. Writing wiki page about the draft feature
  10. An alert at the top of a draft page that offers a shareable link to the post for sending around
  11. 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.

@grvsachdeva grvsachdeva added summer-of-code enhancement explains that the issue is to improve upon one of our existing features feature explains that the issue is to add a new feature labels Apr 27, 2018
@jywarren
Copy link
Member

jywarren commented Apr 27, 2018 via email

@grvsachdeva
Copy link
Member Author

Ok, I will open FTO issues.

@grvsachdeva
Copy link
Member Author

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

@jywarren
Copy link
Member

jywarren commented Apr 28, 2018 via email

@namangupta01
Copy link
Member

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!

@grvsachdeva
Copy link
Member Author

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

@sagarpreet-chadha
Copy link
Contributor

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

@grvsachdeva
Copy link
Member Author

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.

@jywarren
Copy link
Member

jywarren commented Apr 29, 2018 via email

@jywarren jywarren added the planning Planning issues! label May 3, 2018
@grvsachdeva
Copy link
Member Author

grvsachdeva commented May 3, 2018

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?

@jywarren
Copy link
Member

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!!!!

@grvsachdeva
Copy link
Member Author

grvsachdeva commented May 16, 2018

@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 : )

@jywarren
Copy link
Member

jywarren commented May 16, 2018 via email

@grvsachdeva
Copy link
Member Author

grvsachdeva commented May 16, 2018

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.

@grvsachdeva
Copy link
Member Author

grvsachdeva commented May 16, 2018

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.

@steviepubliclab
Copy link
Contributor

steviepubliclab commented May 16, 2018 via email

@jywarren
Copy link
Member

jywarren commented May 17, 2018 via email

@grvsachdeva
Copy link
Member Author

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

@grvsachdeva
Copy link
Member Author

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.

@jywarren
Copy link
Member

jywarren commented May 17, 2018 via email

@grvsachdeva
Copy link
Member Author

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.

@ghost ghost assigned grvsachdeva Jun 16, 2018
@ghost ghost added the in progress label Jun 16, 2018
@grvsachdeva
Copy link
Member Author

grvsachdeva commented Jun 16, 2018

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.

@jywarren
Copy link
Member

jywarren commented Jun 18, 2018 via email

@grvsachdeva
Copy link
Member Author

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?

@jywarren
Copy link
Member

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?

@jywarren
Copy link
Member

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.

@grvsachdeva
Copy link
Member Author

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

@grvsachdeva
Copy link
Member Author

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

@jywarren
Copy link
Member

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

@jywarren
Copy link
Member

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

@grvsachdeva
Copy link
Member Author

@jywarren putting button in an alert?

@grvsachdeva
Copy link
Member Author

Do you mean notice?

@jywarren
Copy link
Member

Great work on this, btw!!!

@grvsachdeva
Copy link
Member Author

grvsachdeva commented Jun 23, 2018

Thanks! Here's the updated view

pic_draft

@jywarren
Copy link
Member

jywarren commented Jun 26, 2018 via email

@grvsachdeva
Copy link
Member Author

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

@grvsachdeva
Copy link
Member Author

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

@jywarren
Copy link
Member

jywarren commented Jun 27, 2018 via email

@grvsachdeva
Copy link
Member Author

Any other change @jywarren ? Thanks.

draft_notice

@jywarren
Copy link
Member

jywarren commented Jun 30, 2018 via email

@jywarren
Copy link
Member

jywarren commented Jun 30, 2018 via email

@jywarren
Copy link
Member

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

@grvsachdeva
Copy link
Member Author

It's ready @jywarren! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement explains that the issue is to improve upon one of our existing features feature explains that the issue is to add a new feature planning Planning issues! summer-of-code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants