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

develop notes:tagname inline tag alternative to display a grid of notes, not a table #1097

Closed
jywarren opened this issue Dec 14, 2016 · 7 comments
Assignees
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute

Comments

@jywarren
Copy link
Member

jywarren commented Dec 14, 2016

This is not very high priority... but:

Currently, on a wiki or note, we can insert a table of topical content using the syntax:

[notes:tagname] -- like, for example, for content tagged "balloon-mapping", we can do:

[notes:balloon-mapping] and that's swapped for a table of balloon mapping posts.

But some content is very visual and it'd be great to see a grid of thumbnails, much like we show on tag pages like https://publiclab.org/tag/balloon-mapping

Let's make a new inline tag, similar to [notes:tagname] but call it [notes:grid:tagname] (which would have to be above the existing [notes:tagname] check, so that it doesn't try to search for content tagged grid:tagname, you know?).

The current inline grids are listed here:

body = NodeShared.notes_grid(body)

And the code for each lives in this document:

https://github.com/publiclab/plots2/blob/master/app/models/concerns/node_shared.rb#L31-L67

We could have a new section just above that, that uses this matcher:

    body = body.gsub(/\<p\>\[notes\:(.+)\]/) do |tagname|

The template code could be laid out like what we use for the tag pages:

https://github.com/publiclab/plots2/blob/master/app/views/notes/_notes.html.erb

We can actually just render a partial in a helper, as in this line:

output += a.render_to_string(template: "grids/_notes",

This is a little complex, but worth a try -- i'm happy to offer help. It could also be broken up a bit into smaller projects, for example just swapping in a holding string like Inline thumbnail grid coming soon. as the first step.

Mockups

screenshot 2016-11-14 at 6 17 27 pm

@jywarren jywarren added break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute labels Dec 14, 2016
@jywarren jywarren added this to the Activity grids milestone Dec 14, 2016
@ryzokuken
Copy link
Member

@jywarren I'd like to work on this. Could you point me to an existing page containing the table layout though? (So I could get an idea about how it exactly looks)

Also, I had been thinking that we could choose the size of the grid based on the screen size (this is not exactly required but would really help avoid us cramming 12 partials per row in a mobile screen).

@jywarren
Copy link
Member Author

jywarren commented Dec 16, 2016 via email

@jywarren
Copy link
Member Author

There are some great design options here: https://www.froala.com/design-blocks under "Features" -- if anyone would like to tackle this one!

@jywarren
Copy link
Member Author

@ViditChitkara would you like to try tackling this one? We've wanted it for a long time!

@ViditChitkara
Copy link
Member

Sure, I'd love to!

@kaustubh-nair
Copy link
Member

@jywarren This might take some time, but I'd be willing to work on it!

@sagarpreet-chadha
Copy link
Contributor

That would be great @KauNair 😄 . Thank you 🎉 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants