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

[Enhance] Normalize the retrieved 'User' object #178

Closed
carma12 opened this issue Nov 2, 2023 · 2 comments
Closed

[Enhance] Normalize the retrieved 'User' object #178

carma12 opened this issue Nov 2, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@carma12
Copy link
Collaborator

carma12 commented Nov 2, 2023

Context

The user data ('ipaObject') retrieved from an API call contains partial information and might have some undefined parameters that need to be handled afterward in multiple parts of the code, making it cumbersome to maintain.

That is why a new way to normalize the values (especially the undefined ones) and parse them into a proper data type is needed to better manage the parameters and prevent over-adapting the code to a specific use case.

E.g.: <parameterName>: undefined ---> Needs to be parsed into a specific type (string, number, etc.) to start working with it. If this value is explicitly set as empty ("", 0, etc.), this is considered as a modified value by the current code logic (as per here), but the value has not changed at all (i.e.: no difference between 'undefined' and "").

Goals

  • Normalize the values of the 'User' object to properly detect any change in any of those.

Acceptance criteria

  • Handle the 'User' object retrieved from the API call response.
  • Process the 'User' data and analyze how the types are defined in the global object (i.e.: the 'User' data type).
  • All processed objects need to have all their values/parameters initialized into a specific data type and should be taken as a reference to detect any modification in the fields.
  • Refer to the TypeScript documentation to handle the data types.
@carma12 carma12 added the enhancement New feature or request label Nov 2, 2023
Copy link

github-actions bot commented Nov 1, 2024

This issue has not received any attention in 365 days.

@github-actions github-actions bot added the stale This PR/issue is stale and will be closed label Nov 1, 2024
@carma12 carma12 removed the stale This PR/issue is stale and will be closed label Nov 4, 2024
@carma12
Copy link
Collaborator Author

carma12 commented Nov 4, 2024

This was solved long ago when the normalization of the IPA object was introduced.

@carma12 carma12 closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant