forked from kevadesu/forgejo
Fix wiki search overflowing on wide screens (#6047)
Confine the search menu to be at most the width of the page, or 80% of the viewport width, whichever is smaller. To do this, introduce a new `--container-width` variable for the descendant elements of `.ui.container` to be able to access. Also update the relevant e2e test: add a long 'lorem ipsum' page, add a search for it, parameterize the width.
This commit is contained in:
parent
ad70e7dfb3
commit
c0777279fe
10 changed files with 65 additions and 25 deletions
|
@ -86,7 +86,7 @@ func TestWiki(t *testing.T) {
|
|||
Wiki(ctx)
|
||||
assert.EqualValues(t, http.StatusOK, ctx.Resp.Status())
|
||||
assert.EqualValues(t, "Home", ctx.Data["Title"])
|
||||
assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name", "Unescaped File"}, ctx.Data["Pages"])
|
||||
assertPagesMetas(t, []string{"Home", "Long Page", "Page With Image", "Page With Spaced Name", "Unescaped File"}, ctx.Data["Pages"])
|
||||
}
|
||||
|
||||
func TestWikiPages(t *testing.T) {
|
||||
|
@ -96,7 +96,7 @@ func TestWikiPages(t *testing.T) {
|
|||
contexttest.LoadRepo(t, ctx, 1)
|
||||
WikiPages(ctx)
|
||||
assert.EqualValues(t, http.StatusOK, ctx.Resp.Status())
|
||||
assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name", "Unescaped File"}, ctx.Data["Pages"])
|
||||
assertPagesMetas(t, []string{"Home", "Long Page", "Page With Image", "Page With Spaced Name", "Unescaped File"}, ctx.Data["Pages"])
|
||||
}
|
||||
|
||||
func TestNewWiki(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue