diff --git a/core/modules/user/tests/src/Functional/UserUsernameTest.php b/core/modules/user/tests/src/Functional/UserUsernameTest.php
new file mode 100644
index 0000000..24f2859
--- /dev/null
+++ b/core/modules/user/tests/src/Functional/UserUsernameTest.php
@@ -0,0 +1,153 @@
+<?php
+
+namespace Drupal\Tests\user\Functional;
+
+use Drupal\Component\Utility\Html;
+use Drupal\Component\Utility\Unicode;
+use Drupal\comment\Tests\CommentTestTrait;
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Tests username functionality.
+ *
+ * @group user
+ */
+class UserUsernameTest extends BrowserTestBase {
+
+  use CommentTestTrait;
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = [
+    'node',
+    'block',
+    'comment',
+    'user_test_views',
+  ];
+
+  /**
+   * The user with the shorter username.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $userShortName;
+
+  /**
+   * The user with the longer username.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $userLongName;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+
+    $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
+    $this->addDefaultCommentField('node', 'article');
+
+    // Create user with short username.
+    $this->userShortName = $this->drupalCreateUser(
+      [
+        'access content',
+        'access comments',
+        'post comments',
+        'skip comment approval',
+        'create article content',
+      ],
+      $this->randomString(30)
+    );
+
+    // Create user with long username.
+    $this->userLongName = $this->drupalCreateUser(
+      [
+        'access content',
+        'access comments',
+        'post comments',
+        'skip comment approval',
+        'create article content',
+      ],
+      $this->randomString(31)
+    );
+  }
+
+  /**
+   * Tests author name display on nodes.
+   */
+  public function testTruncatedNodeAuthorName() {
+    // Test untruncated username.
+    $this->drupalLogin($this->userShortName);
+
+    $node = $this->drupalCreateNode(['type' => 'article']);
+    $this->drupalGet('node/' . $node->id());
+    $this->assertSession()->pageTextContains($this->userShortName->getUsername());
+
+    // Test truncated username.
+    $this->drupalLogin($this->userLongName);
+
+    $node = $this->drupalCreateNode(['type' => 'article']);
+    $this->drupalGet('node/' . $node->id());
+
+    // Tests if the username is trimmed to USERNAME_TRIM_LENGTH value.
+    // @see template_preprocess_username()
+    $this->assertSession()->responseNotContains($this->userLongName->getUsername());
+    $this->assertSession()->pageTextContains(Unicode::truncate($this->userLongName->getUsername(), USERNAME_TRIM_LENGTH - 1, FALSE, TRUE));
+  }
+
+  /**
+   * Tests author name display on comments.
+   */
+  public function testTruncatedCommentAuthorName() {
+    $node = $this->drupalCreateNode(['type' => 'article']);
+
+    $this->drupalLogin($this->userShortName);
+    $comment = [
+      'subject[0][value]' => $this->randomMachineName(),
+      'comment_body[0][value]' => $this->randomMachineName(20),
+    ];
+    $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $comment, t('Save'));
+    $this->assertSession()->pageTextContains($this->userShortName->getUsername());
+    $this->drupalLogin($this->userLongName);
+    $comment = [
+      'subject[0][value]' => $this->randomMachineName(),
+      'comment_body[0][value]' => $this->randomMachineName(20),
+    ];
+
+    // Tests if the username is trimmed to USERNAME_TRIM_LENGTH value.
+    // @see template_preprocess_username()
+    $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $comment, t('Save'));
+    $this->assertSession()->responseNotContains($this->userLongName->getUsername());
+    $this->assertSession()->pageTextContains(Unicode::truncate($this->userLongName->getUsername(), USERNAME_TRIM_LENGTH - 1, FALSE, TRUE));
+  }
+
+
+  /**
+   * Tests username display in Who's New block.
+   */
+  public function testTruncatedWhosNewName() {
+    // Enable Who's New block.
+    $this->drupalPlaceBlock('views_block:who_s_new-block_1', ['label' => 'user_view_block-block_1:1', 'views_label' => 'Who\'s new']);
+
+    // The Who's new block requires a last access to be set.
+    // Log the users in for them to show up.
+    $this->drupalLogin($this->userShortName);
+    $this->drupalLogin($this->userLongName);
+
+    // Log user out to prevent a false negative.
+    $this->drupalLogout();
+
+    $this->drupalGet('<front>');
+
+    // Tests if the username is trimmed to USERNAME_TRIM_LENGTH value.
+    // @see template_preprocess_username()
+    $this->assertSession()->pageTextContains($this->userShortName->getUsername());
+    $this->assertSession()->responseNotContains($this->userLongName->getUsername());
+    $this->assertSession()->pageTextContains(Unicode::truncate($this->userLongName->getUsername(), USERNAME_TRIM_LENGTH - 1, FALSE, TRUE));
+  }
+
+}
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index b865e95..8ccea6d 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -61,6 +61,11 @@
 const USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL = 'visitors_admin_approval';
 
 /**
+ * Trimming length for long usernames.
+ */
+const USERNAME_TRIM_LENGTH = 30;
+
+/**
  * Implements hook_help().
  */
 function user_help($route_name, RouteMatchInterface $route_match) {
@@ -113,7 +118,7 @@ function user_theme() {
       'render element' => 'elements',
     ],
     'username' => [
-      'variables' => ['account' => NULL, 'attributes' => [], 'link_options' => []],
+      'variables' => ['account' => NULL, 'attributes' => [], 'link_options' => [], 'trim_length' => NULL],
     ],
   ];
 }
@@ -479,6 +484,10 @@ function template_preprocess_username(&$variables) {
     }
   }
 
+  if (!isset($variables['trim_length'])) {
+    $variables['trim_length'] = USERNAME_TRIM_LENGTH;
+  }
+
   // Set the name to a formatted name that is safe for printing and
   // that won't break tables by being too long. Keep an unshortened,
   // unsanitized version, in case other preprocess functions want to implement
@@ -486,8 +495,8 @@ function template_preprocess_username(&$variables) {
   // that $variables['name'] is safe for printing.
   $name  = $account->getDisplayName();
   $variables['name_raw'] = $account->getUsername();
-  if (Unicode::strlen($name) > 20) {
-    $name = Unicode::truncate($name, 15, FALSE, TRUE);
+  if (Unicode::strlen($name) > $variables['trim_length']) {
+    $name = Unicode::truncate($name, $variables['trim_length'] - 1, FALSE, TRUE);
     $variables['truncated'] = TRUE;
   }
   else {
diff --git a/core/themes/seven/css/components/form.css b/core/themes/seven/css/components/form.css
index f3acc2c..e3ec051 100644
--- a/core/themes/seven/css/components/form.css
+++ b/core/themes/seven/css/components/form.css
@@ -308,6 +308,14 @@ select {
   .form-wrapper input[type="submit"]:first-child {
     margin-top: 0;
   }
+  form[action="/admin/people"] table {
+    table-layout: fixed;
+  }
+  form[action="/admin/people"] table td.views-field-name {
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
   details summary {
     overflow: hidden;
     text-overflow: ellipsis;
