patternfly / patternfly-quickstarts

Repository containing the PatternFly Quick Start extension code
MIT License
15 stars 38 forks source link

Nonbreaking space ({nbsp}) not rendered correctly in Quick Start titles in HCC UI #220

Closed bredamc closed 1 year ago

bredamc commented 1 year ago

For the Managed Application Services docs, I recently updated the org-name attribute to include a non-breaking space: :org-name: Red{nbsp}Hat

The output from the asciidoctor command generated a HTML file where the text was rendered as expected. However, the titles of the docs in the Hybrid Cloud Console UI did not render the nbsp correctly -- they showed the text Red Hat instead. The text seems to be rendered correctly in the body text in the HCC UI, it is just the titles that show the problem.

Any idea what we need to do to fix this formatting output, please?

jessiehuff commented 1 year ago

I think the formatting for this would be: :org-name: Red&nbspHat If this doesn't work, feel free to reach out to @dlabaj

bredamc commented 1 year ago

Thanks @jessiehuff I'll try that. Note however that the Red{nbsp}Hat notation is rendered correctly in the body text currently, it's only in the title text that the attribute is changed to Red Hat instead of inserting the nonbreaking space. Is it expected that we should be able to use the same attribute value in both the title and body text?

dlabaj commented 1 year ago

@bredamc Do you have the example of where it's not working.

bredamc commented 1 year ago

Hi @dlabaj , I reverted my change again because it was broken in the UI. I'm planning to try your suggestion in a test document, but a colleague is due to release from the same repo this week, so I'm waiting until after that release, to avoid merge conflicts or any other problems that might interfere with the release schedule.

bredamc commented 1 year ago

@dlabaj Here are the steps, if you want to reproduce in an AsciiDoc file:

  1. Define the org-name attribute as follows: :org-name: Red{nbsp}Hat

  2. Replace the text "Red Hat" with the {org-name} attribute in another attribute: :product-long-api-designer: {org-name} OpenShift API Designer

  3. Use the {product-long-api-designer} attribute in a title and in the body text of a quick start.

  4. View the quick start in the UI.

A colleague mentioned that he uses {nbsp} in adoc and   in XML. In my case, the {nbsp} notation worked in the AsciiDoc body text, but not in the title, so I think it might be the PatternFly side that needs tweaking, not the AsciiDoc? All of the text (including the title) rendered correctly in the generated HTML -- it was only in the UI version that the problem was seen.

dlabaj commented 1 year ago

@bredamc Are you doing this only in AsciiDoc or Markdown as well?

bredamc commented 1 year ago

AsciiDoc only

dlabaj commented 1 year ago

ah okay do you have a link to the document that's giving you a problem

bredamc commented 1 year ago

@dlabaj As mentioned above, I reverted my change again because the title was broken in the UI. It's difficult for me to test in a test doc because the problem was only visible after the doc was published. I provided the reproducer steps above -- not sure if you can reproduce the problem and test the fix in your team without publishing?

bredamc commented 1 year ago

@jschuler I can't see how to reopen this issue, but I just confirmed that it still exists. Can you please reopen it for me? Thanks :)

jschuler commented 1 year ago

Reopening since the issue still presents itself https://qaprodauth.console.redhat.com/application-services/learning-resources

image (2)

image (1)

bredamc commented 1 year ago

Thanks for reopening, J! As you can see in the screenshots, the problem is in the titles only -- the {nbsp} is rendered correctly in the body text.

bredamc commented 1 year ago

@jschuler Thank you for confirming that the problem is fixed in V2.3.3, and that the UI has not yet been updated to use that version. You can close this ticket again -- thanks again for all your help!