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

Restore copy-on-y and enable it on every page #6252

Merged
merged 2 commits into from
Feb 1, 2023
Merged

Restore copy-on-y and enable it on every page #6252

merged 2 commits into from
Feb 1, 2023

Conversation

fregante
Copy link
Member

Over the years I've come to expect "copy on y" on any page so I think it wouldn't be too bad to actually enable it site-wide.

Thoughts?

download

Test URLs

Literally any page, including:

https://github.com/refined-github/refined-github/blob/main/source/features/hide-diff-signs.css

@fregante fregante assigned fregante and unassigned fregante Jan 30, 2023
@fregante fregante added the bug label Jan 30, 2023
Copy link
Member

@yakov116 yakov116 left a comment

Choose a reason for hiding this comment

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

We added the filters at a time when we were trying to limit the features not to run on every page.

const url = location.href;
await navigator.clipboard.writeText(url);
// Log to ensure we're coping the new URL
console.log('Copied URL to the clipboard', url);
Copy link
Member

Choose a reason for hiding this comment

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

Your keeping this here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes for now:

  • could be helpful if suddenly this starts copying the non-permalinked URL
  • we're not giving any feedback that this feature is doing anything
  • the log only appears in rare situations, i.e. when the user does tap Y

Copy link
Member

Choose a reason for hiding this comment

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

Why not use the logger function?

Copy link
Member Author

Choose a reason for hiding this comment

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

Laziness to check how that worked 😂

Will do 🚀

Copy link
Member Author

@fregante fregante Feb 1, 2023

Choose a reason for hiding this comment

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

We don't seem to use features.log.info anywhere except "show features that are run on the page", it doesn't seem strictly related to this type of logging. Given this is user feedback, I'd still keep it here unconditionally

@fregante
Copy link
Member Author

We added the filters at a time when we were trying to limit the features not to run on every page.

Not in this instance, the filter was always here:

https://github.com/refined-github/refined-github/blame/d9f5db59949c1a974e8eeaa5d71ca371d12b1bbf/source/features/copy-on-y.tsx

@fregante fregante marked this pull request as draft January 31, 2023 17:30
@fregante fregante marked this pull request as ready for review February 1, 2023 05:16
@fregante fregante merged commit aabe999 into main Feb 1, 2023
@fregante fregante deleted the copy-on-y branch February 1, 2023 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

copy-on-y broken
2 participants