Skip to content

Conversation

@trichoplax
Copy link
Contributor

@trichoplax trichoplax commented Jan 4, 2026

The changes suggested in meta:287189:

  • Remove redundancy in wordings.
  • Make some wordings links to relevant pages.
  • Change the 3 usages of "Count" to "Total".

Also:

  • Change "User since" to "Joined" to avoid the time zone wrapping onto the next line.

Notice that the height of the panel is now significantly reduced.

Appearance before (left) and after (right)

Screenshot 2026-01-04 at 06-24-47 DEV User user - QPixel Screenshot 2026-01-04 at 06-25-08 DEV User user - QPixel

@trichoplax trichoplax marked this pull request as draft January 4, 2026 05:40
@codecov
Copy link

codecov bot commented Jan 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.56%. Comparing base (578ef87) to head (982b965).
⚠️ Report is 22 commits behind head on develop.

Additional details and impacted files
Components Coverage Δ
controllers 74.66% <ø> (ø)
helpers 84.91% <ø> (ø)
jobs 79.24% <ø> (ø)
models 90.01% <ø> (ø)
tasks 61.11% <ø> (ø)

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trichoplax trichoplax marked this pull request as ready for review January 4, 2026 06:22
Comment on lines 155 to 164
<% if current_user&.id == @user.id %>
<%= link_to search_path(search: "user:#{@user.id} post_type:2"), 'aria-label': 'View your answers' do %>
Answers
<% end %>
<% else %>
<%= link_to search_path(search: "user:#{@user.id} post_type:2"), 'aria-label': "View answers from #{rtl_safe_username(@user)}" do %>
Answers
<% end %>
<% end %>
</td>
Copy link
Member

Choose a reason for hiding this comment

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

Since all these widgets only differ in what aria-label (and sometimes what link param is used), let's make these less verbose. We also have a convenience same_as? method on User that is both nil-safe and easier to read than current_user&.id == @user.id (@user.same_as?(current_user)).

Copy link
Member

Choose a reason for hiding this comment

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

Something along the lines of (where is_me can be shared with all the other widgets):

<% is_me = @user.same_as?(current_user) %>

<%= link_to search_path(search: "user:#{@user.id} post_type:2"),
                    'aria-label': is_me ? 'View your answers' : "View answers from #{rtl_safe_username(@user)}" do %>
    Answers
<% end %>

(somehow GitHub's editor got even worse, so apologies for the single-line aria-label)

Copy link
Member

Choose a reason for hiding this comment

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

I'd agree with this - these feel like they're missing some ternaries or helper methods, rather than full if statements for a relatively simple wording change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback. I've applied this change so the new code and a few existing places in the same file now use is_me. Rather than split a ternary across multiple lines I've put the value for 'aria-label:' on the next line down from the property name (for the one line that exceeded 120 characters otherwise). Let me know if there's a preferred way to split long lines for ERB files rather than this.

@Oaphi Oaphi requested a review from a team January 4, 2026 14:04
@Oaphi

This comment was marked as resolved.

@trichoplax trichoplax requested a review from Oaphi January 5, 2026 07:19
Copy link
Member

@Oaphi Oaphi left a comment

Choose a reason for hiding this comment

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

tested the updated version out - LGTM

@ArtOfCode- ArtOfCode- merged commit a6eb2a5 into develop Jan 6, 2026
17 of 20 checks passed
@ArtOfCode- ArtOfCode- deleted the trichoplax/profile-right-panel-shorter-wordings branch January 6, 2026 15:41
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.

4 participants