Closed Alexdatadestroyer closed 8 months ago
It is intentional for user mottos to not render in tooltips if they are only a single character.
It is intentional for user mottos to not render in tooltips if they are only a single character.
Sure, I noticed that before. However, this is still buggy as it is giving unexpected behavior on such situations like explained above...
Taking a look at this, I can see the situation is thus:
User Profile Page
As seen in the code below (from userInfo.php
), we never show a user motto unless it's more than 1 character:
if (isset($userMotto) && mb_strlen($userMotto) > 1) {
echo "<div class='mottocontainer'>";
echo "<span class='usermotto'>$userMotto</span>";
echo "</div>";
}
User Card
As seen in the code below (from user-card.blade.php
), we never show a user motto unless it's more than 2 characters:
@if($motto !== null && mb_strlen($motto) > 2)
<div class="mb-1 rounded bg-bg text-text italic p-1 text-2xs hyphens-auto">
<p style="word-break: break-word;">{{ $motto }}</p>
</div>
@endif
I am unsure what exactly we're referring to with "latin characters", but I'm going to guess it has something to do with encoding which is often a pain in the butt.
Anyhow, I have a few suggestions, any of which I'm happy to do:
I'm more inclined towards 2 personally, but am happy to take someone else's lead here.
I also agree that choice 2 (remove conditionals on rendering if meeting a certain length) seems particularly desirable.
If someone wants their motto to be "A", more power to them. Concealing it from view seems like a dishonest design since we allow them to input the value in the first place.
When these cards were converted to Blade components, I retained this behavior, but truthfully I didn't understand why it was there in the first place.
Taking opportunity of my previous issue (#1619) which already has a solution provided (#1620). It's time to provide another information regarding Text Handling Exception once again. However, this only affects User Motto and its exhibition feature now: User Card and User Page.
Since this may also affect how Latin Characters (and Emojis) are handled on RA Website, I will report this before the next version release on RA Web comes to reality to avoid rework.
Try it for yourself! It's fun!
Switch (String.length)
1. Screenshots: Case 1:
a.1) Creating a User Motto sentence with only 1 character
b.1) User Page with NO User Motto exhibition...
c.1) User Motto is also absent on User Card
2. Screenshots: Case 2:
a.2) Creating a User Motto sentence with 2 characters
b.2) User Motto exhibited correctly on User Page...
c.2) However, User Card is messed again! (Don't be fooled, this isn't the same picture used on Case 1 even with it taken on another angle!)
3. Screenshots: Case 3 (default) - Accepted IF Characters >= 3:
a.3) Creating a User Motto sentence with 3 characters
b.3) User Motto exhibited correctly once again...
c.3) User Card now shows correctly User Motto sentence. Viva!
4. Other cases tested: Latin Characters & Emojis
For sake of reading, I won't post more images showing how UP and UC behaviored when UM was changed: Just a quick result of those cases:
a.4) Latin Characters:
1 char: UP (Yes) | UC (No) 2 chars: UP (Yes) | UC (No) 3 chars: UP (Yes) | UC (Yes) 4 chars: UP (Yes) | UC (Yes)
b.4) Emojis:
1 char: UP (No) | UC (No) 2 chars: UP (Yes) | UC (No) 3 chars: UP (Yes) | UC (Yes) 5 chars: UP (Yes) | UC (Yes)
Emojis behaviored the same way as Normal Character, but for Latin Characters, results differ. Both behaviored the same way for 2 characters or more.
5. Further Investigation:
Extra screenshot: LC alone being shown on User Page as valid User Motto sentence:
This report was long to write: It was hard to match things and write everything down, but I think that the issue is mapped correctly!
Exception Level: High -- Easy to Reproduce, Hard to notice. However, it's already affected other users for such a long time...