studio icon indicating copy to clipboard operation
studio copied to clipboard

[Bug]: 'Show More' Button Misalignment and Missing on Revisit

Open jayesh9747 opened this issue 11 months ago • 13 comments


name: Pagination 'show more button issue' about: Report a bug to help us improve
title: "[Bug]: 'Show More' Button Misalignment and Missing on Revisit"


Observed behavior

  1. On the first visit, the 'Show More' button is not centered.
    Screenshot:
    First Visit

  2. On revisiting the same page:

    • The 'Show More' button does not appear.
    • Screenshot:
      Second Visit
  3. In Level 2, there are 35 resources available. However:

    • On the first visit, only 25 documents are loaded.
    • When revisiting, the 'Show More' button does not appear, likely due to preloaded content.
    • Screenshot:
      Level 2 Resources

Expected behavior

  1. The 'Show More' button should be centered.
  2. The 'Show More' button should appear consistently when revisiting the page.
  3. All 35 resources should be accessible, either by scrolling or by using the 'Show More' button.

User-facing consequences

  1. Users might find it inconvenient or confusing due to:
    • Misalignment of the button on the first visit.
    • Missing 'Show More' button when revisiting, which limits access to all resources.

Errors and logs

No errors or logs observed.


Additional information

  • The issue might stem from content preloading logic, which prevents the 'Show More' button from appearing when revisiting pages.

Steps to reproduce the issue

  1. Go to https://hotfixes.studio.learningequality.org/en/accounts/#/ and sign in.
  2. Open a channel and click Add > Import from channels > African Storybook Library (multiple languages) > Afrikaans > Level 2.
  3. Observe the following:
    • The alignment of the 'Show More' button on the first visit.
    • The 'Show More' button missing when revisiting the same page.
    • Only 25 out of 35 resources accessible on revisit.

Usage Details

  • OS: Ubuntu
  • Browser: Chrome
  • URL: https://hotfixes.studio.learningequality.org/
  • Other information: N/A

jayesh9747 avatar Dec 21 '24 03:12 jayesh9747

@MisRob The issue #4838 (Hotfixes - Import from other channels - The 'Show more' button is not centered) was assigned to me. While working on it, I noticed there were additional related problems, so I opened a new issue to address them. As I'm interested in contributing to both, I started working on resolving these issues together to ensure a complete fix.

jayesh9747 avatar Dec 21 '24 04:12 jayesh9747

Hey @jayesh9747. I will assign this to you. However, It will be great if you can solve #4838 first an then come to this later.

AlexVelezLl avatar Dec 21 '24 14:12 AlexVelezLl

@AlexVelezLl, thank you for your advice. I will definitely follow the path you suggested. Once again, thank you! I deeply resonate with your answer.

jayesh9747 avatar Dec 22 '24 05:12 jayesh9747

@AlexVelezLl @MisRob

I'm working on this issue where the "Show More" button misalignment and missing on revisit happens. It works fine in the local development environment, but in production, it's not working properly. I thought it might be an API response issue, but the response should be correct and consistent in both environments.

I've attached some console screenshots.

Local ENV: Image

Image

https://github.com/user-attachments/assets/c49a3a79-df1c-4c6c-aa45-14ae3ce467cc

Production ENV:

https://github.com/user-attachments/assets/878c2abe-ff66-4a20-95d9-ac79c5853463

In there production Enviorment there api resone have showmore Object but there is no show more button.

Can you help me figure out what might be causing this and suggest how to tackle it?

jayesh9747 avatar Jan 04 '25 17:01 jayesh9747

Hey @jayesh9747! Could you provide more context about when is this happening? I am being able to see the show more button in the prod env, so perhaps is an edge case.

AlexVelezLl avatar Jan 06 '25 20:01 AlexVelezLl

Hello, @AlexVelezLl,

Whenever I go to:

https://hotfixes.studio.learningequality.org/en/accounts/#/ and sign in. Open a channel, click Add > Import from channels > African Storybook Library (multiple languages) > Afrikaans > Level 2. The first time, the "Show More" button was visible. However, when I revisited the same resource page, the "Show More" button was no longer shown. Additionally, only the initial 25 resources were displayed, and no more were loaded.

I have shared a demo video above. Could you revisit the same resource page and check whether you're able to see the "Show More" button?

jayesh9747 avatar Jan 07 '25 03:01 jayesh9747

Also provide differnt browser(brave) demo vedio

https://github.com/user-attachments/assets/199fe910-a290-4bee-a49e-046fbbf0783d

see in this vedio whenever i go leval 4 first time i am able to see the show more button but when i revisit same leval for show more button vanished.

jayesh9747 avatar Jan 07 '25 03:01 jayesh9747

Oh okay, I get it, although this is the bug this issue is reporting. We need to find a way of how can we solve it in unstable first.

AlexVelezLl avatar Jan 07 '25 13:01 AlexVelezLl

@AlexVelezLl can you guide me from where i can start to find out this ? and please tag me whenever you reply so that i will get notification, thank you.

jayesh9747 avatar Jan 12 '25 13:01 jayesh9747

Hey @jayesh9747! For sure! The page that is showing those resources is the CurrentTopicView that calls this NodePanel component. Within that component you can see here the code that renders the showMore button. So a first step would be to investigate what happens with that displayShowMoreButton condition, and why its not met the second time we visit the page.

AlexVelezLl avatar Jan 13 '25 22:01 AlexVelezLl

Hi @AlexVelezLl , will Learning Equity be participating in GSoC this year?

jayesh9747 avatar Jan 26 '25 07:01 jayesh9747

Hi @jayesh9747. We will most likely apply, but we need to wait to see if we'll be accepted. It's best to keep an eye on GSOC website for all the important dates and accepted organizations.

AlexVelezLl avatar Jan 27 '25 18:01 AlexVelezLl

Automatically unassigning @jayesh9747 due to no comments here, or updates on the associated pull request for 1 month. @jayesh9747, if you're still interested in this issue or already have work in progress, please message us here, and we'll assign you again. Thank you!