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

Activity prompt buttons on Thumbnail grids #4092

Closed
jywarren opened this issue Dec 1, 2018 · 26 comments
Closed

Activity prompt buttons on Thumbnail grids #4092

jywarren opened this issue Dec 1, 2018 · 26 comments
Labels
fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet good first issue help wanted requires help by anyone willing to contribute HTML Ruby

Comments

@jywarren
Copy link
Member

jywarren commented Dec 1, 2018

We have some great new features by @ValentinaTironi -- a thumbnail grid -- see the Activities section of https://publiclab.org/micro 👍

One thing that would be great is to have the built-in buttons below that we see on non-thumbnail Activity grids, such as at https://publiclab.org/coqui

image

Here is the code that auto-generates the button and notice:

<a class="grid-embed grid-embed-<%= randomSeed %>" title="Embed this table on another site."><i class="fa fa-code" style="color:#aaa;"></i></a>
<% if type == "questions" || tagname.include?('question:') %>
<p><a href='/post?tags=question:<%= tagname %>,<%= tagname %>&template=question&title=How%20do%20I...&redirect=question' class='btn btn-primary add-activity'>Ask a question</a> &nbsp;or <a href='/subscribe/tag/question:<%= tagname %>'>help answer future questions<span class='hidden-sm hidden-xs'> on this topic</span></a></p>
<% elsif type == "activity" || tagname.include?('activity:') %>
<p><a href='/post?tags=activity:<%= tagname %>,<%= tagname %>,seeks:replications&title=How%20to%20do%20X' class='btn btn-primary add-activity'>Add an activity</a> &nbsp;or <a href='/post?tags=<%= tagname %>,question:<%= tagname %>,request:activity&template=question&title=How%20do%20I...&redirect=question' class='request-activity'>request an activity<span class='hidden-xs hidden-sm'> guide you don't see listed</span></a></p>
<p><i>Activities should include a materials list, costs and a step-by-step guide to construction with photos. Learn what <a href="https://publiclab.org/notes/warren/09-17-2016/what-makes-a-good-activity">makes a good activity here</a>.</i>
</p>
<% end %>

I think we could break it into a partial template and also include it into the new thumbnail template, so we don't have redundant code:

https://github.com/publiclab/plots2/blob/master/app/views/grids/_thumbnail.html.erb

We'd love help with this and it could become a GCI task too!

@jywarren jywarren added help wanted requires help by anyone willing to contribute Ruby fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet HTML gci-candidate labels Dec 1, 2018
@vatbq
Copy link
Contributor

vatbq commented Dec 1, 2018

If I can help something, don't hesitate to ask me!

@oorjitchowdhary
Copy link
Member

Impressive work there, @ValentinaTironi

@oorjitchowdhary
Copy link
Member

One thing that would be great is to have the built-in buttons below that we see on non-thumbnail Activity grids, such as at https://publiclab.org/coqui

@jywarren I'm unable to understand this...

@vatbq
Copy link
Contributor

vatbq commented Dec 1, 2018

I think he is trying to say that now doesn't exist a button to create notes in thumbnail grid like in others grids.
For example, here, in the questions grids there is an ask a question button

screen shot 2018-12-01 at 3 49 32 pm 1

@jywarren Am I right?
@oorjitchowdhary Hope this helps you!

@jywarren
Copy link
Member Author

jywarren commented Dec 2, 2018 via email

@oorjitchowdhary
Copy link
Member

screenshot 42

I can see add an activity button in the thumbnail grid too.. Just the same as in the other non-thumbnail grids..
So do we want to add ask a question too?

@oorjitchowdhary
Copy link
Member

@publiclab/reviewers ?

@vatbq
Copy link
Contributor

vatbq commented Dec 6, 2018

Sorry for the delay! About your question: I don't see it locally

screen shot 2018-12-06 at 7 20 27 pm

Try create one in your project and let me know if the button appears!
@oorjitchowdhary

@jywarren
Copy link
Member Author

jywarren commented Dec 6, 2018 via email

@vatbq
Copy link
Contributor

vatbq commented Dec 7, 2018

@oorjitchowdhary are you still working on this?

@oorjitchowdhary
Copy link
Member

Okay.. I'll open a PR in a while..

@oorjitchowdhary
Copy link
Member

@jywarren How can I make a thumbnail grid like this on localhost? After making a wiki page..

@jywarren
Copy link
Member Author

jywarren commented Dec 7, 2018 via email

@oorjitchowdhary
Copy link
Member

Okay thanks

@oorjitchowdhary
Copy link
Member

That doesn't work @jywarren

@jywarren
Copy link
Member Author

jywarren commented Dec 7, 2018 via email

@oorjitchowdhary
Copy link
Member

When I use [notes:grid:test], nothing comes up.. it simply prints this on the page

@jywarren
Copy link
Member Author

jywarren commented Dec 7, 2018

Perhaps you don't have any notes tagged with test?

@oorjitchowdhary
Copy link
Member

Nope, i have it.. 2 of them actually

@jywarren
Copy link
Member Author

jywarren commented Dec 7, 2018 via email

@oorjitchowdhary
Copy link
Member

@jywarren I figured out that one but I'm stuck on another error... 😭

screenshot 62

@oorjitchowdhary
Copy link
Member

This is happening when I try to create a new partial template..

@jywarren
Copy link
Member Author

jywarren commented Dec 7, 2018 via email

@oorjitchowdhary
Copy link
Member

Ok i will do that

@oorjitchowdhary
Copy link
Member

@jywarren pls check out #4175

@oorjitchowdhary
Copy link
Member

And if you've got time pls take a look at #4129 too.. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet good first issue help wanted requires help by anyone willing to contribute HTML Ruby
Projects
None yet
Development

No branches or pull requests

4 participants