integration icon indicating copy to clipboard operation
integration copied to clipboard

Github Blockquote Notes are not rendered correctly in HACS frontend.

Open BJReplay opened this issue 1 year ago • 10 comments
trafficstars

Web browser

Chromium (tried in both Edge and Chrome)

Web browser version

Version 129.0.2779.0 (Official build) dev (64-bit)

System Health details

System Information

version core-2024.8.2
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.36.3-microsoft-standard-WSL2
arch x86_64
timezone Australia/Sydney
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.0
Stage running
Available Repositories 1393
Downloaded Repositories 25
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 6
resources 16
views 5
mode storage
Recorder
oldest_recorder_run 12 August 2024 at 8:35 am
current_recorder_run 22 August 2024 at 1:39 pm
estimated_db_size 510.38 MiB
database_engine sqlite
database_version 3.45.3
Solcast PV Forecast
can_reach_server ok
used_requests 32
rooftop_site_count 1

Checklist

Describe the issue

HACS 2.0 displays readme.md blockquotes much better than 1.3.4, but leaves out the entire first paragraph / sentence for some reason for [!NOTE] blockquotes.

The current readme for this issue is at https://github.com/BJReplay/ha-solcast-solar/blob/main/README.md

An earlier version that won't change is at https://github.com/BJReplay/ha-solcast-solar/blob/66331bb39ba80f4003ab47cabc0d3f427adf59e6/README.md

Reproduction steps

  1. Add https://github.com/bjreplay/ha-solcast-solar as a custom integration to HACS
  2. Browse to HACS in HA, and click on the Solcast PV Solar integration in Downloaded repositories
  3. Observe that the [!NOTE] blockquotes are missing the first sentence / paragraph. ...

Screenshots

Image from HACS:

image

Image from Github (Note, - the issue isn't so much the missing Warning or Note text, but the entire missing sentences).

The sentence The use of beta versions can be a simple way to fix issues. Check the releases at is missing from the first note, and the sentence (paragraph) This integration can be used as a replacement for the oziee/ha-solcast-solar integration, which has been removed from GitHub and HACS. is missing from the second note.

image

Javascript logs from your browser console

Nothing recorded.

Diagnostics dump

Not applicable (please let me know if I'm incorrect in this assessment, and I'll provide).

BJReplay avatar Aug 22 '24 09:08 BJReplay

Make sure you have read the issue guidelines and that you filled out the entire template.

If you have an issue identical to this, do not add comments like "same here", "i have this too", instead add a :+1: reaction to the issue description. Thanks! :+1:

hacs-bot[bot] avatar Aug 22 '24 09:08 hacs-bot[bot]

Is this a HACS or Home Assistant problem? If you paste the same in a markdown card is it different?

ludeeus avatar Aug 22 '24 09:08 ludeeus

Is this a HACS or Home Assistant problem? If you paste the same in a markdown card is it different?

Stand by...

Testing...

BJReplay avatar Aug 22 '24 09:08 BJReplay

Is this a HACS or Home Assistant problem?

HACS, I think:

image

image

BJReplay avatar Aug 22 '24 10:08 BJReplay

Try the entire file.

ludeeus avatar Aug 22 '24 10:08 ludeeus

Yeah, I just did, thinking that the first test wasn't enough!

image

BJReplay avatar Aug 22 '24 10:08 BJReplay

Google Fit is another example that I found, @ludeeus. https://github.com/YorkshireIoT/ha-google-fit.

autoSteve avatar Aug 22 '24 10:08 autoSteve

Yeah, have verified there is some difference even on HA dev.

ludeeus avatar Aug 22 '24 10:08 ludeeus

I took a look at it, and the markdown card uses a slightly different approach to how content breaks. HACS uses the same as add-ons, which have the same problems.

So I think this is something that needs to be handled on the Home Assistant frontend as this will be a problem for add-ons as well.

ludeeus avatar Aug 22 '24 13:08 ludeeus

HACS uses the same as add-ons, which have the same problems.

As I'm using HA in a container, I don't have access to add-ons, so can't repro.

Will you raise this issue in the HA front end?

BJReplay avatar Aug 22 '24 23:08 BJReplay

Hi @ludeeus, Is not this logic the one that manages that?

elchininet avatar Sep 02 '24 00:09 elchininet

Testing the public content property of the ha-markdown-element that is rendered, the text is there, it seems that it gets choped off by the logic of that component.

image

Edit: Weird, I tested that logic in the marked playground and everything seems to be OK, the text is contained in the final array that is append to the ha-alert element. 🤔

image

elchininet avatar Sep 02 '24 00:09 elchininet

This is correct. It behaves differently depending on whether you pass it break or not (the markdown card does); HACS and add-ons do not. https://github.com/hacs/integration/issues/3995#issuecomment-2304271044 Witch has the side-effect of messing with other things like the badges are not all vertical.

ludeeus avatar Sep 02 '24 05:09 ludeeus