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

Fix markdown toggle & only show source copy button on hover #1939

Merged
merged 4 commits into from Jan 28, 2022

Conversation

Pilopa
Copy link
Contributor

@Pilopa Pilopa commented Jan 28, 2022

Proposed changes

A recent update added a button that lets users copy source code. In markdown files, the toggle button covers the copy button visually which does not look good and makes it hard/impossible to use. Additionally, larger markdown files with multiple code blocks have too many visible buttons that clutter the screen. This PR moves the markdown toggle above the actual display and only shows the copy button upon hovering the code that is to be copied.

Your checklist for this pull request

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Contributor:

  • PR is well described and the description can be used as a commit message on squash
  • Related issues linked to PR if existing and labels set
  • Changelog entry file created in gradle/changelog

Reviewer:

  • The clean code principles are respected (CleanCode)
  • All new code/logic is implemented on the right spot / "Should this be done here?"
  • UI changes fits into the layout
  • The UI views / components are responsive (mobile views)
  • Correct translations are available

Checklist for branch merge request (not required for forks)

@Pilopa Pilopa added the bug Something isn't working label Jan 28, 2022
@Pilopa Pilopa marked this pull request as ready for review January 28, 2022 09:07
@Pilopa Pilopa added the enhancement New feature or request label Jan 28, 2022
Copy link
Member

@pfeuffer pfeuffer left a comment

Choose a reason for hiding this comment

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

If the text has been copied from one code block, the button will no longer show up for other code blocks.

@pfeuffer pfeuffer dismissed their stale review January 28, 2022 12:26

Change did not work the first time, after a reload it looked ok

@pfeuffer pfeuffer merged commit de36c0d into develop Jan 28, 2022
@pfeuffer pfeuffer deleted the bugfix/markdown-code-copy branch January 28, 2022 13:01
@sonarcloud
Copy link

sonarcloud bot commented Jan 28, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants