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

[WIP] LF-4383 Animal details form container handle edit of animal details #3500

Draft
wants to merge 24 commits into
base: integration
Choose a base branch
from

Conversation

kathyavini
Copy link
Collaborator

@kathyavini kathyavini commented Oct 15, 2024

TODO:

  • clarify header toggle behaviour with Sayaka + Loïc
    • Decided + will add to ticket that the header button once in editing state should be non-interactive
  • clarifications / adjust needed in conjunction with API. Have implemented sending only dirtied fields and nulling cleared fields but I'm not liking it much 😂 It would be preferable if the request body could remain much closer to the AddAnimals
    • this got the okay so I'll send all fields + nulled
    • made functional for animals
    • made functional for batches
  • cleanup

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Jira link: https://lite-farm.atlassian.net/browse/LF-4383

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have added "MISSING" for all new language tags to languages I don't speak
  • I have added the GNU General Public License to all new files

@kathyavini kathyavini added enhancement New feature or request draft labels Oct 15, 2024
@kathyavini kathyavini self-assigned this Oct 15, 2024
@kathyavini kathyavini requested review from a team as code owners October 15, 2024 22:04
@kathyavini kathyavini requested review from antsgar and SayakaOno and removed request for a team October 15, 2024 22:04
@kathyavini kathyavini marked this pull request as draft October 15, 2024 22:04
@kathyavini kathyavini force-pushed the LF-4383-animal-details-form-container-handle-edit-of-animal-details branch from df1ae90 to 3150a6f Compare October 22, 2024 19:18
Not my preferred method or UX because of the flash of old values, but moving the key created TypeError: Cannot destructure property 'FormContent' of 'steps[activeStepIndex]' as it is undefined
…elds

WIP. Only completed for animal. Also nulling is okay but I don't think the dirtied fields is a great way to go; I will bring to daily discussion
Note that unregistering with shouldUnregister will not add it to dirtyFields. For this field, not sending a value actually is enough to null in the database; I think additional controller logic is probably in place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant