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

Answer Preview is not working #3534

Closed
avsingh999 opened this issue Sep 29, 2018 · 19 comments
Closed

Answer Preview is not working #3534

avsingh999 opened this issue Sep 29, 2018 · 19 comments
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet help wanted requires help by anyone willing to contribute JavaScript

Comments

@avsingh999
Copy link
Member

avsingh999 commented Sep 29, 2018

Please describe the problem (or idea)

If I want to Comment/answer of the question, In question page there is two option I can comment or I can give answer and comment Preview working fine but Answer preview is not working, if click on preview then it's showing comments preview not an answer's preview

issue

Link to the comment/answer form - https://github.com/publiclab/plots2/blob/master/app/views/comments/_form.html.erb

Both new comment and new answer uses the same form. In research notes, there is only a single empty form so preview button works fine. But, when we come to questions, preview button doesn't work for answer's comment form and answer's form. When we press preview for any form, it shows/toggle preview for the first empty form of the page.

Link to toggle_preview function - https://github.com/publiclab/plots2/blob/master/app/assets/javascripts/editor.js#L103-L134

Thanks!

@jywarren jywarren added bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet add-code-links gci-candidate labels Sep 29, 2018
@Souravirus
Copy link
Member

Nice catch @avsingh999. Can you please add this and other gci-candidate issue you have made to #3276 and the google code-in dashboard. Thanks!!

@SidharthBansal
Copy link
Member

This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @SidharthBansal to get it labelled. Or, if this is not your first time, try to solve it yourself!

@ebarry
Copy link
Member

ebarry commented Oct 5, 2018

Would it be appropriate to add to this issue that Preview is also not working on wikis or notes, or should that be a separate issue?

@oorjitchowdhary
Copy link
Member

Hi, I'd like to work on this .. I'm a Gci candidate... @publiclab/mentors

@oorjitchowdhary
Copy link
Member

Can i get links to the code files....

@oorjitchowdhary
Copy link
Member

@SidharthBansal Could you help me here.. I think I may be able to solve both #3534 and #4122

@oorjitchowdhary
Copy link
Member

Answer and Comment both are using comments/form .. So if we make an answers/form will that help us solve the error... ?

@oorjitchowdhary oorjitchowdhary mentioned this issue Dec 8, 2018
4 tasks
@SidharthBansal
Copy link
Member

@oorjitchowdhary this is fto issue, so you are ineligible for this.
You can try other issues.

@oorjitchowdhary
Copy link
Member

Okay no problem.. I tried working on this as this wasn't a beginner task on gci

@SidharthBansal
Copy link
Member

SidharthBansal commented Dec 8, 2018 via email

@oorjitchowdhary
Copy link
Member

No worries.. You guys are already working so hard... 👏

@Ivilili
Copy link
Contributor

Ivilili commented Mar 6, 2019

Hi, my name is Ivana and I'm Outreachy participant. Can I work on this issue?

@grvsachdeva
Copy link
Member

Hi @Ivilili, welcome to Public Lab. Go ahead with the issue 👍

@Ivilili
Copy link
Contributor

Ivilili commented Mar 13, 2019

Hi @publiclab/mentors @gauravano I have few questions about this issue. I've noticed that preview and other features in Answer are attached to Comment area.
How should I approach this? Should I create new form for answer, because now comment and answer are together in comments/form?
Or maybe even integrate answers with comments?

@grvsachdeva
Copy link
Member

Hi @Ivilili, I went through the issue myself and it's a bit complex. The preview button calls the function toggle_preview which is located here- https://github.com/publiclab/plots2/blob/master/app/assets/javascripts/editor.js#L103-L134

And, if one observes carefully then will observe that pressing preview button opens the preview of first available empty form. So, something wrong here - https://github.com/publiclab/plots2/blob/master/app/assets/javascripts/editor.js#L103-L134 only. It may take time to fix this one. So, do you like to have another issue?

@grvsachdeva
Copy link
Member

grvsachdeva commented Mar 13, 2019

I have created #5056 for you. You can claim that. And, thanks for trying this.

@Ivilili
Copy link
Contributor

Ivilili commented Mar 13, 2019

Thank you @gauravano, I will start with new one immediately. It's hard to give up on this one...

@grvsachdeva
Copy link
Member

You can come back to this one anytime after recording your first contribution. Thanks!

@debck debck mentioned this issue Sep 14, 2019
63 tasks
@sashadev-sky
Copy link
Member

sashadev-sky commented Sep 15, 2019

Hi, I am closing this because we have gotten rid of the answers editor and just have comments now, which was working fine. We can open specific issues for the other surrounding issues with the buttons. going to re-open it for GCI with a different prompt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet help wanted requires help by anyone willing to contribute JavaScript
Projects
None yet
Development

No branches or pull requests

9 participants