Skip to content

Commit

Permalink
word-break the WebHook url to prevent a ui-break
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
r-52 committed Nov 30, 2018
1 parent 5c13ba8 commit 23cc5c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/settings/webhook/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{{else}}
<span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
{{end}}
<a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
<a class="dont-break-out" href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
<div class="ui right">
<span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
<span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
Expand Down

0 comments on commit 23cc5c2

Please sign in to comment.