Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorphic records for widget construction #7

Merged
merged 5 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

- Remove the need to wrap widget values with `asOneOf` (#7)
Any of the input record fields can now be either `a` or `Binding a`, as long as props of the widget have that field as `ValueOrBinding a`.

- Move all widgets into a single module (#7)
Modules for individual widgets like `AGS.Widget.Button` are removed.
Now widgets should only be imported from `AGS.widget`.

- Make `Applications.matchAppName` return `Boolean` rather than `Effect Boolean`

## v0.1.0
Expand Down
101 changes: 51 additions & 50 deletions src/AGS/Widget.purs
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,73 @@ import AGS.Binding
, overBoth
, overValue
) as Exports
import AGS.Widget.Box (BoxProps, UpdateBoxProps, box, box') as Exports
import AGS.Widget.Button (ButtonProps, UpdateButtonProps, button, button') as Exports
import AGS.Widget.CenterBox
( CenterBoxProps
, UpdateCenterBoxProps
import AGS.Widget.Internal
( class ToValueOrBindingC
, AGSWidgetProps
, Any
, AnyF
, BoxProps
, ButtonProps
, CenterBoxProps
, CircularProgressProps
, EntryProps
, EventBoxProps
, IconProps
, LabelProps
, Mark
, MarkPosition
, MenuItemProps
, MenuProps
, MkWidget
, MkWidgetWithUpdates
, OverlayProps
, ProgressBarProps
, RevealerProps
, ScrollableProps
, SliderProps
, StackProps
, ToValueOrBinding
, box
, box'
, button
, button'
, centerBox
, centerBox'
) as Exports
import AGS.Widget.CircularProgress
( CircularProgressProps
, UpdateCircularProgressProps
, circularProgress
, circularProgress'
) as Exports
import AGS.Widget.Entry (EntryProps, UpdateEntryProps, entry, entry') as Exports
import AGS.Widget.EventBox
( EventBoxProps
, UpdateEventBoxProps
, entry
, entry'
, eventBox
, eventBox'
) as Exports
import AGS.Widget.Icon (IconProps, UpdateIconProps, icon, icon') as Exports
import AGS.Widget.Internal
( AGSWidgetProps
, Any
, AnyF
, icon
, icon'
, label
, label'
, markPositionBottom
, markPositionLeft
, markPositionRight
, markPositionTop
, menu
, menu'
, menuItem
, menuItem'
, mkAny
, unsafeWidgetUpdate
) as Exports
import AGS.Widget.Label (LabelProps, label, label') as Exports
import AGS.Widget.Menu (MenuProps, UpdateMenuProps, menu, menu') as Exports
import AGS.Widget.Menu.Item (MenuItem, MenuItemProps, menuItem, menuItemImpl) as Exports
import AGS.Widget.Overlay (OverlayProps, UpdateOverlayProps, overlay, overlay') as Exports
import AGS.Widget.ProgressBar
( ProgressBarProps
, UpdateProgressBarProps
, overlay
, overlay'
, progressBar
, progressBar'
) as Exports
import AGS.Widget.Revealer
( GtkRevealerTransitionType
, RevealerProps
, UpdateRevealerProps
, propsToValueOrBindings
, revealer
, revealer'
, transitions
) as Exports
import AGS.Widget.Scrollable
( ScrollableProps
, UpdateScrollableProps
, scrollable
, scrollable'
) as Exports
import AGS.Widget.Slider
( Mark
, MarkPosition
, SliderProps
, UpdateSliderProps
, markPositionBottom
, markPositionLeft
, markPositionRight
, markPositionTop
, slider
, slider'
, stack
, stack'
, toValueOrBinding
, withUpdates
) as Exports
import AGS.Widget.Stack (StackProps, stack, stack') as Exports
import AGS.Widget.Window (Window, WindowProps, window) as Exports
import Effect (Effect)
import Effect.Uncurried
Expand Down
3 changes: 0 additions & 3 deletions src/AGS/Widget/Box.js

This file was deleted.

54 changes: 0 additions & 54 deletions src/AGS/Widget/Box.purs

This file was deleted.

3 changes: 0 additions & 3 deletions src/AGS/Widget/Button.js

This file was deleted.

59 changes: 0 additions & 59 deletions src/AGS/Widget/Button.purs

This file was deleted.

1 change: 0 additions & 1 deletion src/AGS/Widget/CenterBox.js

This file was deleted.

50 changes: 0 additions & 50 deletions src/AGS/Widget/CenterBox.purs

This file was deleted.

4 changes: 0 additions & 4 deletions src/AGS/Widget/CircularProgress.js

This file was deleted.

51 changes: 0 additions & 51 deletions src/AGS/Widget/CircularProgress.purs

This file was deleted.

4 changes: 0 additions & 4 deletions src/AGS/Widget/Entry.js

This file was deleted.

Loading
Loading