Fix duplicate dropdown dividers (#32760)
Fix #27466 The problem is that any item in the menu could be hidden, pure CSS won't work, and dropdown's builtin "hideDividers" doesn't work with our "scope dividers". The newly introduced "archived" label makes the dividers regression more.
This commit is contained in:
parent
2d13eafd69
commit
5675efb3e0
10 changed files with 179 additions and 42 deletions
|
@ -294,9 +294,7 @@ func timeEstimateString(timeSec any) string {
|
|||
return util.TimeEstimateString(v)
|
||||
}
|
||||
|
||||
type QueryString string
|
||||
|
||||
func queryBuild(a ...any) QueryString {
|
||||
func queryBuild(a ...any) template.URL {
|
||||
var s string
|
||||
if len(a)%2 == 1 {
|
||||
if v, ok := a[0].(string); ok {
|
||||
|
@ -304,7 +302,7 @@ func queryBuild(a ...any) QueryString {
|
|||
panic("queryBuild: invalid argument")
|
||||
}
|
||||
s = v
|
||||
} else if v, ok := a[0].(QueryString); ok {
|
||||
} else if v, ok := a[0].(template.URL); ok {
|
||||
s = string(v)
|
||||
} else {
|
||||
panic("queryBuild: invalid argument")
|
||||
|
@ -356,7 +354,7 @@ func queryBuild(a ...any) QueryString {
|
|||
if s != "" && s != "&" && s[len(s)-1] == '&' {
|
||||
s = s[:len(s)-1]
|
||||
}
|
||||
return QueryString(s)
|
||||
return template.URL(s)
|
||||
}
|
||||
|
||||
func panicIfDevOrTesting() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue