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(viewer): recognise URLs in text value and convert into link (DSP-1595) #315

Merged
merged 6 commits into from Jul 14, 2021

Conversation

kilchenmann
Copy link
Contributor

@kilchenmann
Copy link
Contributor Author

This is how it works:

Screen.Recording.2021-07-13.at.15.46.02.mov

@kilchenmann kilchenmann self-assigned this Jul 13, 2021
@kilchenmann kilchenmann added the enhancement New feature or request label Jul 13, 2021
let stylizedText: string = '';
if (value && value.length > 0) {
for (let str of value.split(' ')) {
// if string/url ends with a full stop '.' or column ':' the pipe will not recognize the url
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment should be updated to align with line 19. Also, ':' is called a colon in english :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yes... colon, not column

fixed in 29c25eb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and in ab088df

})
export class LinkifyPipe implements PipeTransform {

// constructor(private _domSanitizer: DomSanitizer) { }
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed in 29c25eb

import { Pipe, PipeTransform } from '@angular/core';

/**
* This pipe analyses a string and converts any url into a href tags
Copy link
Contributor

Choose a reason for hiding this comment

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

tags -> tag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 29c25eb

@kilchenmann kilchenmann requested a review from mdelez July 14, 2021 08:32
@kilchenmann kilchenmann merged commit f08b50d into main Jul 14, 2021
@kilchenmann kilchenmann deleted the wip/dsp-1595-text-val-link-pipe branch July 14, 2021 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants