Skip to content

Commit

Permalink
fix: trim long text in form controls and username block (#888)
Browse files Browse the repository at this point in the history
* fix: trim long text in form controls and username block
* fix: update snapshots
  • Loading branch information
ihor-romaniuk authored Nov 8, 2023
1 parent 860d2e6 commit 5cf7db1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions src/profile/ProfilePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class ProfilePage extends React.Component {

return (
<span data-hj-suppress>
<h1 className="h2 mb-0 font-weight-bold">{this.props.params.username}</h1>
<h1 className="h2 mb-0 font-weight-bold text-truncate">{this.props.params.username}</h1>
<DateJoined date={dateJoined} />
{this.isYOBDisabled() && <UsernameDescription />}
<hr className="d-none d-md-block" />
Expand Down Expand Up @@ -224,7 +224,7 @@ class ProfilePage extends React.Component {
/>
</div>
</div>
<div className="col pl-0">
<div className="col">
<div className="d-md-none">
{this.renderHeadingLockup()}
</div>
Expand Down
58 changes: 29 additions & 29 deletions src/profile/__snapshots__/ProfilePage.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ exports[`<ProfilePage /> Renders correctly in various states test country edit w
</div>
</div>
<div
className="col pl-0"
className="col"
>
<div
className="d-md-none"
Expand All @@ -113,7 +113,7 @@ exports[`<ProfilePage /> Renders correctly in various states test country edit w
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -191,7 +191,7 @@ exports[`<ProfilePage /> Renders correctly in various states test country edit w
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -1696,7 +1696,7 @@ exports[`<ProfilePage /> Renders correctly in various states test country edit w
</svg>
</span>
<select
className="d-inline-block w-auto form-control"
className="d-inline-block form-control"
id="visibilityCountry"
name="visibilityCountry"
onChange={[Function]}
Expand Down Expand Up @@ -2487,7 +2487,7 @@ exports[`<ProfilePage /> Renders correctly in various states test education edit
</div>
</div>
<div
className="col pl-0"
className="col"
>
<div
className="d-md-none"
Expand All @@ -2496,7 +2496,7 @@ exports[`<ProfilePage /> Renders correctly in various states test education edit
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -2574,7 +2574,7 @@ exports[`<ProfilePage /> Renders correctly in various states test education edit
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -3053,7 +3053,7 @@ exports[`<ProfilePage /> Renders correctly in various states test education edit
</svg>
</span>
<select
className="d-inline-block w-auto form-control"
className="d-inline-block form-control"
id="visibilityLevelOfEducation"
name="visibilityLevelOfEducation"
onChange={[Function]}
Expand Down Expand Up @@ -3664,7 +3664,7 @@ exports[`<ProfilePage /> Renders correctly in various states test preferreded la
</div>
</div>
<div
className="col pl-0"
className="col"
>
<div
className="d-md-none"
Expand All @@ -3673,7 +3673,7 @@ exports[`<ProfilePage /> Renders correctly in various states test preferreded la
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -3751,7 +3751,7 @@ exports[`<ProfilePage /> Renders correctly in various states test preferreded la
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -5015,7 +5015,7 @@ exports[`<ProfilePage /> Renders correctly in various states test preferreded la
</svg>
</span>
<select
className="d-inline-block w-auto form-control"
className="d-inline-block form-control"
id="visibilityLanguageProficiencies"
name="visibilityLanguageProficiencies"
onChange={[Function]}
Expand Down Expand Up @@ -5693,7 +5693,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
</div>
</div>
<div
className="col pl-0"
className="col"
>
<div
className="d-md-none"
Expand All @@ -5702,7 +5702,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -5808,7 +5808,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -6201,7 +6201,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
</div>
</div>
<div
className="col pl-0"
className="col"
>
<div
className="d-md-none"
Expand All @@ -6210,7 +6210,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -6288,7 +6288,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -7251,7 +7251,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</div>
</div>
<div
className="col pl-0"
className="col"
>
<div
className="d-md-none"
Expand All @@ -7260,7 +7260,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -7338,7 +7338,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -8026,7 +8026,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</svg>
</span>
<select
className="d-inline-block w-auto form-control"
className="d-inline-block form-control"
id="visibilityBio"
name="visibilityBio"
onChange={[Function]}
Expand Down Expand Up @@ -8368,7 +8368,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</div>
</div>
<div
className="col pl-0"
className="col"
>
<div
className="d-md-none"
Expand All @@ -8377,7 +8377,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -8455,7 +8455,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -9151,7 +9151,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</svg>
</span>
<select
className="d-inline-block w-auto form-control"
className="d-inline-block form-control"
id="visibilityBio"
name="visibilityBio"
onChange={[Function]}
Expand Down Expand Up @@ -9493,7 +9493,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
</div>
</div>
<div
className="col pl-0"
className="col"
>
<div
className="d-md-none"
Expand All @@ -9502,7 +9502,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down Expand Up @@ -9535,7 +9535,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
className="h2 mb-0 font-weight-bold text-truncate"
>
staff
</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/profile/forms/__snapshots__/SocialLinks.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ exports[`<SocialLinks /> calls social links with edit mode bio 1`] = `
</svg>
</span>
<select
className="d-inline-block w-auto form-control"
className="d-inline-block form-control"
id="visibilitySocialLinks"
name="visibilitySocialLinks"
onChange={[Function]}
Expand Down
2 changes: 1 addition & 1 deletion src/profile/forms/elements/Visibility.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const VisibilitySelect = ({ intl, className, ...props }) => {
<span className="d-inline-block ml-1 mr-2" style={{ width: '1.5rem' }}>
<FontAwesomeIcon icon={icon} />
</span>
<select className="d-inline-block w-auto form-control" {...props}>
<select className="d-inline-block form-control" {...props}>
<option key="private" value="private">
{intl.formatMessage(messages['profile.visibility.who.just.me'])}
</option>
Expand Down

0 comments on commit 5cf7db1

Please sign in to comment.