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

Create UI for single use links #1638

Merged
merged 2 commits into from
Dec 11, 2023
Merged

Conversation

lfarrell
Copy link
Contributor

@lfarrell lfarrell commented Dec 7, 2023

Copy link
Member

@bbpennel bbpennel left a comment

Choose a reason for hiding this comment

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

This looks good overall, just a few suggestions

Comment on lines 45 to 46
copied_link: "Download URL, ${text}, copied to clipboard",
copied_link_failed: "Unable to copy download URL, ${text}, to clipboard",
Copy link
Member

Choose a reason for hiding this comment

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

I don't think the $'s are necessary, it is displaying a $ in front of the url in the message

this.fadeOutMsg();
},

positionMsg(id) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not really sure where its supposed to position the messages. With the Generate button if there's an error it puts the message directly on top of the Generate button. But when copying a link the message is over on the left side of the screen. Is it supposed to display over the "Created link" bubble as well, or off on the left side?

@@ -20,6 +20,9 @@
<i class="fa fa-search" aria-hidden="true"></i> View</a>
</div>
</template>
<template v-if="hasPermission(recordData, 'viewHidden')">
Copy link
Member

Choose a reason for hiding this comment

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

We should add tests to verify that the single-use-link component shows up with viewHidden permissions, and not without them

expect(window.navigator.clipboard.writeText)
.toHaveBeenCalledWith(response_date.link);
});
});
Copy link
Member

Choose a reason for hiding this comment

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

If it's not too much of a pain, it'd be good to also add a test for when it fails to generate a link since there's a decent amount of logic there.

@bbpennel bbpennel merged commit 37ed761 into single-use-links Dec 11, 2023
@bbpennel bbpennel deleted the single-use-links-ui branch December 11, 2023 16:35
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.

2 participants