Skip to content

Slight change to fix narrative images. #401

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

plural
Copy link
Contributor

@plural plural commented Jun 26, 2025

The :narrative.present? call wasn't quite doing what you would expect in that method and cards without narrative text were still showing narrative image links. Sorry i missed this in the review.

I updated this to use keyword arguments and moved the logic to the caller.

The helper method could be moved to an actual helper in app/helpers/ in a follow-up PR.

@plural plural requested a review from migueldlr June 26, 2025 13:06
Copy link

codecov bot commented Jun 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.43%. Comparing base (c90825d) to head (8d4fa6c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #401      +/-   ##
==========================================
- Coverage   98.44%   98.43%   -0.01%     
==========================================
  Files          76       76              
  Lines        1347     1345       -2     
  Branches      181      181              
==========================================
- Hits         1326     1324       -2     
  Misses         21       21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@migueldlr migueldlr left a comment

Choose a reason for hiding this comment

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

Looks good - for my general Rails understanding, what's the difference between @object.narrative_text and :narrative_text? Not sure how the scoping works here

@plural
Copy link
Contributor Author

plural commented Jun 26, 2025

Looks good - for my general Rails understanding, what's the difference between @object.narrative_text and :narrative_text? Not sure how the scoping works here

@object.attr_name is a Graphiti thing, not a rails thing. Even in a rails model, though, :narrative_text is just a symbol, but narrative_text is the attribute narrative_text.

I debugged this by inspecting the value inside the images function.

@plural plural merged commit 494637b into NetrunnerDB:main Jun 26, 2025
5 checks passed
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.

2 participants