Skip to content

Commit

Permalink
Fix typos in documentation (fjvallarino#284)
Browse files Browse the repository at this point in the history
* fix typo in onChangeIdx description

* fix typos in selectList documentation

* fix typo in readOnly description

* fix typo in titleCaption description for confirm dialog

* fix typo in draggable documentation
  • Loading branch information
Deltaspace0 authored May 20, 2023
1 parent 67f747a commit 3fff182
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Monomer/Core/Combinators.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CmbSelectOnFocus t where
selectOnFocus_ :: Bool -> t

{-|
Defines whether a widget prevents the user changing the value. Note that, in
Defines whether a widget prevents the user from changing the value. Note that, in
contrast to a disabled widget, a read-only widget can still be focused and
still allows selecting and copying the value.
-}
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Widgets/Containers/Confirm.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import qualified Monomer.Lens as L
{-|
Configuration options for confirm:
- 'titleCaption': the title of the alert dialog.
- 'titleCaption': the title of the confirm dialog.
- 'acceptCaption': the caption of the accept button.
- 'cancelCaption': the caption of the cancel button.
-}
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Widgets/Containers/Draggable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Configuration options for draggable:
customizing this step without implementing a custom widget all the lifecycle
steps.
The regular styling of this component apply only when the item is not being
The regular styling of this component applies only when the item is not being
dragged. To style the dragged container, use draggableStyle.
The transparency config only applies to the inner content.
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Widgets/Containers/Dropdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Configuration options for dropdown:
- 'onBlurReq': 'WidgetRequest' to generate when focus is lost.
- 'onChange': event to raise when selected item changes.
- 'onChangeReq': 'WidgetRequest' to generate when selected item changes.
- 'onChangeIdx': event to raise when selected item changes. Includes index,
- 'onChangeIdx': event to raise when selected item changes. Includes index.
- 'onChangeIdxReq': 'WidgetRequest' to generate when selected item changes.
Includes index.
- 'maxHeight': maximum height of the list when dropdown is expanded.
Expand Down
14 changes: 7 additions & 7 deletions src/Monomer/Widgets/Containers/SelectList.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Configuration options for selectList:
- 'onBlurReq': 'WidgetRequest' to generate when focus is lost.
- 'onChange': event to raise when selected item changes.
- 'onChangeReq': 'WidgetRequest' to generate when selected item changes.
- 'onChangeIdx': event to raise when selected item changes. Includes index,
- 'onChangeIdx': event to raise when selected item changes. Includes index.
- 'onChangeIdxReq': 'WidgetRequest' to generate when selected item changes.
Includes index.
- 'selectOnBlur': whether to select the currently highlighted item when
Expand Down Expand Up @@ -206,7 +206,7 @@ selectList
=> ALens' s a -- ^ The lens into the model.
-> t a -- ^ The list of selectable items.
-> SelectListMakeRow s e a -- ^ Function to create the list items.
-> WidgetNode s e -- ^ The created dropdown.
-> WidgetNode s e -- ^ The created select list.
selectList field items makeRow = selectList_ field items makeRow def

-- | Creates a select list using the given lens. Accepts config.
Expand All @@ -216,7 +216,7 @@ selectList_
-> t a -- ^ The list of selectable items.
-> SelectListMakeRow s e a -- ^ Function to create the list items.
-> [SelectListCfg s e a] -- ^ The config options.
-> WidgetNode s e -- ^ The created dropdown.
-> WidgetNode s e -- ^ The created select list.
selectList_ field items makeRow configs = newNode where
newNode = selectListD_ (WidgetLens field) items makeRow configs

Expand All @@ -227,7 +227,7 @@ selectListV
-> (Int -> a -> e) -- ^ The event to raise on change.
-> t a -- ^ The list of selectable items.
-> SelectListMakeRow s e a -- ^ Function to create the list items.
-> WidgetNode s e -- ^ The created dropdown.
-> WidgetNode s e -- ^ The created select list.
selectListV value handler items makeRow = newNode where
newNode = selectListV_ value handler items makeRow def

Expand All @@ -240,20 +240,20 @@ selectListV_
-> t a -- ^ The list of selectable items.
-> SelectListMakeRow s e a -- ^ Function to create the list items.
-> [SelectListCfg s e a] -- ^ The config options.
-> WidgetNode s e -- ^ The created dropdown.
-> WidgetNode s e -- ^ The created select list.
selectListV_ value handler items makeRow configs = newNode where
widgetData = WidgetValue value
newConfigs = onChangeIdx handler : configs
newNode = selectListD_ widgetData items makeRow newConfigs

-- | Creates a dropdown providing a 'WidgetData' instance and config.
-- | Creates a select list providing a 'WidgetData' instance and config.
selectListD_
:: forall s e t a . (WidgetModel s, WidgetEvent e, Traversable t, SelectListItem a)
=> WidgetData s a -- ^ The 'WidgetData' to retrieve the value from.
-> t a -- ^ The list of selectable items.
-> SelectListMakeRow s e a -- ^ Function to create the list items.
-> [SelectListCfg s e a] -- ^ The config options.
-> WidgetNode s e -- ^ The created dropdown.
-> WidgetNode s e -- ^ The created select list.
selectListD_ widgetData items makeRow configs = makeNode wtype widget where
config = mconcat configs
newItems = foldl' (|>) Empty items
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Widgets/Singles/DateField.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Configuration options for dateField:
warnings in the UI, or disable buttons if needed.
- 'resizeOnChange': Whether input causes 'ResizeWidgets' requests.
- 'selectOnFocus': Whether all input should be selected when focus is received.
- 'readOnly': Whether to prevent the user changing the input text.
- 'readOnly': Whether to prevent the user from changing the input text.
- 'minValue': Minimum valid date.
- 'maxValue': Maximum valid date.
- 'wheelRate': The rate at which wheel movement affects the date.
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Widgets/Singles/NumericField.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Configuration options for numericField:
warnings in the UI, or disable buttons if needed.
- 'resizeOnChange': Whether input causes ResizeWidgets requests.
- 'selectOnFocus': Whether all input should be selected when focus is received.
- 'readOnly': Whether to prevent the user changing the input text.
- 'readOnly': Whether to prevent the user from changing the input text.
- 'minValue': Minimum valid number.
- 'maxValue': Maximum valid number.
- 'wheelRate': The rate at which wheel movement affects the number.
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Widgets/Singles/TextArea.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Configuration options for textArea:
- 'acceptTab': whether to handle tab and convert it to spaces (cancelling change
of focus), or keep default behaviour and lose focus.
- 'selectOnFocus': Whether all input should be selected when focus is received.
- 'readOnly': Whether to prevent the user changing the input text.
- 'readOnly': Whether to prevent the user from changing the input text.
- 'onFocus': event to raise when focus is received.
- 'onFocusReq': 'WidgetRequest' to generate when focus is received.
- 'onBlur': event to raise when focus is lost.
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Widgets/Singles/TextField.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Configuration options for textField:
warnings in the UI, or disable buttons if needed.
- 'resizeOnChange': Whether input causes ResizeWidgets requests.
- 'selectOnFocus': Whether all input should be selected when focus is received.
- 'readOnly': Whether to prevent the user changing the input text.
- 'readOnly': Whether to prevent the user from changing the input text.
- 'maxLength': the maximum length of input text.
- 'textFieldDisplayChar': the character that will be displayed as replacement of
the real text. Useful for password fields.
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Widgets/Singles/TimeField.hs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Configuration options for timeField:
warnings in the UI, or disable buttons if needed.
- 'resizeOnChange': Whether input causes ResizeWidgets requests.
- 'selectOnFocus': Whether all input should be selected when focus is received.
- 'readOnly': Whether to prevent the user changing the input text.
- 'readOnly': Whether to prevent the user from changing the input text.
- 'minValue': Minimum valid time.
- 'maxValue': Maximum valid time.
- 'wheelRate': The rate at which wheel movement affects the time.
Expand Down

0 comments on commit 3fff182

Please sign in to comment.