@@ -28,9 +28,22 @@ const author = {
2828 username : 'diego.mello'
2929} ;
3030
31+ const shortNameAuthor = {
32+ _id : 'userid1' ,
33+ username : 'jd' ,
34+ name : 'JD'
35+ } ;
36+
37+ const mediumNameAuthor = {
38+ _id : 'userid2' ,
39+ username : 'john.doe' ,
40+ name : 'John Doe'
41+ } ;
42+
3143const longNameAuthor = {
32- _id : 'userid' ,
33- username : 'Long name user looooong name user'
44+ _id : 'userid3' ,
45+ username : 'johndoeverylongusernamejohndoeverylongusernamejohndoeverylongusernamejohndoeverylongusernamejohndoeverylongusername' ,
46+ name : 'John Doe With An Extremely Long Display Name That Should Definitely Be Truncated In Any Reasonable User Interface Layout'
3447} ;
3548
3649const baseUrl = 'https://open.rocket.chat' ;
@@ -389,6 +402,91 @@ export const FullNameLargeFont = () => (
389402 />
390403) ;
391404
405+ export const Names = ( ) => (
406+ < >
407+ < Message msg = 'Small name (2 chars)' author = { shortNameAuthor } useRealName />
408+ < Message
409+ msg = 'Small name with icons'
410+ author = { shortNameAuthor }
411+ useRealName
412+ isEdited
413+ isTranslated
414+ pinned
415+ type = { E2E_MESSAGE_TYPE }
416+ hasError
417+ isReadReceiptEnabled
418+ read
419+ />
420+ < Message msg = 'Medium name (8 chars)' author = { mediumNameAuthor } useRealName />
421+ < Message
422+ msg = 'Medium name with icons'
423+ author = { mediumNameAuthor }
424+ useRealName
425+ isEdited
426+ isTranslated
427+ pinned
428+ type = { E2E_MESSAGE_TYPE }
429+ hasError
430+ isReadReceiptEnabled
431+ read
432+ />
433+ < Message msg = 'Long name (22 chars) - should truncate' author = { longNameAuthor } useRealName />
434+ < Message
435+ msg = 'Long name with icons - timestamp visible'
436+ author = { longNameAuthor }
437+ useRealName
438+ isEdited
439+ isTranslated
440+ pinned
441+ type = { E2E_MESSAGE_TYPE }
442+ hasError
443+ isReadReceiptEnabled
444+ read
445+ />
446+ </ >
447+ ) ;
448+
449+ export const Usernames = ( ) => (
450+ < >
451+ < Message msg = 'Small username (2 chars)' author = { shortNameAuthor } />
452+ < Message
453+ msg = 'Small username with icons'
454+ author = { shortNameAuthor }
455+ isEdited
456+ isTranslated
457+ pinned
458+ type = { E2E_MESSAGE_TYPE }
459+ hasError
460+ isReadReceiptEnabled
461+ read
462+ />
463+ < Message msg = 'Medium username (8 chars)' author = { mediumNameAuthor } />
464+ < Message
465+ msg = 'Medium username with icons'
466+ author = { mediumNameAuthor }
467+ isEdited
468+ isTranslated
469+ pinned
470+ type = { E2E_MESSAGE_TYPE }
471+ hasError
472+ isReadReceiptEnabled
473+ read
474+ />
475+ < Message msg = 'Long username (22 chars) - should truncate' author = { longNameAuthor } />
476+ < Message
477+ msg = 'Long username with icons - timestamp visible'
478+ author = { longNameAuthor }
479+ isEdited
480+ isTranslated
481+ pinned
482+ type = { E2E_MESSAGE_TYPE }
483+ hasError
484+ isReadReceiptEnabled
485+ read
486+ />
487+ </ >
488+ ) ;
489+
392490const msgMentions = '@rocket.cat @diego.mello @all @here #general @team' ;
393491const mentions = [
394492 { _id : 'random' , name : 'Rocket Cat' , username : 'rocket.cat' , type : 'user' } ,
0 commit comments