Skip to content

Button types - #17

Open
3noch wants to merge 2 commits into
reflex-frp:masterfrom
grafted-in:button-types
Open

Button types#17
3noch wants to merge 2 commits into
reflex-frp:masterfrom
grafted-in:button-types

Conversation

@3noch

@3noch 3noch commented Jul 1, 2017

Copy link
Copy Markdown
Member

Buttons are submits by default which is a very odd thing indeed in a Reflex app.

uiButton
:: MonadWidget t m
=> Dynamic t UiButton
=> UiButtonType

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of changing this type signature, can you put UiButtonType inside the UiButton type instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought of that but it seems very odd to change the type of a button dynamically.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

True. Then I think if we're making a breaking change we should go for a more general one:

uiButton :: MonadWidget t m => UiButtonStatic -> Dynamic t UiButton ...

...and make UiButtonType be a field of UiButtonStatic.

@3noch 3noch Jul 3, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm cool with that. I could also add new functions like uiButtonWith and have uiButton et. al. default to the most common use-case (in Reflex apps that is).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good 👍

@3noch

3noch commented Oct 11, 2017

Copy link
Copy Markdown
Member Author

Sorry, I still plan to do this but my project is hightailing it to production so I have little time for OSS contributions ATM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants