Skip to content

Conversation

@labkey-adam
Copy link

Rationale

Using LinkBuilder factory methods simplifies the creation of links and provides consistency & clarity

Related Pull Requests

{
DetailsURL url = DetailsURL.fromString("/mgap/genomeBrowser.view?database=" + jbrowseId + "&activeTracks=" + trackName, ContainerManager.getForId(containerId));
out.write(PageFlowUtil.link("View In Genome Browser").addClass("labkey-text-link").href(url.getActionURL()));
out.write(LinkBuilder.labkeyLink("View In Genome Browser", url.getActionURL()).addClass("labkey-text-link"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

addClass not needed, right (and maybe not needed before either)?

Container requestContainer = MccManager.get().getMCCRequestContainer(ctx.getContainer());
DetailsURL url = DetailsURL.fromString("/mcc/requestReview.view?requestId=" + requestId + "&mode=rabReview", requestContainer);
out.write(PageFlowUtil.link("Enter Review").href(url.getActionURL().addReturnUrl(ctx.getViewContext().getActionURL())).addClass("labkey-text-link"));
out.write(LinkBuilder.labkeyLink("Enter Review", url.getActionURL().addReturnUrl(ctx.getViewContext().getActionURL())).addClass("labkey-text-link"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above. this was pre-existing your change and doesnt really harm anything either

Copy link
Author

Choose a reason for hiding this comment

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

Correct... not needed (it's set by default) but harmless. I'll clear these out before merging, just for clarity.

DetailsURL url = DetailsURL.fromString("/mcc/requestReview.view?requestId=" + requestId + "&mode=primaryReview", requestContainer);
out.write(HtmlString.BR);
out.write(PageFlowUtil.link("Enter MCC Internal Review").addClass("labkey-text-link").href(url.getActionURL().addReturnUrl(ctx.getViewContext().getActionURL())));
out.write(LinkBuilder.labkeyLink("Enter MCC Internal Review", url.getActionURL().addReturnUrl(ctx.getViewContext().getActionURL())).addClass("labkey-text-link"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

Copy link
Collaborator

@bbimber bbimber left a comment

Choose a reason for hiding this comment

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

This pre-dated your change, but most of the edited lines dont need addClass('labkey-text-link'), right? While it would make the code clearer, I dont think it's your responsibility in the merge since it all pre-dated it. Thanks for the refactor...

@labkey-adam
Copy link
Author

This pre-dated your change, but most of the edited lines dont need addClass('labkey-text-link'), right? While it would make the code clearer, I dont think it's your responsibility in the merge since it all pre-dated it. Thanks for the refactor...

Correct. Just removed them all, 497f4a6. Because why not.

@labkey-adam labkey-adam merged commit 876b10f into develop Apr 14, 2025
3 of 4 checks passed
@labkey-adam labkey-adam deleted the fb_linkbuilder branch April 14, 2025 22:49
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.

3 participants