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

Markdown renderer doesn't show content #33

Open
m-mohr opened this issue Apr 2, 2024 · 7 comments
Open

Markdown renderer doesn't show content #33

m-mohr opened this issue Apr 2, 2024 · 7 comments

Comments

@m-mohr
Copy link

m-mohr commented Apr 2, 2024

I've uploaded the following Markdown:

# Field boundaries for North Rhine-Westphalia (NRW), Germany

Provides ca. 300.000 official field boundaries from the federal state of North Rhine-Westphalia (NRW) in Germany.
It has been converted to a fiboa GeoParquet file from a shapefile that was provided by the state.

- **Source Data Provider:** [Land Nordrhein-Westfalen / Open.NRW](https://www.opengeodata.nrw.de/produkte/umwelt_klima/bodennutzung/landwirtschaft/)
- **Converted by:** [Matthias Mohr](https://mohr.ws)
- **License:** [Data licence Germany – attribution – Version 2.0](https://www.govdata.de/dl-de/by-2-0)
- **Projection:** EPSG:25832 (UTM 32N)

**[DOWNLOAD THE DATA AS FIBOA GEOPARQUET](DGL_EPSG25832_Parquet.parquet)**

## Columns

| Property               | Data Type | Description                                                  |
| ---------------------- | --------- | ------------------------------------------------------------ |
| id                     | string    | Numerical internal identifier                                |
| inspire:id             | string    | INSPIRE-compliant identifier. Example: `https://geodaten.nrw.de/id/inspire-lc-dgl/landcoverunit/6467974` |
| flik                   | string    | Area identifier for field blocks. Example: `DENWLI0552020444` |
| determination_datetime | datetime  | Valid since the given date.                                  |

## Lineage 

- Data downloaded on 2024-02-01 from <https://www.opengeodata.nrw.de/produkte/umwelt_klima/bodennutzung/landwirtschaft/DGL_EPSG25832_Shape.zip>.
- Converted to GeoParquet using [fiboa-cli](https://github.com/fiboa/cli), development version from 2024-04-02.

It doesn't render, Console shows:

Uncaught (in promise) 24:45: Unexpected character / (U+002F) before local name, expected a character that can start a name, such as a letter, $, or _ (note: to create a link in MDX, use [text](url))

@m-mohr
Copy link
Author

m-mohr commented Apr 2, 2024

It seems the issues is the link:
<https://www.opengeodata.nrw.de/produkte/umwelt_klima/bodennutzung/landwirtschaft/DGL_EPSG25832_Shape.zip>
I think <> for links are valid?

@m-mohr
Copy link
Author

m-mohr commented Apr 2, 2024

Another issue occurs for the relative link to the parquet file.
This creates a link as follows:
https://beta.source.coop/repositories/[account_id]/[repository_id]/DGL_EPSG25832_Parquet.parquet
Clicking it leads to a weird page with undefined values and a constantly loading top. The Download button doesn't work.
grafik

@raymondben
Copy link

raymondben commented Apr 3, 2024

Have run into the same issue. Also seems that html comments <!-- like this --> cause it. And if you hand-edit the md and accidentally put a malformed link in (oopsie!), you can get a complete crash of the page where nothing renders and it just gives

Application error: a client-side exception has occurred (see the browser console for more information).

as an error message on an otherwise empty, black page, with the browser developer console showing:

Error: Minified React error #62; visit https://reactjs.org/docs/error-decoder.html?invariant=62 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    NextJS 29

A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred

@cboettig
Copy link

cboettig commented Apr 3, 2024

Thanks for filing this, I also noticed that using angle brackets in README urls etc prevents them from rendering and meant to file an issue. It's quite annoying since it's not easy to debug, even more so since there's no web-edit mechanism for readme (as you mention in #30 )

@kbgg
Copy link
Member

kbgg commented Apr 8, 2024

The markdown viewer is incredibly basic and relies heavily on the mdx and remark libraries -- it was intended to be a starting point to allow basic rendering of markdown files with the expectation that it will be improved with additional debugging and features later on. The source code for the markdown viewer is available in the Source Viewers Repository and we welcome any contributions there!

@m-mohr
Copy link
Author

m-mohr commented Apr 8, 2024

I made pretty good experience with the commonmark js parser. But it might be a little limiting as it doesn't support tables for example.

Anyway, could you fall back to just rendering the plain markdown in case of an error? An endless loading screen seems worse than just plain markdown, which is usually pretty human readable.

@kbgg
Copy link
Member

kbgg commented Apr 8, 2024

Better error handling would be a great contribution. I'd welcome any pull requests which added this, otherwise this will have to wait a bit before I can implement it as the backlog is growing quicker than I can tackle issues.

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

No branches or pull requests

4 participants