Bandera.Dashboard.Grouping (bandera v0.4.0)

Copy Markdown View Source

Pure helper that groups flags for the dashboard by a name-prefix convention.

Each flag's atom name is split (as a string) on the first occurrence of the configured separator: the part before it is the group, the remainder is the flag's display name. Names without the separator — or with an empty prefix — fall into the "Ungrouped" bucket, which always sorts last. A nil separator disables grouping entirely.

Summary

Types

An ordered group: its name and its {display_name, flag} members.

Functions

Groups flags using separator. See the moduledoc for the rules.

Types

group()

@type group() :: {String.t(), [{String.t(), Bandera.Flag.t()}]}

An ordered group: its name and its {display_name, flag} members.

Functions

group(flags, separator)

@spec group([Bandera.Flag.t()], String.t() | nil) :: [group()]

Groups flags using separator. See the moduledoc for the rules.