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

Fix "Show 0 more" on inline people lists #2151

Closed
SidharthBansal opened this issue Jan 28, 2018 · 17 comments
Closed

Fix "Show 0 more" on inline people lists #2151

SidharthBansal opened this issue Jan 28, 2018 · 17 comments
Labels
fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet has-pull-request issues which already have a pull request solving it help wanted requires help by anyone willing to contribute JavaScript Ruby

Comments

@SidharthBansal
Copy link
Member

SidharthBansal commented Jan 28, 2018

Please describe the problem (or idea)

Show 0 more is present in the people's list

What happened just before the problem occurred? Or what problem could this idea solve?
If there is no more stuff, the text should not appear

What did you expect to see that you didn't?

image

How to Solve:

You can check out @kevinzluo's work in #3980 for solving this.

The file which would require changes will be https://github.com/publiclab/plots2/blob/master/app/views/grids/_people.html.erb

Please show us where to look

https://publiclab.org/w/power-tags#Inline+power+tags

@Ankit-Singla
Copy link

Hey, I would like to work on this.

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Feb 2, 2018

I As the codes are overlapping in #2150 and #2151 so @Ankit-Singla is working on it

@publiclab publiclab deleted a comment from Ankit-Singla Sep 3, 2018
@jywarren jywarren changed the title Show 0 more on people list Fix "Show 0 more" on inline people lists Sep 17, 2018
@jonxuxu
Copy link
Member

jonxuxu commented Nov 30, 2018

Hi, has this issue been fixed? I would like to work on it if it hasn't yet.

@kevinzluo
Copy link
Collaborator

kevinzluo commented Nov 30, 2018

@JonathanXu1 I was testing out this issue for #2150 (PR #3980 ) and it looks to be already fixed.

Here is a table with 10 items:
image

Here is a table w/ more than 10 items:
showmorelessagain

Just want to clarify that I was not the one who fixed the show 0 more; it was already fixed when I made my PR.

@grvsachdeva
Copy link
Member

Hi @kevinzluo could you add a screenshot here showing the show more/less grid in action for people and add your PR number too(for reference). Thanks!

@SidharthBansal
Copy link
Member Author

I don't think the issue is yet solved, please check https://publiclab.org/w/power-tags#Inline+power+tags

@jonxuxu
Copy link
Member

jonxuxu commented Dec 10, 2018

@kevinzluo I think you aren't experiencing the error because section does not include the <%= users.length - 10 %> attribute in the show more tag

@kevinzluo
Copy link
Collaborator

Thanks for the heads up. I didn't realize there were multiple partials for grids 😃. The ones i was using were the notes grids and never checked the people grids.

@SidharthBansal
Copy link
Member Author

If anyone knows the solution and wants to send a patch then it will be great

@jonxuxu
Copy link
Member

jonxuxu commented Dec 10, 2018

@SidharthBansal I've sent a patch on #4253

@grvsachdeva grvsachdeva added help wanted requires help by anyone willing to contribute fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet and removed add-code-links labels Mar 13, 2019
@grvsachdeva
Copy link
Member

@jazdao you wanna try this?

@vansjyo
Copy link
Contributor

vansjyo commented Mar 14, 2019

@SidharthBansal Can I try this if not yet solved?

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Mar 14, 2019 via email

@siaw23-retired
Copy link
Collaborator

got for it! @vansjyo 😊🎉

@vansjyo
Copy link
Contributor

vansjyo commented Mar 14, 2019

We can replace the 9 with a 10 and I suppose the problem in this issue should be solved. What do you think?

<% if index == 9 %>
<tr class="show-all">
<td><a>Show <%= users.length - 10 %> more <b class="caret"></b></a></td>

@vansjyo
Copy link
Contributor

vansjyo commented Mar 15, 2019

@SidharthBansal Is there anything more that you are expecting from this fix? If not, I'll open a PR, else please let me know. Thanks.

@grvsachdeva
Copy link
Member

Yes @vansjyo, feel free to open a PR. 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 has-pull-request issues which already have a pull request solving it help wanted requires help by anyone willing to contribute JavaScript Ruby
Projects
None yet
8 participants