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

feat(ui): Adjust linkify directive #739

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Conversation

Angi-Kinas
Copy link
Collaborator

@Angi-Kinas Angi-Kinas commented Dec 21, 2023

Adjust linkify directive to be able to process HTML elements and Text.
Will be used additionally in the abstract and landing page.

Replaces this PR #588

/dataset/a8b5e6c0-c21d-4c32-b8f9-10830215890a (landing page link):
image

/dataset/n_tri_lill_inondable_s_059 (link in abstract with <strong>-tag):
image

/dataset/ee965118-2416-4d48-b07e-bbc696f002c2 (multiple links in abstract):
image

Copy link
Contributor

github-actions bot commented Dec 21, 2023

Affected libs: ui-elements, feature-catalog, feature-record, feature-router, feature-search, feature-map, feature-dataviz, ui-catalog, ui-search,
Affected apps: metadata-editor, datahub, demo, webcomponents, search, map-viewer,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@Angi-Kinas Angi-Kinas linked an issue Dec 21, 2023 that may be closed by this pull request
@Angi-Kinas Angi-Kinas added this to the 2.1.0 milestone Dec 21, 2023
@coveralls
Copy link

coveralls commented Dec 21, 2023

Coverage Status

coverage: 86.396% (-0.09%) from 86.481%
when pulling e4bb3c2 on DH-make-hyperlinks-clickable
into 3d789bc on main.

Copy link
Collaborator

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice improvement, thanks @Angi-Kinas ! The only thing I see, is that the link color in the abstract should likely also be primary, shouldn't it? Maybe we could also add a test for some HTML input with an existing anchor element.

@jahow
Copy link
Collaborator

jahow commented Dec 22, 2023

The only thing I see, is that the link color in the abstract should likely also be primary, shouldn't it?

Really what we're missing is a presentation component for links. We have been copy-pasting tailwind style for these many times now, and this should be factorized in a component.

@tkohr
Copy link
Collaborator

tkohr commented Dec 22, 2023

The only thing I see, is that the link color in the abstract should likely also be primary, shouldn't it?

Really what we're missing is a presentation component for links. We have been copy-pasting tailwind style for these many times now, and this should be factorized in a component.

Shouldn't this be the central place where the style should be defined? The only reason why it's displayed differently in the abstract, is because the style is overwritten here, I think.

Maybe I'm missing your point for the need of a component though. Do you propose to use the UI component within the directive?

@jahow
Copy link
Collaborator

jahow commented Dec 22, 2023

Shouldn't this be the central place where the style should be defined? The only reason why it's displayed differently in the abstract, is because the style is overwritten here, I think.

Hmm, I think it'd be good to have a common style for all links in the app, not just the ones created by the linkify directive. But it's also true that it might not necessary be a presentation component, it could simply be a tailwind class, otherwise it'll be hard to generate it on the fly in the linkify directive.

Angi-Kinas and others added 2 commits January 1, 2024 15:09
to be able to process HTML elements and Text.
Will be used additionally in the abstract and landing page.
@jahow jahow force-pushed the DH-make-hyperlinks-clickable branch from 8879f69 to e4bb3c2 Compare January 1, 2024 14:10
@jahow
Copy link
Collaborator

jahow commented Jan 1, 2024

I've reworked this PR and now the tests should be passing :) great work @Angi-Kinas, it was only a minor detail (see the template of component used in the unit test).

@Angi-Kinas Angi-Kinas merged commit 173df65 into main Jan 8, 2024
7 checks passed
@Angi-Kinas Angi-Kinas deleted the DH-make-hyperlinks-clickable branch January 8, 2024 09:50
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

Successfully merging this pull request may close these issues.

[Datahub] Make abstract links as hyperlinks
4 participants