-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Button or checkbox for draft creation #2594
Comments
I like Option 3 -- well thought through! I do think it could be a first-timer candidate... @Gauravano what extra things would we need to modify in the |
We just need to add checkbox at right place on The follow-up of this, would be adding a button on research page to change status = 1 so that note would be visible publically. I have planned this, what do you think @jywarren? |
Let's add the button on the post page to "final publish" first, then modify
the form after. That way nobody's note gets stuck as a draft.
I do like the idea of using the "draft" tag as a marker on note creation
instead of allowing user to set the status directly... which could be easy
to get wrong and allow bypassing spam controls if we aren't real careful.
Thinking ahead to when we maintain this code in the distant future!
So then we add a check for params[:tags].split(",").includes?("draft") --
in the notes controller, you know?
…On Tue, Apr 24, 2018, 11:29 AM Gaurav Sachdeva ***@***.***> wrote:
We just need to add checkbox at right place on rich.html.erb and a
JavaScript function which would be called when user clicks publish. JS
function would check if the box is marked or not and accordingly sends the
status = 3 or 1 to the controller.
The follow-up of this, would be adding a button on research page to change
status = 1 so that note would be visible publically. I have planned this,
what do you think @jywarren <https://github.com/jywarren>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2594 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ6dgTA5yofIBd8mh4fMDGB_Zegzwks5tr0SbgaJpZM4TLqaA>
.
|
Oops, no, don't do that! Sorry, i hadn't looked at this checklist for a while and forgot it was already implemented. But I also like the implementation you did -- using the |
https://github.com/publiclab/plots2/pull/2308/files#diff-b9551b46e6321bfb977e1f52104c5768R114 Super, so the checkbox can be checked locally in JS, like this: plots2/app/views/editor/rich.html.erb Line 207 in b56de9d
Would we add another Super, sorry for being out of sync! 😀 👍 |
hi @jywarren, I was thinking of passing draft= true via destination URL so that I don't have to play with editor's code. It would go something like this
and if checkbox is marked on submission then destination would be changed like this:- What do you think about this approach @jywarren ? |
oh, that's a good idea! But when you click draft, we have to change it in
JavaScript, no? I think it'll take a little testing to be sure that it gets
set properly, but this is a good way forward. Leave a comment too though
explaining this!
…On Tue, Apr 24, 2018 at 3:17 PM, Gaurav Sachdeva ***@***.***> wrote:
hi @jywarren <https://github.com/jywarren>, I was thinking of passing
draft= true via destination URL so that I don't have to play with editor's
code. It would go something like this
destination: '/notes/create?rich=true' in constructor
and if checkbox is marked on submission then destination would be changed
like this:-
var newDestination = editor.options.destination +"&draft=true";
What do you think about this approach @jywarren
<https://github.com/jywarren> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2594 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ1QnjmCrk7_i4x2vRytywR9kEfNPks5tr3pHgaJpZM4TLqaA>
.
|
Opened in #2667 |
Part of #2307
I have completed first 2 parts of #2307 and now for completing the third one, some insights are needed. Currently, the creation of new post takes place from "Publish" button which first validates data from PublicLab editor and then after formatting a Post request is sent to
notes_controller.rb
fromdist/PublicLab.Editor.js
. Now, here are the ways we can provide user, option to create a draft, we need to choose one of them:After publishing the note, showing user notice that he can press the "Save as draft" button to store as draft. This button would be at https://publiclab.org/notes/gauravano/02-18-2018/gsoc-proposal-email-integration-project page.
Adding a button next to publish, which would go through all the procedure same as publish and then for publishing the draft separate flow needs to be designed.
Adding a checkbox near Publish button, which would require changes in
/views/editor/rich.html.erb
, an advantage of this method is we don't need to do any change in editor.(I vote for this ! )Which option you consider appropriate @jywarren @ebarry ?
The text was updated successfully, but these errors were encountered: