Display 'no call number' when appropriate.#5270
Open
demiankatz wants to merge 1 commit into
Open
Conversation
EreMaijala
requested changes
May 13, 2026
Contributor
EreMaijala
left a comment
There was a problem hiding this comment.
We used to not lose the line break, so it wasn't that bad before, but I agree that this is better.
| @@ -1,4 +1,6 @@ | |||
| <?php if ($this->callnumberHandler): ?> | |||
| <?php if (strlen($this->displayCallnumber ?? '') === 0): ?> | |||
Contributor
There was a problem hiding this comment.
Suggested change
| <?php if (strlen($this->displayCallnumber ?? '') === 0): ?> | |
| <?php if ('' === (string)($this->displayCallnumber ?? '')): ?> |
Contributor
There was a problem hiding this comment.
Maybe even trim instead of cast?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's a little bit jarring that when a call number value is blank, we display a call number label with no value. This adds a "no call number" value that is used when call number is absent. It's a translation string, so it can be easily customized for a different experience.
Perhaps hiding the label would be a better solution, but that would add more complexity.
I'm open to opinions on this!