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

UI: Override the context menu's copy option to copy a command #3152

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

ordabach
Copy link
Contributor

@ordabach ordabach commented Mar 27, 2023

What does this PR do?

Related to #3115.

Changed the code block CSS

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?
  • Have you checked that you haven't introduced any duplicate code?

Testing Checklist

  • Added relevant unit tests?
  • Do all unit tests pass?
  • Do all end-to-end tests pass?
  • Any other testing performed?

    Tested by {Running the Monkey locally with relevant config/running Island/...}

  • If applicable, add screenshots or log transcripts of the feature working

proof1
proof2

ordabach added a commit that referenced this pull request Mar 27, 2023
@ordabach ordabach force-pushed the 3115-fix-copy-command branch from 122a441 to 681f818 Compare March 27, 2023 08:49
@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (46acd32) 72.34% compared to head (c543a23) 72.34%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3152   +/-   ##
========================================
  Coverage    72.34%   72.34%           
========================================
  Files          462      462           
  Lines        13199    13199           
========================================
  Hits          9549     9549           
  Misses        3650     3650           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@VakarisZ VakarisZ left a comment

Choose a reason for hiding this comment

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

I don't like this solution. It clicks a button on copy. In that case, it would probably be better to just make the whole <code block a button instead. What happens if we want to change the button? or change its behavior?
The underlying problem is that whitespace is not preserved in the <code block. If we set white-space: pre-wrap; not only you will be able to copy-paste the code, but it will actually look like the command you will paste (it will be more readable)

@ordabach ordabach force-pushed the 3115-fix-copy-command branch from 681f818 to c543a23 Compare March 28, 2023 09:10
@ordabach ordabach requested a review from VakarisZ March 28, 2023 09:14
@mssalvatore mssalvatore force-pushed the 3115-fix-copy-command branch from c543a23 to 81f1739 Compare March 28, 2023 12:25
@mssalvatore mssalvatore merged commit 45e3680 into develop Mar 28, 2023
@mssalvatore mssalvatore deleted the 3115-fix-copy-command branch March 28, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants