Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#1710 closed bug (fixed)

Fix long usernames in several apps - broken page layout

Reported by: crumbking Owned by: crumbking
Priority: minor Milestone: 1.3
Component: BW Layout Keywords: welen
Cc: planetcruiser

Description

  • forum posts
  • internal startpage
  • more?

Attachments (2)

unique.png (16.6 KB) - added by planetcruiser 6 years ago.
author in bar .png (6.0 KB) - added by crumbking 6 years ago.

Download all attachments as: .zip

Change History (29)

comment:1 Changed 6 years ago by crumbking

Fixed locally the the forum posts with a css3 hack.

word-wrap: break-word;

Internal startpage I won't touch as it needs more of a rewrite.

comment:2 Changed 6 years ago by TimLoal

  • Component changed from unknown to BW General

comment:3 Changed 6 years ago by TimLoal

  • Component changed from BW General to BW Layout
  • Priority changed from minor to critical

comment:4 Changed 6 years ago by jsfan

  • Milestone Future deleted

Milestone Future deleted

comment:5 Changed 6 years ago by planetcruiser

  • Milestone set to unassigned
  • Priority changed from critical to minor

it's just a cosmetic change, not breaking functionality

comment:6 Changed 6 years ago by shevek

@planetcruiser: If the username gets any longer you can't see anymore when something was posted.

@crumbking: That would be a simple fix for 1.4 :-)

comment:7 Changed 6 years ago by shevek

  • Cc planetcruiser added
  • Milestone changed from unassigned to 1.3
  • Status changed from new to assigned

Looks better with the patch applied. But gets only visible after deleting the cache.

So there's a cache breaker missing.

comment:9 Changed 6 years ago by jsfan

Deployed on alpha.

comment:10 Changed 6 years ago by crumbking

  • Resolution set to fixed
  • Status changed from assigned to closed

Seems to work as expected. http://alpha.bewelcome.org/forums/s4166-is_bewelcome_so_active_as_cs_

General note: It's CSS3 so won't work on old browsers. But you now we work for the future ;-)

comment:11 Changed 6 years ago by shevek

General note: According to Webdesignerwall it is supported since IE 5.5 and FF 3.5. So shouldn't really be a problem ;-)

comment:12 Changed 6 years ago by planetcruiser

  • Resolution fixed deleted
  • Status changed from closed to reopened

hm, usernames cut off like that look like an error. also there is no way to see what the username actually is. i think we should do this the same way we truncate strings in other places:

$username = "SuperVeryLongNameOfGreatUser";
<span title="<?php echo $username; ?>">
<?php echo MOD_layoutbits::truncate($username, 13); ?>
</span>

(without the line breaks, 13 is just an example - test what work best)

comment:13 Changed 6 years ago by planetcruiser

i was talking about the "new users" column on http://alpha.bewelcome.org/main - i don't know where else this truncates usernames.

but wrapping usernames like on http://alpha.bewelcome.org/forums/s4166-is_bewelcome_so_active_as_cs_ is also not very pretty. i suggest to use truncate() there as well

comment:14 Changed 6 years ago by shevek

For me it is pretty clear what the username is in the forum case. More than waiting for a tooltip to appear telling me.

The new username column on the personal start page isn't truncated that's an CSS clip off.

comment:15 follow-up: Changed 6 years ago by crumbking

Replying to planetcruiser:

i was talking about the "new users" column on http://alpha.bewelcome.org/main - i don't know where else this truncates usernames.

Well as written in the second comment I won't touch the start page. It's now really pretty but works. It's simply to much information on one page. Also in groups overview you run into the problem of long usernames and they are hidden like on the startpage.

but wrapping usernames like on http://alpha.bewelcome.org/forums/s4166-is_bewelcome_so_active_as_cs_ is also not very pretty. I suggest to use truncate() there as well

Agree it's not pretty but I'm not really sure we should truncate usernames. I wanna see the username in the forum without leaving the page.

So hiding like in "main" and "group overview" isn't the way to go but it works.

comment:16 in reply to: ↑ 15 ; follow-up: Changed 6 years ago by planetcruiser

Replying to crumbking:

Well as written in the second comment I won't touch the start page.

oops, my bad. i thought something had changed on main. so the cut off usernames were always there.. we should use truncate() there. the initial ticket text mentions the main page, so let's fix it there.

It's now really pretty but works. It's simply to much information on one page. Also in groups overview you run into the problem of long usernames and they are hidden like on the startpage.

let's fix the group overview, too. i thought that's what this ticket is about?

Agree it's not pretty but I'm not really sure we should truncate usernames.

in the case of the main page they are truncated already, we should do this properly at least, with "..." and title attribute.

I wanna see the username in the forum without leaving the page.

me, too. but let's not fix one bug with another. wrapping text without proper hyphenation is a bug to me. anyway usernames should never be wrapped. i mean in the forum case the user name now looks like "FedericaLuci? aVinella" on my screen. not acceptable.

So hiding like in "main" and "group overview" isn't the way to go but it works.

works how? as in not overlapping text? sure, but again that's fixing one bug with another. let's find a proper solution to this and not hacks.

the actual problem is that the layout does not give enough room for usernames. this is what needs to be changed. but this is a more complex fix.

comment:17 in reply to: ↑ 16 Changed 6 years ago by shevek

  • Keywords welen added

Replying to planetcruiser:

always there.. we should use truncate() there. the initial ticket text mentions the main >page, so let's fix it there.

I'd say we leave that for welen. There is absolutely no need to fix this at the moment.

let's fix the group overview, too. i thought that's what this ticket is about?

Different issues don't need to be fixed with the same ticket. The cutoff usernames within floatboxes is a different issue to the overflowing usernames in the forum.

Agree it's not pretty but I'm not really sure we should truncate usernames.

in the case of the main page they are truncated already, we should do this properly at least, with "..." and title attribute.

Actually usernames shouldn't be truncated if we want to improve on this we need to think about proper positions to break the names (like _ or capitals) but again I'd say lets leave that for welen. The problem there is still that we don't know where we need to break. To do it nice we probably need JavaScript?.

the actual problem is that the layout does not give enough room for usernames. this is what needs to be changed. but this is a more complex fix.

The layout is fine as it is. No one would expect that the design takes usernames with 32 characters into account...

So for now the current fix is enough. Everything else can wait for welen (adding keyword).

Okay for closing?

comment:18 Changed 6 years ago by planetcruiser

i will review tomorrow and close if appropriate. bedtime now. ;)

comment:19 Changed 6 years ago by planetcruiser

  • Resolution set to fixed
  • Status changed from reopened to closed

cutting off usernames (and countries) like this on start page and group member list is not pretty, but well, bad design of rox for not leaving enough space for moderately long user and country names ("United Kingdom" is truncated in the "New members" list). so, closing without actually fixing all issues in the ticket description..

comment:20 Changed 6 years ago by globetrotter_tt

I wonder if should have a limit for username length? Or maybe a hint at the signup, like considering a shorter username as they also need to type it in everytime they log in.

Anyway as a rule of thumb we should give always enough horizontal space to elements that may vary in length.

Shevek, can you already say which country name is the longest in all the geonames translations?

comment:21 Changed 6 years ago by shevek

@globetrotter: The English version has 'Hashemite Kingdom of Jordan' as the longest one. 'Former Yugoslav Republic of Macedonia' would beat it, though (but isn't shown as the preferred name in English is 'Macedonia').

The Antartica territories would still beat all of that 'South Georgia and the South Sandwich Islands'. But for the places update I decided to go with a table and there are enough breakpoints in the names.

The limit for the usernames is 32. (This limit isn't checked on signup of course but the username is simply cut down by MYSQL...)

Changed 6 years ago by planetcruiser

comment:22 Changed 6 years ago by planetcruiser

not so pretty:

http://trac.bewelcome.org/raw-attachment/ticket/1710/unique.png

(from http://alpha.bewelcome.org/forums/s3679-New_reference_system thread)

..but i can't think of a better solution right now. at least it does not overlap with the post date any more.

Changed 6 years ago by crumbking

comment:23 Changed 6 years ago by crumbking

comment:24 Changed 6 years ago by shevek

Looks good. Could you post a patch?

comment:25 Changed 6 years ago by crumbking

Bahh I have to look in forum code for that ;-)

Let's see if I find the time..

comment:26 Changed 6 years ago by shevek

Okay, then I do it. I was just hoping you did that already ;-)

comment:27 Changed 6 years ago by shevek

Talked to Christian. We leave it as it is now. Forum will get an overhaul soon anyway.

Note: See TracTickets for help on using tickets.