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

Add a Copy from UI JS library to Citations/Metadata Formatters #196

Closed
DiegoPino opened this issue May 6, 2022 · 1 comment
Closed

Add a Copy from UI JS library to Citations/Metadata Formatters #196

DiegoPino opened this issue May 6, 2022 · 1 comment
Labels
enhancement New feature or request Field Formatter The thing that glues the pieces and adds glitter Javascript Favourite language of a PHP developer UI driven hints Show stuff on screen so people have less guessing to do UX Like UI but with an X
Milestone

Comments

@DiegoPino
Copy link
Member

@aksm this is going to be a follow up ticket to #192

Many times we might need to have a tiny button on a side/surrounding an HTML element to allow the user (end user) to copy into its copy-pasta buffer easily data.

This can be used in the citation formatter but also on the Object Description (any Twig based, Custom Metadata Formatter) to copy the URL of a IIIF manifest, a persistent URL, etc.

The idea would be to make a small JS drupal behavior that attaches to a CSS class and uses a data attribute to get the to-be-copied value.

Browsers implement this differently. So other than the JS library, both CSL and the Custom Metadata Formatter would attach this library and we would need to add documentation for the former formatter so people know how to expose the HTML that allow the JS to attach itself to the HTML element.

Let me know if you have any doubts.

Thanks

@DiegoPino DiegoPino added enhancement New feature or request Javascript Favourite language of a PHP developer Field Formatter The thing that glues the pieces and adds glitter UI driven hints Show stuff on screen so people have less guessing to do UX Like UI but with an X labels May 6, 2022
@DiegoPino DiegoPino added this to the 1.0.0 milestone May 6, 2022
@aksm aksm removed their assignment Sep 29, 2023
@DiegoPino
Copy link
Member Author

Resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Field Formatter The thing that glues the pieces and adds glitter Javascript Favourite language of a PHP developer UI driven hints Show stuff on screen so people have less guessing to do UX Like UI but with an X
Projects
None yet
Development

No branches or pull requests

2 participants