christianvoigt / argdown

a simple syntax for complex argumentation
https://argdown.org
923 stars 30 forks source link

Examples broken on syntax documentation page? #206

Closed DawnPaladin closed 3 years ago

DawnPaladin commented 3 years ago

Hello! Your syntax documentation page has a bunch of empty boxes, e.g. on the left side of the table that says "A paragraph with text is called a 'statement'..." When I use Inspect Element on these areas, it looks like there's supposed to be an Argdown map in there, but nothing's showing up. I'm guessing it's broken?

I'm using Firefox on MacOS, but I checked it in Safari and Chrome too.

christianvoigt commented 3 years ago

Thanks, I did not know that. I will try to find time to fix this in the next week.

christianvoigt commented 3 years ago

This is strange. The examples disappear if you directly jump to an anchor (e.g. "#statements"). If you open the index page (argdown.org) go to the syntax page and scroll to the examples, everything is fine.

christianvoigt commented 3 years ago

ok, I fixed it.

For whom it may concern, here is what was causing this: This was some weird browser behaviour. If the browser loads a url with an anchor, the "initial-view" property of the argdown-map web component is first undefined even if explicitely set to "source" and only later changes to "source" (I don't know why). The web component did not expect this property to change and so thought it had to create an empty map view (instead of the source view).

I changed the web component so that it will create and activate the appropriate views if the "initial-view" property changes.

I will also publish a new version of the web component (and all the packages that depend on it).