Skip to content

fix(journeys-admin): hide Load More button when no more images to load [NES-1692]#9245

Draft
edmonday wants to merge 1 commit into
mainfrom
edmondshen/nes-1692-media-library-hide-load-more-button-when-no-more-images-to
Draft

fix(journeys-admin): hide Load More button when no more images to load [NES-1692]#9245
edmonday wants to merge 1 commit into
mainfrom
edmondshen/nes-1692-media-library-hide-load-more-button-when-no-more-images-to

Conversation

@edmonday
Copy link
Copy Markdown
Contributor

Summary

In the media library, the "Load More" button used to stay visible after the last page and switch its label to "No more to load". That's confusing — feedback from Lyuba. Now the button is simply hidden when there are no more images to load.

Changes

  • LoadMoreButton returns null when !hasMore && !loading (loading still shows the loading state).
  • Drops the "No more to load" copy entirely.
  • Updates LoadMoreButton.spec.tsx and MediaLibrary.spec.tsx to assert the hidden state.

Linear

Test plan

  • npx jest --config apps/journeys-admin/jest.config.ts --no-coverage on LoadMoreButton.spec.tsx and MediaLibrary.spec.tsx — 20 passed
  • Manual QA: open media library drawer with a short result set and confirm the button disappears at the end

@linear
Copy link
Copy Markdown

linear Bot commented May 21, 2026

NES-1692

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0cbc4d1f-7026-4890-ba8e-c9d36c460120

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch edmondshen/nes-1692-media-library-hide-load-more-button-when-no-more-images-to

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

Fails
🚫 Please assign someone to merge this PR.
🚫 Please request a reviewer for this PR.

Generated by 🚫 dangerJS against b530ccc

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 21, 2026

View your CI Pipeline Execution ↗ for commit b530ccc

Command Status Duration Result
nx run-many --target=vercel-alias --projects=jo... ✅ Succeeded 1s View ↗
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 12s View ↗
nx run-many --target=deploy --projects=journeys... ✅ Succeeded 1m 37s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-21 22:12:50 UTC

@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin May 21, 2026 22:09 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys-admin ✅ Ready journeys-admin preview Fri May 22 10:12:50 NZST 2026

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

Successfully merging this pull request may close these issues.

1 participant