Skip to content

Fixes strings for avatar size limits

Amy Qualls requested to merge aqualls-update-avatar-size into master

What does this MR do and why?

In !148130 (merged), I noticed our statement about the maximum allowed avatar size was 200KB, but in the backend code it was 200KiB - small but meaningful:

nitpick (non-blocking): Line 4636 (spec/requests/api/users_spec.rb) tests for 200 KiB, but the UI specifies 200 KB. Close but not the same. Which one is it, and what needs updating? (Probably the UI, tbh.) (link to thread)

@lifez pointed me to line 18 of /app/models/concerns/avatarable.rb:

MAXIMUM_FILE_SIZE = 200.kilobytes.to_i

This merge request does two things to the related strings:

  1. Changes KB to KiB for accuracy
  2. Adds a space between the number (200) and the measurement (KiB) according to our units of measurement info in our style guide.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Amy Qualls

Merge request reports