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

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

Open
Sakshi2727 opened this issue Jan 7, 2025 · 5 comments

Comments

@Sakshi2727
Copy link

Description

For the codes usage example given on every method,it would be more convenient if there would be a copy icon so that there is no need of ctrl+c keys for user and user can directly click on that cop icon and the whole code gets automatically copied.
Screenshot 2025-01-07 162120
So as shown in image,example box should have a copy icon on top right most side.

Suggested solution

Simple a copy icon like this would be beneficial!
copy

Alternatives / Workarounds

No response

Additional Information

No response

@webermayank
Copy link

Yes @Sakshi2727 this will be a good feature,
i tried to correct the output not visible issue and raised a PR but somehow the copy button is yet to be implemented.
As this repo uses postdoc , i guess we have to add a plugin or something to add a copy button.
Looking forward to work on this gladly.

deepan190703 added a commit to deepan190703/nightwatch that referenced this issue Jan 10, 2025
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.
@utkarshahu
Copy link

Hey @webermayank i can work on this , kindly assign it me.....

@webermayank
Copy link

Hey @utkarshahu
i don't have authorities to do so , you can ask mentors to get assign.

@garg3133
Copy link
Member

@utkarshahu Feel free to work on this. The changes will go in the nightwatch-docs repository.

@unlike1abhinav
Copy link

@garg3133 is this issue resolved ? If not please assign to me I will like to work on this

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants