Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add copy icon to code examples #4355

Closed
wants to merge 1 commit into from

Conversation

deepan190703
Copy link

Fixes #4350

Add a copy icon to code usage examples for better user experience.

  • Modify api/README.md to include a copy icon for each code example box.
  • Add a JavaScript function in api/README.md to handle the copy action.
  • Add a CSS class in api/README.md for the copy icon styling.
  • Modify examples/test-app/index.html to include a copy icon for each code example box.
  • Add a JavaScript function in examples/test-app/index.html to handle the copy action.
  • Add a CSS class in examples/test-app/index.html for the copy icon styling.

Fixes nightwatchjs#4350

Add a copy icon to code usage examples for better user experience.

* Modify `api/README.md` to include a copy icon for each code example box.
* Add a JavaScript function in `api/README.md` to handle the copy action.
* Add a CSS class in `api/README.md` for the copy icon styling.
* Modify `examples/test-app/index.html` to include a copy icon for each code example box.
* Add a JavaScript function in `examples/test-app/index.html` to handle the copy action.
* Add a CSS class in `examples/test-app/index.html` for the copy icon styling.
@AbhayPundora
Copy link

Hello! @deepan190703 , I am new to open source contributions and I noticed that you resolved a particular issue. I’m trying to work on this for practice, but I’m struggling to understand it. I couldn’t find the relevant HTML code, and I’m also unsure how to run it locally in the browser. I asked ChatGPT for help, and it mentioned that Nightwatch is primarily used for testing. So my question is: How can I update the copy button and see the changes, given that there’s no option for it? Any advice you could share from your busy schedule would be greatly appreciated. Thank you in advance for your help!

@garg3133
Copy link
Member

@AbhayPundora @deepan190703 The website code is present in https://github.com/nightwatchjs/nightwatch-docs and these changes should also be made there.

Closing this PR.

@garg3133 garg3133 closed this Jan 15, 2025
@deepan190703 deepan190703 deleted the add-copy-icon branch January 18, 2025 15:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat:For codes,a copy icon should be provided for better user experience.
3 participants