[OCaml] Mobile-friendly clone of cgit.
refactor rename tree_more to tree_overflow
tree_leaf and tree_branch share a metaphor that tree_more abandoned, and "more" describes the link's wording rather than the row's role. The function already emits class "tree-overflow", so the new name matches the CSS contract it is paired with.
Changed files
lib/views/components.ml
@@ -165,7 +165,7 @@
165
165
Ui.tree_leaf ?modifier ~href:(url route) name
166
166
167
167
let truncated ~route count =
168
Removed:
Ui.tree_more ~href:(url route)
168
Added:
Ui.tree_overflow ~href:(url route)
169
169
(Printf.sprintf "%d more items\xe2\x80\xa6" count)
170
170
171
171
(** {1 Sections} *)
lib/views/ui.ml
@@ -168,7 +168,7 @@
168
168
[ items ~class_:"tree-nested" children ];
169
169
]
170
170
171
Removed:
let tree_more ?(class_ = "tree-overflow") ~href label =
171
Added:
let tree_overflow ?(class_ = "tree-overflow") ~href label =
172
172
item ~class_ [ text_link ~href label ]
173
173
174
174
(* Breadcrumbs *)
lib/views/ui.mli
@@ -200,7 +200,7 @@
200
200
@param modifier a class added alongside the base [tree-dir] class.
201
201
@param expanded renders the nested list open on load. *)
202
202
203
Removed:
val tree_more : ?class_:string -> href:string -> string -> node
203
Added:
val tree_overflow : ?class_:string -> href:string -> string -> node
204
204
(** A row standing in for entries omitted from a truncated list. *)
205
205
206
206
(** {1 Breadcrumbs} *)