word-break the WebHook url to prevent a ui-break#5432
Merged
Conversation
right now, the url is displayed with an anchor tag with no classes. If the url is really really long, the url will break out of the containing div and (depending on the url length) the browser shows the horizontal scrollbar. This pr makes use of the already existing css class `dont-break-out` which gives all the anchor the necessary properties to prevent the break. Another solution could be to introduce some classes like `text text-break-word`, but that would duplicate the `dont-break-out` class just for text elements that use the `text` class. fixes: go-gitea#5416 Signed-off-by: Roman <romaaan.git@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #5432 +/- ##
=========================================
Coverage ? 37.56%
=========================================
Files ? 317
Lines ? 46821
Branches ? 0
=========================================
Hits ? 17590
Misses ? 26732
Partials ? 2499Continue to review full report at Codecov.
|
lunny
approved these changes
Nov 30, 2018
Member
|
You seem to be missing the definition for “dont-break-out" ? Or is it an already defined class ? Sorry I’m on mobile and cannot check or test the PR. |
lafriks
approved these changes
Nov 30, 2018
Member
|
@adelowo it is already defined in gitea css |
Member
Author
Author
|
Backport PR #5445 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
right now, the url is displayed with an anchor tag with no classes. If the url is really really long, the url will break out of the containing div and (depending on the url length) the browser shows the horizontal scrollbar.
This pr makes use of the already existing css class
dont-break-outwhich gives all the anchor the necessary properties to prevent the break.Another solution could be to introduce some classes like
text text-break-word, but that would duplicate thedont-break-outclass just for text elements that use thetextclass.fixes: #5416
Before:

After:
