Skip to content

correct the javascript for copy button ! so the copy button only copy the valid commands .#328

Closed
Rupam-It wants to merge 2 commits intomicrocks:masterfrom
Rupam-It:issue324
Closed

correct the javascript for copy button ! so the copy button only copy the valid commands .#328
Rupam-It wants to merge 2 commits intomicrocks:masterfrom
Rupam-It:issue324

Conversation

@Rupam-It
Copy link
Contributor

@Rupam-It Rupam-It commented Feb 14, 2025

Description

  • ...
  • ...
  • ...

Related issue(s)

fixes #324
this PR make sure copy button only copy the valid command !
not the unnecessary things, those are happening now!

Signed-off-by: Rupam-It <mannarupam3@gmail.com>
@github-actions
Copy link

👋 @Rupam-It

Welcome to the Microcks community! 💖

Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly.

Hope you have a great time there!

🌟 ~~~~~~~~~ 🌟

📢 If you like Microcks, please ⭐ star ⭐ our repo to support it!

🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

@divyansh-prks
Copy link
Contributor

hey @Rupam-It make sure you write proper description before raising any pr :)

@yada
Copy link
Member

yada commented Feb 14, 2025

A few comments on this PR:

  1. This will only work if the command uses $ as a prefix and only if we have one command per block code... I'm not 100% sure we have been using the same convention on all the documentation...

  2. We have a code and copy button for specification, where users will expect to have all the text... ex: https://microcks.io/documentation/tutorials/first-rest-mock/ and many more on the documentation...

  3. Why did you remove the lines for "// Remove extra new lines."? Because this has been added by Laurent last week for a specific purpose ;-) Ref:

    // Remove extra new lines.

@yada yada added kind/bug Something isn't working component/ux Improvements or additions to UX or style kind/enhancement New feature or request kind/question Further information is requested component/documentation labels Feb 14, 2025
@Rupam-It
Copy link
Contributor Author

A few comments on this PR:

  1. This will only work if the command uses $ as a prefix and only if we have one command per block code... I'm not 100% sure we have been using the same convention on all the documentation...
  2. We have a code and copy button for specification, where users will expect to have all the text... ex: https://microcks.io/documentation/tutorials/first-rest-mock/ and many more on the documentation...
  3. Why did you remove the lines for "// Remove extra new lines."? Because this has been added by Laurent last week for a specific purpose ;-) Ref:
    // Remove extra new lines.

okk understood your point !
i'm woring on that!

Signed-off-by: Rupam-It <mannarupam3@gmail.com>
@Rupam-It
Copy link
Contributor Author

Rupam-It commented Feb 15, 2025

@yada , @divyansh-prks
can you check in the whole code base i have separate the command and the output!
i have made a video but it is greater than 10 Mb, so i put that on slack channel.

only the issue is for the command
image
it will copy an extra "$" at begining !
$ curl https://microcks.apps.example.com/rest/WeatherForecast+API/1.0.0/forecast\?region\=east -k -s | jq .
that could issue for copy paste !
but most of web page like kmesh! you can see the same structure!

if you want to delete the '$' we can delete that
image

waiting for your response!

@lbroudoux lbroudoux added the status/wontfix This will not be worked on label Feb 24, 2025
@lbroudoux
Copy link
Member

See closing comment on #324

@lbroudoux lbroudoux closed this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/documentation component/ux Improvements or additions to UX or style kind/bug Something isn't working kind/enhancement New feature or request kind/question Further information is requested status/wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] : Copy Button Does Not Copy Commands Correctly Across Documentation

4 participants