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

ANW-1869 support emphasis styling in PUI breadcrumbs #3120

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

donaldjosephsmith
Copy link
Collaborator

Users expect mixed content in titles to be rendered properly in the breadcrumbs shown on the "found in" section for the digital materials in a collection. This was not previously accounted for. Two things needed to be done:

  1. handle unprocessed emph tags in collection titles
  2. move the resultingspan tags used for the formatting outside of the breadcrumb links so they render properly

before:
image

after:
image

Users expect mixed content in titles to be rendered properly in
the breadcrumbs shown on the "found in" section for the digital
materials in a collection. This was not previously accounted for.
Copy link
Collaborator

@brianzelip brianzelip left a comment

Choose a reason for hiding this comment

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

@donaldjosephsmith I noticed from loading up this code that the resulting breadcrumb isn't italicized like is shown in your 'after' picture here in the PR write up. Looking at the 'before' picture above I see that there are two classes added to the (.italic, .emph), but there is only one class in the markup from this PR code (.emph -- see my screenshot in the comment below) -- looks like .italic needs to be added.

Copy link
Collaborator

@brianzelip brianzelip left a comment

Choose a reason for hiding this comment

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

@donaldjosephsmith There are also related breadcrumbs on the digital object page as well under the "Linked Records" section. These should get updated with the mixed_content_parser too. (The url for the screenshot below looks like: http://localhost:3001/repositories/2/digital_objects/25)

ANW-1869-DO-page-breadcrumbs

@brianzelip
Copy link
Collaborator

@donaldjosephsmith I noticed from loading up this code that the resulting breadcrumb isn't italicized like is shown in your 'after' picture here in the PR write up. Looking at the 'before' picture above I see that there are two classes added to the (.italic, .emph), but there is only one class in the markup from this PR code (.emph -- see my screenshot in the comment below) -- looks like .italic needs to be added.

NEVERMIND! I see that adding <emph render="italic"> as the mixed content creates the desired output, so this is not a problem!

Copy link
Collaborator

@brianzelip brianzelip left a comment

Choose a reason for hiding this comment

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

Nice work!

@brianzelip brianzelip merged commit 4165fd0 into master Feb 14, 2024
11 checks passed
@brianzelip brianzelip deleted the pui_breadcrumbs_formatting_support branch February 14, 2024 17:05
@cdibella cdibella added this to the 3.5.0 milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants