Skip to content

Commit

Permalink
wip: rename/clarify later departures
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalcora committed Apr 4, 2024
1 parent 310019d commit 41a5ef7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/config/v2/departures/layout.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ defmodule ScreensConfig.V2.Departures.Layout do
If `max` is not set, the section may grow to fill all available space. If `base` is not set, it
defaults to the value of `max`.
If `overflow` is set, departures that don't fit in the main list (up to `max`) overflow into a
paging "Later Departures" component.
If `include_later` is set, the section includes a paging "Later Departures" component, which
shows departures that would have otherwise been dropped due to space constraints (plus as many
further-out departures as it has space for). The other fields do not "count" departures shown
here; in other words, a section with `%{base: 4, max: 6, include_later: true}` is treated as
desiring 4-6 departures that are visible at all times, and if more are available, however many
will fit in "Later Departures" in addition to that.
"""

@type t :: %__MODULE__{
base: pos_integer() | nil,
include_later: boolean(),
max: pos_integer() | nil,
min: pos_integer(),
overflow: boolean()
min: pos_integer()
}

defstruct base: nil, max: nil, min: 1, overflow: false
defstruct base: nil, include_later: false, max: nil, min: 1

use ScreensConfig.Struct, with_default: true

Expand Down

0 comments on commit 41a5ef7

Please sign in to comment.