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

word-break the WebHook url to prevent a ui-break #5432

Merged
merged 4 commits into from
Nov 30, 2018

Conversation

r-52
Copy link

@r-52 r-52 commented Nov 30, 2018

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: #5416

Before:
image

After:
image

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 <[email protected]>
@lunny lunny added type/bug topic/ui Change the appearance of the Gitea UI labels Nov 30, 2018
@codecov-io
Copy link

codecov-io commented Nov 30, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@c761625). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5432   +/-   ##
=========================================
  Coverage          ?   37.56%           
=========================================
  Files             ?      317           
  Lines             ?    46821           
  Branches          ?        0           
=========================================
  Hits              ?    17590           
  Misses            ?    26732           
  Partials          ?     2499

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c761625...6659077. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 30, 2018
@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 30, 2018
@adelowo
Copy link
Member

adelowo commented Nov 30, 2018

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.

@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 30, 2018
@lafriks
Copy link
Member

lafriks commented Nov 30, 2018

@adelowo it is already defined in gitea css

@techknowlogick techknowlogick merged commit 06ef5b6 into go-gitea:master Nov 30, 2018
@lafriks lafriks added this to the 1.7.0 milestone Nov 30, 2018
@lafriks
Copy link
Member

lafriks commented Nov 30, 2018

@romankl can you please backport commit 06ef5b6 to release/v1.6 branch?

@r-52
Copy link
Author

r-52 commented Nov 30, 2018

@romankl can you please backport commit 06ef5b6 to release/v1.6 branch?

@lafriks sure, will do it over the weekend!

@r-52
Copy link
Author

r-52 commented Dec 2, 2018

Backport PR #5445

@r-52 r-52 deleted the r-wrap-the-url-in-webhooks branch December 2, 2018 20:36
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webhook Url too long in UI
7 participants