#5855 closed defect (bug) (fixed)
RTL support for @atme mention auto-suggestions
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Toolbar & Notifications | Keywords: | |
Cc: |
Description
Just been testing this using the RTL plugin, see video here: https://cloudup.com/czr5BXG8sU3
Related: #3278 I was going to reopen that ticket but I think this may involve more than a quick fix
In the video the two usernames referenced are:
- Username: hardy.oconner Name: Hardy O'Conner
- Username: loren.pacocha Name: Loren Pacocha
- In LTR mode typing
@hard
@atme pops up@hardy-oconner Hardy O'Conner
- In RTL mode typing
@hard
does not popup any username - In LTR mode typing
@ha
@atme pops up@hardy-oconner Hardy O'Conner
- In RTL mode typing
@hard
@atme pops up@loren.pacocha Loren Pacocha
To be honest I do not know if this is idiosyncratic behaviour in the way the RTL Tester plugin works or not.
I expected that by typing either @ha
or @hard
in LTR or RTL for the @atme to pop up Hardy O'conner's name.
Any native RTL users able to test this @mention functionality?
Note: Usernames with a period are converted to a hypen e.g. hardy.oconner
to hardy-oconner
and work as expected
Change History (8)
This ticket was mentioned in IRC in #buddypress-dev by netweb. View the logs.
10 years ago
#3
in reply to:
↑ 2
@
10 years ago
Replying to DJPaul:
When I tested this previously, I noticed bad CSS issues, but I think I know why it might not be finding the same user results. In https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/bp-core-classes.php#L2672 I made the assumption that a username in RTL would effectively be "reversed" in the database compared to what we expect in a LTR language (e..g. stored as "lauP" instead of "Paul"), so the
search_wildcard
position is flipped around.
I was making all kinds of 'guesses' as to how all the logic in this works also, I'm quite sure mine is entirely flawed :P
Here goes, it is RTL, which relates to reading and writing, or display in our case, but the order is still the same for this use case, If I want to mention Paul
, I type P
, a
, u
, l
, and I do exactly the same for lauP
, P
is the first letter reading from right to left, a
is the second, u
the third and lastly l
.
I guess I should have done research to check if that quick assumption was accurate or not; let's find a RTL user and ask them. :) It is easy to change if the assumption was faulty, though the CSS fixes will require much more effort.
Indeed, this is really the only way to know for certain ;)
#5
@
10 years ago
I have tested word/letter order in the database in RTL (in a variety of languages). Letter order (at least, latin letters) is not changed.
A sentence in a RTL language will have the word order reversed, obviously -- because it's RTL not LTR. :)
#6
@
10 years ago
- Owner set to djpaul
- Resolution set to fixed
- Status changed from new to closed
In 9009:
Thank you for testing this. I knew there were RTL issues in the @mentions changes prior to beta 1 but I also wanted to use it to see how many testers we have that use RTL; unfortunately, very few, it seems.
It looks like @yoavf has worked on the RTL Tester plugin, I'm happy to assume that it works correctly.
When I tested this previously, I noticed bad CSS issues, but I think I know why it might not be finding the same user results. In https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/bp-core-classes.php#L2672 I made the assumption that a username in RTL would effectively be "reversed" in the database compared to what we expect in a LTR language (e..g. stored as "lauP" instead of "Paul"), so the
search_wildcard
position is flipped around.I guess I should have done research to check if that quick assumption was accurate or not; let's find a RTL user and ask them. :) It is easy to change if the assumption was faulty, though the CSS fixes will require much more effort.