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

MBS-11069: Fix diff highlighting of white spaces #1691

Merged
merged 1 commit into from Sep 14, 2020

Conversation

kellnerd
Copy link
Contributor

Problem

MBS-11069

Browsers omit the rendering of trailing white spaces by default when they wrap content to fit the width of the containing element. In case the white spaces are part of the highlighted differences, they should be rendered before line wraps as well.

Solution

Change the behavior of white spaces for diffs via CSS, see https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

Action

Someone should verify this change on a test server as I haven't installed the server on my machine (Hopefully I've added this to the correct stylesheet). I only verified that this works by dynamically changing the CSS of the example that was given for the ticket using the Firefox development tools.

Browsers omit the rendering of trailing white spaces by default when
they wrap content to fit the width of the containing element.
In case the white spaces are part of the highlighted differences, they
should be rendered before line wraps as well.
@welcome
Copy link

welcome bot commented Sep 11, 2020

Thanks for opening your first pull request for MusicBrainz Server, and welcome to our community! 🎉
If you haven’t yet, please check out our contributing guidelines.
Someone will be reviewing your PR soon; just hang in there!
In the meantime, if you’re wondering what to do next, you can have a look at our issue tracker.

Copy link
Contributor

@yvanzo yvanzo left a comment

Choose a reason for hiding this comment

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

Thank you for this patch!

I have been able to reproduce the bug and to test the patch locally.

@reosarevok reosarevok added the Bug Bugs that should be checked/fixed soonish label Sep 14, 2020
@yvanzo yvanzo merged commit f5c567f into metabrainz:master Sep 14, 2020
@welcome
Copy link

welcome bot commented Sep 14, 2020

Congratulations on your first merged pull request for MusicBrainz Server! 🎉
We’re very thankful for your work, and happy to count you as part of our community!

yvanzo added a commit that referenced this pull request Sep 16, 2020
* master:
  Update POT files using the production database
  Update translations from Transifex
  MBS-7473: Allow specifying a release MBID when attaching a CD TOC (#1387)
  MBS-11065: Only block smart links if they have a path (#1677)
  MBS-11017: Normalize IMSLP to HTTPS and add validation (#1635)
  MBS-11068: Block redirect links: page.link (#1680)
  MBS-11101: Fix series not using seriesOrderingFunc (#1695)
  MBS-10835: Don't send verification mail if address in use (#1679)
  Eslint indent auto-fixes
  Bump all ESLint dependencies
  Bump all Babel dependencies
  Ignore JSXElement, ArrowFunctionExpression in indent rule
  MBS-11062: Link basic how-tos from the front page (#1674)
  MBS-11098: Fix validating Big Cartel URL for label (#1693)
  MBS-10880: Reset RGs in cache when first date changes (#1683)
  Fix innocuous warnings caused by Edit release edit (#1694)
  s/dependancies/dependencies/g
  Document CAA-indexer's upload_url config
  Test for sending access_token via POST body
  MBS-7485, MBS-11058: OAuth token revokation
  MBS-11058: Support response_mode=form_post for /oauth2/authorize
  generate_token uses 192 bits
  MBS-11058: Implement PKCE (RFC 7636) for OAuth2
  MBS-11086: Add icon for tabs with errors in release editor (#1689)
  MBS-11061: Disallow MusicBrainz URLs in relationships (#1675)
  MBS-9769: Cache 'added entities' editor stats in redis
  MBS-9769: Add 'entities added' stats on editor profile
  MBS-11058: Set Referrer-Policy on /oauth2/authorize
  Add CSP headers to other account forms
  Remove unused Minimal attribute
  MBS-11058: Set Content-Security-Policy on /oauth2/authorize
  MBS-11058: Set X-Frame-Options: DENY on /oauth2/authorize
  Fix backwards tests
  MBS-11058: Disallow same parameter twice in OAuth2 endpoints
  MBS-11069: Fix diff highlighting of white spaces (#1691)
  Bump http-proxy to 1.18.1
  Amend d5e3f84 to fix localizable string (#1690)
  MBS-10961: Block musics.link smart links
  MBS-11007: Block rb.gy URL shortener
  MBS-11008: Block bstlnk.to smart links
  MBS-11001: Block push.fm smart links
  Fix incorrect shortener path (backl.ink)
kellnerd added a commit to kellnerd/musicbrainz-server that referenced this pull request Sep 16, 2020
This is a regression of metabrainz#1691 which changed the style of highlighted
differences to always render white spaces inside
their `<span>` elements.
yvanzo pushed a commit that referenced this pull request Sep 17, 2020
…rea (#1697)

This is a regression of #1691 which changed the style of highlighted
differences to always render white spaces inside
their `<span>` elements.

Remove more unneeded white spaces in edit_medium.tt
Co-authored-by: yvanzo <yvanzo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bugs that should be checked/fixed soonish
Projects
None yet
4 participants