-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
wip: Add alternate text for lead images #8106
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8106 +/- ##
==========================================
- Coverage 81.86% 81.78% -0.09%
==========================================
Files 101 101
Lines 5900 5906 +6
==========================================
Hits 4830 4830
- Misses 1070 1076 +6
|
@@ -111,6 +111,9 @@ | |||
<p class="ple-help"> | |||
<span class="ple-help-minor">Select an optional main image for your post.</span> | |||
</p> | |||
<p> | |||
<input class="form-control input-lg" type="text" id="alt-text" placeholder="Add alternate text for image" value="<% if @node && @node.main_image.photo_text %><%= @node.main_image.photo_text %><% else %><%= params[:photo_text] %><% end %>"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tlazypanda found that the issue is because some notes do not have images hence the nil error..we can use a safe navigator to cater for the nodes without 'main_images' like so
input class="form-control input-lg" type="text" id="alt-text" placeholder="Add alternate text for image" value="<% if @node && @node&.main_image&.photo_text %><%= @node.main_image.photo_text %><% else %><%= params[:photo_text] %><% end %>"/>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Tlazypanda I will prioritize this coming week so we can collaborate and have it merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow this is v cool! can we see a screenshot at some point? Thanks!!
e94d8cc
to
ccfaeee
Compare
Hi 😄, this issue has been automatically marked as stale because it has not had recent activity. Don't worry you can continue to work on this and ask @publiclab/reviewers to add |
Code Climate has analyzed commit ccfaeee and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Hi 😄, this issue has been automatically marked as stale because it has not had recent activity. Don't worry you can continue to work on this and ask @publiclab/reviewers to add |
Fixes #7991
work in progress:add alternate text for image
rake test
@publiclab/reviewers
for help, in a comment belowThanks!