-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Added copy lint name button to lint list #8473
Added copy lint name button to lint list #8473
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @camsteffen (or someone else) soon. Please see the contribution instructions for more information. |
I added a tooltip for the button and an alert for when you've clicked it |
I wanted this for quite some time now ❤️. I find the alert a bit distracting, but we should give some kind of visual feedback. Maybe an icon change like rustdoc has for items would be better. rustdoc uses Edit: Also, I think we should discuss if the name should be prefixed with |
I agree we should avoid I also think it would be good to prefix |
Sounds like a plan. I'm gonna try to get these changes in over the next few days @camsteffen What exactly do you mean by prefixing? Just putting |
Thank you! To solve this, you can just add the prefix in line 504 like this (Or any other variation of JS string formatting.): - navigator.clipboard.writeText(lint.id);
+ navigator.clipboard.writeText("clippy::" + lint.id); I believe that most people would expect the prefix to be there. In discussions in this repo we often leave it out as the domain is clear, but having it wouldn't hurt. So, with some consideration, I would suggest prefixing it every time. 🙃 A second option would be to have a setting or key combination to control the prefix, but I believe that that is more confusing than helpful for 99% of the users. If there are complaints / suggestions to remove the prefix it's an easy change :) |
Hey @Mastermindaxe, are you still working on this? If you need any support, we're happy to help. 🙃 |
Sorry for being inactive so long. Have been swamped with work and private stuff. I'm hoping that I can squeeze it in some time in the next two weeks. No promises but I'm trying! |
No problem @Mastermindaxe and thank you for the response, if you're busy, you can also reach out. I'd be happy to add the finishing touches and ask another team member to review the final work 🙃 |
I'm closing this due to the long inactivity. If you have the time, feel free to reopen it 🙃. Thank you very much for starting this implementation. I want to suggest this issue to another contributor and will reference this PR along with your work. |
Fixes #7959
changelog: Added 'copy lint name' button to lint list