plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Inline wiki table formatting broken

Open jywarren opened this issue 8 years ago • 23 comments

We have nice inline tables of wiki pages, like on this page: https://publiclab.org/wiki/air-sensors

image

However as you can see the table headers are a bit broken -- they don't properly label the columns.

The file for this is here:

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

It'd be great for someone to try fixing this!

jywarren avatar Oct 24 '18 19:10 jywarren

@mardelvalle maybe this one would be good for you?

jywarren avatar Oct 24 '18 20:10 jywarren

@jywarren Yes this looks like a good one. I will work on it then. Thanks for the help.

mardelvalle avatar Oct 25 '18 15:10 mardelvalle

Awesome! Thanks!!

On Thu, Oct 25, 2018, 11:09 AM Maria Cristina Del Valle < [email protected] wrote:

@jywarren https://github.com/jywarren Yes this looks like a good one. I will work on it then. Thanks for the help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3757#issuecomment-433088658, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ8gAji3Tj8JklkuEsRRvlWYkjnZ6ks5uodP-gaJpZM4X4vzD .

jywarren avatar Oct 25 '18 15:10 jywarren

@jywarren This is a picture of the change I did. One thing I was thinking about doing (though it may not be in the scope of this issue) is removing the star icon. It doesn't seem to match the rest of the page's content. Thoughts? screen shot 2018-10-27 at 8 39 29 am

mardelvalle avatar Oct 27 '18 12:10 mardelvalle

Hi! I think you could also just have the star and no other text for that column; we are thinking ahead for translation issues and that'd probably make our lives easier.

This looks great. What is the "table content" text at the top, could we remove that too?

Thanks!!!

On Sat, Oct 27, 2018, 8:43 AM Maria Cristina Del Valle < [email protected] wrote:

@jywarren https://github.com/jywarren This is a picture of the change I did. One thing I was thinking about doing (though it may not be in the scope of this issue) is removing the star icon. It doesn't seem to match the rest of the page's content. Thoughts? [image: screen shot 2018-10-27 at 8 39 29 am] https://user-images.githubusercontent.com/32019417/47604216-4fc61880-d9c4-11e8-8b94-abce0056d0ca.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3757#issuecomment-433617208, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJxmoD38gmRP0flk4TjeWL5eByiNKks5upFTagaJpZM4X4vzD .

jywarren avatar Oct 27 '18 22:10 jywarren

Alright. Sure I can remove the "like" text.

The "table content" phrase I believe is being generated from another file as it's not part of the table. I can look into it more where it is coming from but thus far I haven't been able to locate it.

mardelvalle avatar Oct 27 '18 23:10 mardelvalle

@jywarren Hi Again! I tried telling more into the code (specifically the show.html.erb and am not able to still locate the area where the text "Table Content" is being created.

mardelvalle avatar Oct 30 '18 23:10 mardelvalle

Hmm, perhaps looking at a page where this is being used, we could view source and try to find it that way?

On Tue, Oct 30, 2018 at 7:30 PM Maria Cristina Del Valle < [email protected]> wrote:

@jywarren https://github.com/jywarren Hi Again! I tried telling more into the code (specifically the show.html.erb and am not able to still locate the area where the text "Table Content" is being created.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3757#issuecomment-434508057, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ2nr5GTKxN3k0uWzENF0rks_4yYzks5uqODZgaJpZM4X4vzD .

jywarren avatar Oct 30 '18 23:10 jywarren

I was trying to do that. However, I had no luck... I was trying it on the page that you gave me but it seems the text is outside of the table. The show.html.erb is connected to the larger div that is associated with the code but doesn't seem to have any specific reference to title generation such as table content. I also tried to recreate the senario on localhost however, I did not see how to generate a similar table.

mardelvalle avatar Oct 30 '18 23:10 mardelvalle

Ah! look - i used the Google dev console, and found something about translation missing:

image

Perhaps it's looking for a translation using the t(...) syntax? Could you find the text in /config/locales/en.yml ?

jywarren avatar Oct 30 '18 23:10 jywarren

And to generate a table like that, you can insert, on its own line, [wikis:_____] where _____ is a tag name that has been used for some wiki pages.

jywarren avatar Oct 30 '18 23:10 jywarren

Hope that helps!!! 👍

jywarren avatar Oct 30 '18 23:10 jywarren

Hmmm. So your thought then would be that <%= raw t('wiki._wikis.table_content') %> is searching for content in the yml file that doesn't exist and is generating the words "table content" as a result. I don't think that <%= raw t('wiki._wikis.table_content') %> is currently doing anything so I could just remove it from the code I think. Let me me if that sounds about right.

mardelvalle avatar Oct 31 '18 20:10 mardelvalle

Yes, sorry for my slow reply here! That sounds exactly right. You may want to look in /config/locales/... to see if there is any translation matching table_content and that could be deleted too!

jywarren avatar Nov 06 '18 22:11 jywarren

Awesome! Thanks Jeffrey I will take a look there :)

mardelvalle avatar Nov 07 '18 15:11 mardelvalle

@mardelvalle are you working on this issue? I was thinking of picking it up as a GCI task. If you are not; then please let me know soon!

oorjitchowdhary avatar Nov 26 '18 05:11 oorjitchowdhary

@oorjitchowdary thanks for asking! I have some code that I think may work but with the dev environment as is I haven't been able to test if it actually works so I have been hesitant about pushing the changes. Maybe if I push it you could take a look to see if things check out?

mardelvalle avatar Nov 26 '18 11:11 mardelvalle

@mardelvalle yeah sure.. I will checkout the code and troubleshoot it for you..

oorjitchowdhary avatar Nov 26 '18 11:11 oorjitchowdhary

@mardelvalle Are you still working on it? As a GCi participant, I'd really like to solve this issue... @jywarren Can I open a PR for this?

oorjitchowdhary avatar Nov 30 '18 05:11 oorjitchowdhary

Sorry I will push it up this weekend :)

On Friday, November 30, 2018, Oorjit Chowdhary [email protected] wrote:

@mardelvalle https://github.com/mardelvalle Are you still working on it? As a GCi participant, I'd really like to solve this issue... @jywarren https://github.com/jywarren Can I open a PR for this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3757#issuecomment-443098188, or mute the thread https://github.com/notifications/unsubscribe-auth/AeiT2ZAy91Rm5_ImUXPVxMGRQVR5WCTFks5u0MXvgaJpZM4X4vzD .

mardelvalle avatar Nov 30 '18 11:11 mardelvalle