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

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

Open
jayesh9747 opened this issue Dec 21, 2024 · 10 comments
Open

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

jayesh9747 opened this issue Dec 21, 2024 · 10 comments
Assignees

Comments

@jayesh9747
Copy link
Contributor


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


@jayesh9747
Copy link
Contributor Author

@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.

@AlexVelezLl
Copy link
Member

AlexVelezLl commented Dec 21, 2024

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.

@jayesh9747
Copy link
Contributor Author

@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
Copy link
Contributor Author

@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

Screencast.from.04-01-25.10.39.25.PM.IST.webm

Production ENV:

Screencast.from.04-01-25.10.46.00.PM.IST.webm

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?

@AlexVelezLl
Copy link
Member

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.

@jayesh9747
Copy link
Contributor Author

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
Copy link
Contributor Author

Also provide differnt browser(brave) demo vedio

Screencast.from.07-01-25.09.00.26.AM.IST.webm

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.

@AlexVelezLl
Copy link
Member

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.

@jayesh9747
Copy link
Contributor Author

@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.

@AlexVelezLl
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants