Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

WMS-315 | Table Filters #51

Merged
merged 18 commits into from Jul 14, 2020
Merged

WMS-315 | Table Filters #51

merged 18 commits into from Jul 14, 2020

Conversation

PedroHLC
Copy link
Contributor

@PedroHLC PedroHLC commented Jul 8, 2020

No description provided.

@PedroHLC PedroHLC added enhancement New feature or request design-sync labels Jul 8, 2020
@PedroHLC PedroHLC self-assigned this Jul 8, 2020
@PedroHLC
Copy link
Contributor Author

PedroHLC commented Jul 8, 2020

@jouderianjr please review the new API introduced by ac44d98.

I may be overdoing it, but it looks like this:

  • Model:
    model =
       checkBoxesEmpty
           |> checkBox False
           |> checkBox False
           |> checkBox False
           |> fromCheckBoxes
  • View:
    view cfg model =
       toView Msg.ForBoxes labels model
            |> renderElement cfg

     labels =
        labelsEmpty
           |> label "Guaraná"
           |> label "Coca-cola"
           |> label "Fanta"

(There is also radio behavior)

Also, I don't now if I call it checkbox or checkBox

Copy link
Contributor

@jouderianjr jouderianjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the dateFilter should work using Posix so maybe it should receive a function like (item -> Posix).

Also, unfortunately, elm-ui doesn't expose HTML5 date/time input fields, there is one open PR adding this: mdgriffith/elm-ui#231

If the guy does not fix his pr, I think I will create a new one, then we can use HTML5 date selector

src/UI/Internal/Primitives.elm Outdated Show resolved Hide resolved
src/UI/Internal/Human.elm Outdated Show resolved Hide resolved
@PedroHLC
Copy link
Contributor Author

PedroHLC commented Jul 10, 2020

@jouderianjr
I would only drop that parseDate for a safe, localized, and graphical date-picker. Otherwise, the user will be typing DD/MM/YYYY as proposed in Figma and not ISO's "YYYY-MM-DD HH:mm:SS.ms" :sweat_smile:

@PedroHLC
Copy link
Contributor Author

This is how it looks right now:
Demonstration

src/UI/Internal/Human.elm Outdated Show resolved Hide resolved
src/UI/Internal/Human.elm Outdated Show resolved Hide resolved
src/UI/Checkbox.elm Outdated Show resolved Hide resolved
src/UI/Checkbox.elm Outdated Show resolved Hide resolved
@PedroHLC PedroHLC marked this pull request as ready for review July 13, 2020 13:13
@PedroHLC
Copy link
Contributor Author

Non API-related changes will continue in another PR...

PedroHLC added a commit that referenced this pull request Jul 13, 2020
[TextField] Add withSize

[Table] Cleanup

[Checkbox] Add initial API

[Table] Use extra-small TextField

[Table] Add Select-Filter

[Table] Add MultiText-Filter

[Table] Add single date filter

[Table] Detect (poorly) date validity on single date filter

[Table] Date is a real type

Cleanup (analyse)

[Date] Add comparison

[Table] Add range-date filter

[Table] Add period-date filter

[Showcase.Tables] Demo period-date filter

[Primitives] Move TextField paddings back

Apply jouderian's suggestions 1

Apply jouderian's suggestions 2

Update comment
-- Internal


dateInput : msg -> (String -> msg) -> String -> String -> DateInput -> TextField msg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if makes sense to move this to the UI.Internal.DateInput module 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, with exception of withSize, withWIdth, withOnEnterPresed, I'll move it in #53

@PedroHLC PedroHLC merged commit 0b30938 into master Jul 14, 2020
@PedroHLC PedroHLC deleted the wms-315-phase3-4 branch July 14, 2020 11:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design-sync enhancement New feature or request
Projects
None yet
2 participants