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/link data type #3105

Merged
merged 1 commit into from
Mar 21, 2018
Merged

Feat/link data type #3105

merged 1 commit into from
Mar 21, 2018

Conversation

sidneyw
Copy link
Contributor

@sidneyw sidneyw commented Mar 8, 2018

Implements link data type proposal in #3099.

Adds the link dataType as a displayable field in both the NodeDetailsGenericTable and NodeDetailsInfo components via conditional render.

@squaremo squaremo added component/ui Predominantly a front-end issue; most/all of the work can be completed by a f/e developer feature Indicates that issue is related to new end user functionality labels Mar 14, 2018
@squaremo
Copy link

Thanks for this! I'm not qualified to review the code change; but, to get it in shape for someone who is, I recommend rebasing against master, and squashing the redundant commits out. git rebase -i is your friend (though sometimes a difficult-to-like friend).

@sidneyw sidneyw force-pushed the feat/link-data-type branch from 00d00eb to 9fbc59e Compare March 14, 2018 13:10
@sidneyw
Copy link
Contributor Author

sidneyw commented Mar 14, 2018

Sorry about that @squaremo. I've squashed and rebased. Thanks for taking a look!

@squaremo
Copy link

Sorry about that @squaremo. I've squashed and rebased

No worries, thanks for that.

I like the idea in #3099, but we shall have to wait for someone more familiar with Scope to check the code. One thing that did occur to me: do you perhaps want to have both a link href and a link text?

@sidneyw
Copy link
Contributor Author

sidneyw commented Mar 14, 2018

@squaremo How might we get both values from a plugin into the view? We had tested this idea earlier by sending the value as value: link-href:link-text and parsing the string in the view but decided not to move forward with that solution. Is there a better way?

@squaremo
Copy link

How might we get both values from a plugin into the view?

Good question -- my understanding is too superficial to have grasped that you couldn't just supply a structure. I can certainly see that encoding the values in a string seems like a step too far. :-S

@rade rade requested a review from foot March 15, 2018 07:10
@rndstr
Copy link
Contributor

rndstr commented Mar 16, 2018

Appreciate the PR @RcrsvSquid! First feedback:

@sidneyw sidneyw force-pushed the feat/link-data-type branch from 9fbc59e to 7b50613 Compare March 16, 2018 15:19
@sidneyw
Copy link
Contributor Author

sidneyw commented Mar 16, 2018

@rndstr I've responded to your comments with changes

Copy link
Contributor

@rndstr rndstr left a comment

Choose a reason for hiding this comment

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

Thank you @RcrsvSquid, LGTM!

I agree with @squaremo that having text & link would be nice to have but that would require a bigger change

@sidneyw
Copy link
Contributor Author

sidneyw commented Mar 21, 2018

@foot @rndstr Is there anything else you need from me to be able to merge this pull request?

@rndstr
Copy link
Contributor

rndstr commented Mar 21, 2018

@RcrsvSquid it just got brought to my attention by @foot that we should add a rel="noopener noreferrer" to all the links which prevents a phishing possibility. then we are good to go, thanks!

Copy link
Contributor

@foot foot left a comment

Choose a reason for hiding this comment

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

Yeah! norel/noop would be one more little nice to have but as the plugin should be generating safe urls we can probably merge as is. 👌

@foot
Copy link
Contributor

foot commented Mar 21, 2018

But @rndstr makes a good point against future proofing, if a future plugin proxies dodgy urls etc. So yes, if you could please add the noop/norel that would be grand! Ta!

@sidneyw sidneyw force-pushed the feat/link-data-type branch from 7b50613 to dc3caab Compare March 21, 2018 17:35
@sidneyw
Copy link
Contributor Author

sidneyw commented Mar 21, 2018

@foot Done!

@rndstr
Copy link
Contributor

rndstr commented Mar 21, 2018

@RcrsvSquid awesome ✨

(did run tests locally, they passed)

@rndstr rndstr merged commit b22b3d6 into weaveworks:master Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ui Predominantly a front-end issue; most/all of the work can be completed by a f/e developer feature Indicates that issue is related to new end user functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants