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

Places first name and last name on the same line to prevent trimming of the space between them #1328

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

timurtripp
Copy link
Member

[bug] An issue existed where a space was trimmed between the first name and last name on person pages due to the names being separated by a newline. This update resolves the issue. Resolves #1304

@timurtripp timurtripp added the bug Something isn't working label Sep 24, 2024
@timurtripp timurtripp requested a review from jcsparks September 24, 2024 17:00
@timurtripp
Copy link
Member Author

The two template deletions are simply due to them becoming dead code since I'm referencing the value directly.

@timurtripp
Copy link
Member Author

Needs to be tested in the developer sandbox.

@@ -18,7 +18,7 @@
<article{{ attributes.addClass(classes) }} itemscope itemtype="https://schema.org/Person">
<div class="container ucb-person-header">
<h1 class="ucb-person-name">
{{ content.field_ucb_person_first_name }} {{ content.field_ucb_person_last_name }}
<span itemprop="givenName">{{ content.field_ucb_person_first_name.0 }}</span> <span itemprop="familyName">{{ content.field_ucb_person_last_name.0 }}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We lost the|trim on the first and last name content, that's probably still useful to correct simple user-entered data errors.

We don't have good visibility or control over the Fastly optimization and given that this is already behaving differently with different browsers I want to have a real solution that we can rely on that's under out control. Please change the whitespace character to an HTML non-breaking space.

@timurtripp timurtripp requested a review from jcsparks September 25, 2024 16:37
@jcsparks jcsparks merged commit 6dd038b into main Sep 25, 2024
2 checks passed
@jcsparks jcsparks deleted the issue/1304 branch September 25, 2024 16:47
github-actions bot pushed a commit that referenced this pull request Sep 25, 2024
Places first name and last name on the same line to prevent trimming of the space between them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No space between first and last name
2 participants