Skip to content
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

Show owner list with full names, add an asterisk for mfa disable when you are owner #4905

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

martinemde
Copy link
Member

Not quite complete, but looking for feedback. This was much easier than fixing the broken javascript (not that I didn't try) and solves a policy problem in a cleaner way.

Screenshot 2024-07-18 at 9 36 49 PM

@martinemde martinemde marked this pull request as draft July 19, 2024 04:37
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.03%. Comparing base (a59fb3d) to head (d85468f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4905   +/-   ##
=======================================
  Coverage   97.03%   97.03%           
=======================================
  Files         421      421           
  Lines        8776     8783    +7     
=======================================
+ Hits         8516     8523    +7     
  Misses        260      260           

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

link_text << " #{owner.display_handle}"
link_text << " *" if show_mfa_status && owner.mfa_disabled?
link_to(
link_text.html_safe,
Copy link
Member

Choose a reason for hiding this comment

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

let's put the link text in a localized html string?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's no actual text so this would just be:

owner_link_html: "%{avatar} %{handle}%{mfa_unable}"

This is just string interpolation so we should avoid putting a lot of distance between caller and the format, imho.

Copy link
Member

Choose a reason for hiding this comment

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

wouldn't the order still be different in an RTL language?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to avoid overthinking it for now. I'm not sure that star placement is going to ruin a RTL language. We don't have any yet anyway, so that will be its own large undertaking, of which this will be a minor detail.

app/views/rubygems/_gem_members.html.erb Show resolved Hide resolved
app/views/rubygems/_gem_members.html.erb Outdated Show resolved Hide resolved
@martinemde martinemde force-pushed the martinemde/owner-list-with-name-and-mfa-status branch from 1407f6d to 1d13ba7 Compare August 31, 2024 21:18
@martinemde martinemde marked this pull request as ready for review August 31, 2024 21:31
@martinemde martinemde force-pushed the martinemde/owner-list-with-name-and-mfa-status branch from 192ce06 to f890730 Compare September 28, 2024 22:24
@martinemde martinemde force-pushed the martinemde/owner-list-with-name-and-mfa-status branch from f890730 to d85468f Compare September 28, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants