-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Omit extra data in schemaUtils #4139
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like your tests are failing
import _pick from 'lodash/pick'; | ||
|
||
import _get from 'lodash/get'; | ||
import _isEmpty from 'lodash/isEmpty'; | ||
import toPathSchema from './toPathSchema'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import _pick from 'lodash/pick'; | |
import _get from 'lodash/get'; | |
import _isEmpty from 'lodash/isEmpty'; | |
import toPathSchema from './toPathSchema'; | |
import _pick from 'lodash/pick'; | |
import _get from 'lodash/get'; | |
import _isEmpty from 'lodash/isEmpty'; | |
import toPathSchema from './toPathSchema'; |
return data as T; | ||
} | ||
|
||
export default function omitExtraData< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding JSDoc
- getFieldNames tests are taken from Form.test.jsx and modified - getUsedFormData tests are taken from Form.test.jsx and modified, originally they contained schemas that weren't necessary - some extra tests for omitExtraData are created
…ata, remove moved tests, fix relevant tests
6436257
to
0bc1c11
Compare
@MarekBodingerBA There is one failing tests, and you also have to get the test coverage back up to 100% given the new code you wrote |
Of course, I am still working on it, it's a draft afterall . :) |
Awesome! how do you feel it is going? Are you needing any help? |
Actually, the failing test is a bug in the original code that I've only migrated and created a test that found this. I would probably like to disable the test and create a separate issue for this (as there would be no regression). The thing is, that I find |
That is fine, as long as we get that bug fixed soon after we merge this |
@MarekBodingerBA How is this work going? There seem to be several new issues related to this feature and I would love to get this part refactored |
@MarekBodinger FYI, I just merged a PR that will definitely force you to deal with the conflicts. How can I support you in getting this code merged? |
Hi @heath-freenome, sorry for not responding. I've got stuck with this pull request. As far as I remember, it seems that in some cases the schema must be retrieved (as it always is in Form component where the original code) is. When I migrated the standalone implementation it started to fail for pretty ordinary schemas (as you can see in the test case). Then I started to digging into Merge the code please, I am curious what's new. I would like to proceed in future with this, but don't have a capacity to do so now. |
@MarekBodingerBA I can't quite merge the code as there are conflicts. Would you be willing to resolve them and comment out the one failing test. Then we can write an issue to deal with fixing the test and the bug associated with it. Also, a change was recently made to |
Reasons for making this change
fixes #4081
For now I implemented the draft version (code and markdown documentation is not finished yet). Would you be able to look if everything seems alright with the progress so far?
Checklist
npm run test:update
to update snapshots, if needed.