Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: trim long text in form controls and username block #887

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/profile/ProfilePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class ProfilePage extends React.Component {

return (
<span data-hj-suppress>
<h1 className="h2 mb-0 font-weight-bold">{this.props.match.params.username}</h1>
<h1 className="h2 mb-0 font-weight-bold text-truncate">{this.props.match.params.username}</h1>
<DateJoined date={dateJoined} />
{this.isYOBDisabled() && <UsernameDescription />}
<hr className="d-none d-md-block" />
Expand Down Expand Up @@ -210,7 +210,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 @@ -1694,7 +1694,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 @@ -2485,7 +2485,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 @@ -2494,7 +2494,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 @@ -2572,7 +2572,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 @@ -3049,7 +3049,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 @@ -3660,7 +3660,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 @@ -3669,7 +3669,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 @@ -3747,7 +3747,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 @@ -5009,7 +5009,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 @@ -5687,7 +5687,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 @@ -5696,7 +5696,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"
>
verified
</h1>
Expand Down Expand Up @@ -5757,7 +5757,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"
>
verified
</h1>
Expand Down Expand Up @@ -5942,7 +5942,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 @@ -5951,7 +5951,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 @@ -6029,7 +6029,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 @@ -6992,7 +6992,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 @@ -7001,7 +7001,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 @@ -7079,7 +7079,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 @@ -7767,7 +7767,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 @@ -8109,7 +8109,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 @@ -8118,7 +8118,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 @@ -8196,7 +8196,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 @@ -8890,7 +8890,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 @@ -9232,7 +9232,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 @@ -9241,7 +9241,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 @@ -9274,7 +9274,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