data-dot-all / dataall

A modern data marketplace that makes collaboration among diverse users (like business, analysts and engineers) easier, increasing efficiency and agility in data projects on AWS.
https://data-dot-all.github.io/dataall/
Apache License 2.0
235 stars 82 forks source link

Enable hyperlinks in dataset description text #1590

Closed rbernotas closed 1 month ago

rbernotas commented 1 month ago

Is your idea related to a problem? Please describe.

Our users need to be able to provide hyperlinks in the dataset description text. This may be for prerequisite or associated documents with the data asset, forms to fill out, or other documentation.

Describe the solution you'd like

Dataset description text is parsed for hyperlinks. Links in text are automatically converted to hyperlinks when the description is viewed in the dataset overview tab.

rbernotas commented 1 month ago

We've had this solution internally for a bit, and would like to contribute (most of) it back.

The solution edits:

frontend/src/design/components/ObjectBrief.js frontend/src/design/components/SanitizedHTML.js frontend/src/modules/Shares/views/ShareView.js frontend/src/utils/helpers/index.js

and additionally adds a file:

frontend/src/utils/helpers/linkMarkup.js

...where the logic is applied to parse for hyperlinks. linkMarkup.js is where others may wish to apply additional regex and logic to sanitize the URLs (something we have customized for our purposes), but what we are contributing will be something that can be more broadly applicable to everyone.

rbernotas commented 1 month ago

PR: https://github.com/data-dot-all/dataall/pull/1591