Skip to content

fix: media uploads grid spinner#848

Merged
smarcet merged 3 commits into
masterfrom
fix/media-uploads-grid-infinite-spinner
Apr 7, 2026
Merged

fix: media uploads grid spinner#848
smarcet merged 3 commits into
masterfrom
fix/media-uploads-grid-infinite-spinner

Conversation

@priscila-moneo

@priscila-moneo priscila-moneo commented Mar 30, 2026

Copy link
Copy Markdown

ref: https://app.clickup.com/t/86b90w2rq

Summary by CodeRabbit

  • Bug Fixes

    • Media upload materials links now consistently open in a new tab using the current summit ID when records lack embedded summit/presentation/event identifiers, ensuring reliable navigation.
  • Tests

    • Added a test verifying the materials link opens in a new tab with the fallback summit ID.

@coderabbitai

coderabbitai Bot commented Mar 30, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fc1d0718-2fd6-4086-baac-51b3dd344b20

📥 Commits

Reviewing files that changed from the base of the PR and between 5b078d9 and bae7fb0.

📒 Files selected for processing (1)
  • src/pages/events/summit-event-list-page.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/events/summit-event-list-page.js

📝 Walkthrough

Walkthrough

Field rendering now uses the current summit ID as a fallback when building media-upload material links; a test was added to assert the link opens in a new tab using that fallback.

Changes

Cohort / File(s) Summary
Test Coverage
src/pages/events/__tests__/summit-event-list-page.test.js
Added test asserting the media-upload materials link opens in _blank and uses current summit id when the row lacks summit/presentation/event identifiers.
Media Upload Link Construction
src/pages/events/summit-event-list-page.js
fieldNames signature extended to accept currentSummitId; render() passes currentSummit.id. media_uploads column onClick now builds URL using currentSummitId instead of m.summit_id. No public API changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • martinquiroga-exo
  • smarcet
  • matiasperrone-exo

Poem

🐰 I hop through code with a curious grin,
If a material's lost, let the summit step in.
New tabs pop open, the path now is clear,
Links find their home—hip hop, cheer! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions 'media uploads grid spinner' but the changes implement fallback logic for media upload material links using currentSummitId, not spinner fixes. Revise the title to accurately reflect the main change, such as 'fix: use currentSummitId as fallback for media upload material links' or 'fix: media uploads fallback to current summit id'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/media-uploads-grid-infinite-spinner

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes navigation to media-upload “materials” pages by ensuring the summit ID used in the URL is always available (falling back to the currently selected summit when upload records don’t include summit_id).

Changes:

  • Extend fieldNames to accept currentSummitId and use it as a fallback when building media upload materials links.
  • Add a unit test covering the new fallback behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/pages/events/summit-event-list-page.js Use currentSummit.id as a fallback when media_upload.summit_id (and row.summit_id) is missing so materials links open reliably.
src/pages/events/tests/summit-event-list-page.test.js Adds coverage to assert the materials link uses the current summit ID fallback.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 271 to 276
const summitId =
m?.summit_id || row?.summit_id || currentSummitId;
if (!row?.id || !summitId) return false;
window.open(
`/app/summits/${m.summit_id}/events/${row.id}/materials/${m.id}`,
`/app/summits/${summitId}/events/${row.id}/materials/${m.id}`,
"_blank"

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title mentions a “grid spinner”, but the actual change here is about constructing the media-upload materials URL with a summit-id fallback. Consider updating the PR title (or adding a note in the description) so the intent matches the code change and is searchable in history/release notes.

Copilot uses AI. Check for mistakes.

@santipalenque santipalenque left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a small request, overall looks good

onClick={(ev) => {
ev.preventDefault();
if (!row?.id) return false;
const summitId =

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currentSummitId should be enough since there is no way a user can land here without one, lets just use that and forget about m.summit_id and row.summit_id

@santipalenque santipalenque left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@martinquiroga-exo martinquiroga-exo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@priscila-moneo please see comments

const summitId =
m?.summit_id || row?.summit_id || currentSummitId;
if (!row?.id || !summitId) return false;
if (!row?.id) return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!row?.id || !currentSummitId) return false;

If the page renders before currentSummit is loaded, this can open /app/summits/undefined/events/.../materials/...

@martinquiroga-exo martinquiroga-exo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@caseylocker caseylocker self-requested a review April 6, 2026 20:26

@caseylocker caseylocker left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smarcet smarcet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smarcet smarcet merged commit 033cf84 into master Apr 7, 2026
9 checks passed
@santipalenque santipalenque deleted the fix/media-uploads-grid-infinite-spinner branch May 6, 2026 19:05
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.

6 participants