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

page number buttons are displayed twice #7530

Closed
keshavsethi opened this issue Feb 18, 2020 · 11 comments
Closed

page number buttons are displayed twice #7530

keshavsethi opened this issue Feb 18, 2020 · 11 comments
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed

Comments

@keshavsethi
Copy link
Member

In https://publiclab.org/tag/question:general
here page numbers are displaying twice as shown:
Screenshot from 2020-02-18 16-42-55

@keshavsethi keshavsethi added the bug the issue is regarding one of our programs which faces problems when a certain task is executed label Feb 18, 2020
@keshavsethi keshavsethi changed the title page number buttons are shown twice page number buttons are displayed twice Feb 18, 2020
@neelesh17
Copy link

Can I claim this issue?

@keshavsethi
Copy link
Member Author

Here Asked and Answered buttons are not working as well thatswhy answered questions are not rendered on clicking thus that div remain empty and it shows two pagination as shown below
Screenshot from 2020-02-20 01-52-47
@cesswairimu @SidharthBansal @VladimirMikulic @nstjean can you please review this issue
Thanks!!

@VladimirMikulic
Copy link
Contributor

This is in fact an issue. @neelesh17 you can take this if that's fine by @keshavsethi.

@cesswairimu
Copy link
Collaborator

Great catch. Thanks

@keshavsethi
Copy link
Member Author

@VladimirMikulic actually I was working on this but if @neelesh17 has started this then it is fine :)

@tyler-wel
Copy link
Contributor

So I take it progress hasn't been made? If no one is currently looking at it, I can try and take a look 😄

@avats-dev
Copy link
Member

So I take it progress hasn't been made? If no one is currently looking at it, I can try and take a look smile

That would be awesome, thanks for stepping up on this. 🚀

@tyler-wel
Copy link
Contributor

tyler-wel commented Oct 3, 2020

Note on the issue

https://publiclab.org/questions/
Questions are displayed correctly with one pagination bar

https://publiclab.org/questions/tag/camera
Displays two pagination bars

Seems to be a problem with the tags routing

Edit: After inspecting the html, seems to be both question and answered pagination rendering at the same time
image

@tyler-wel
Copy link
Contributor

tyler-wel commented Oct 3, 2020

Both _questions.html and _answered.html are rendering their @pagy pagination.

_tab_content has the below users/answered partial rendering even though the tab is not active. Also, it seems as if @answered_questions exists at this point, but there is no mention of @answered_questions inside of _answered.html

<div class="tab-content">
  <div class="tab-pane active" id="asked-tab">
    <%= render partial: "questions/new_question" %>
  </div>

  <div class="tab-pane" id="answered-tab">
    <% if @answered_questions %>
      <%= render partial: "users/answered" %>
    <% end %>
  </div>
</div>

@jywarren I see you did the initial install of pagy and I was wondering what you're thoughts on this are. It seems we may need an extra check in the <% if @pagy %> section. I think both the /questions and /questions/tag/{tag} route are defining their own @pagy and it's creating a little conflict with the two partials

@tyler-wel
Copy link
Contributor

tyler-wel commented Oct 8, 2020

@jywarren Upon testing a little more and clicking on the "Asked" and "Answered" tabs on the questions/tag/ screen, it seems like those two tabs are not working correctly. Nothing changes upon clicking on them. In this case "Test" has been commented on, and "Test2" has not been commented on

@jywarren
Copy link
Member

jywarren commented Dec 1, 2020

Fixed in #8689 ! Thank you!!!!

@jywarren jywarren closed this as completed Dec 1, 2020
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants