-
Notifications
You must be signed in to change notification settings - Fork 15
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
7.0.0 Feature Planning #30
Comments
I'd like to get some input from the community about how you'd like to see redux+forms+ angular working together. CC: @clbond @danielfigueiredo @renvrant @GenZodd @e-schultz @frederikaalund |
For now, feel free to dump ideas in here. Since it's a major version, breaking changes or even a complete rewrite are possibly in scope. |
I'd like to see bidirectional data flow between redux and the forms. I'd like to point your attention to my own go at an This is nice to have when some service/other component is updating the store and the form needs to instantly reflect the updates. Also, if two forms are connected to the same store, changes made to any one form will instantly apply to the other. This strengthens the visual cue that these two forms are indeed representing the same data. Each form may represent said data differently (e.g., a slider and a number input). |
I would like to have access to actions which are dispatched, to handle them in other reducers. |
Currently, on form submission the form values are flushed from the store. I would like to be able to control this as when validating a form this can cause the store data to be cleared even though the fields still hold the values and the user is still trying to submit. This feeds into the bidirectional flow. I would like to be able to use template forms |
|
Definitely agree on the Angular package format thing, across all three packages. Feel like taking a stab? |
Could do. The trick, as usual, will be finding the time :) |
I think it will be very nice if the form will work with substores. |
I'd love to see support for form validation. If that would be deemed too out-of-scope for the project, then more guidance on/recipes for. |
Validation is on my roadmap too. I’ve got a solution that I’m piloting on a project right now that I want to fold back into this library |
That's great! I'm in a position where I'm basically about to roll my own validation w/ this lib for a project, so if there's even a chance you could share your in-progress solution, it would help. Knowing there's validation being thought out for this, I'll likely want to implement it in the future when it's released officially. Starting from roughly the same place would certainly make that easier. 😄 |
Does this mean that this package is going to be maintained? (Not meant as snark, genuinely asking) |
@KSuttle-cng As best we can considering the usual concerns of work / life / OSS balance 😄 |
It would be a nice feature that radio-buttons or checkboxes which are preselected (maybe also A mighty startup action would be really nice, where it parses the form, checks if something is predefined and stores it into the redux store. EDIT: |
I was working with module this week and ran into an issue with dynamically added form controls. When you do something like this:
The store creates a model like this:
However, when you check the checkbox the 0 store values gets updated to Here is the HTML binding:
Would be great if 7.0 could handle dynamic forms fields like this. |
@GenZodd In your example the form control returns the value |
I have done some work today that addresses a part of the issues here. I opened #42 for discussion and further ideas. |
Ya, I guess that is my point, and maybe I did not explain it well, is that check boxes and forms don't play well together because there is really no way to understand what "thing" was checked. There is a record in the store of 0: true but it is hard to map back to what "thing" was in spot 0. Especially, when you are dynamically creating a list of checkboxes. |
Thinking about the project scaffolding (for usage and contributing) Contributors point of view: Users point of view: import { FormTypes } from '@angular-redux/form' Refactoring thoughts Probably the functions in // form-actions.ts
import { Injectable } from '@angular/core';
import { NgForm } from '@angular/forms';
import { FORM_CHANGED } from 'form-types';
@Injectable()
export class FormActions {
valueChanged<T>(path: string[], form: NgForm, value: T) {
return {
type: FORM_CHANGED,
payload: {
path,
form,
valid: form.valid === true,
value
}
};
}
} So in |
Re: validation: Would that be leveraging redux-observable as in: https://github.com/angular-redux/store/blob/master/articles/epics.md ? |
Are there considerations for leveraging: |
@SethDavenport Are you still working on this project? |
@angular-redux/form needs a revamp. Since we've started working on a 7.0.0 release roadmap for /[email protected] (https://github.com/angular-redux/store/projects/2) this seems like a good opportunity to re-work /form in the same timeframe.
The text was updated successfully, but these errors were encountered: