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

Additional code cleanup #95

Open
SorsOps opened this issue Apr 14, 2024 · 0 comments
Open

Additional code cleanup #95

SorsOps opened this issue Apr 14, 2024 · 0 comments

Comments

@SorsOps
Copy link
Contributor

SorsOps commented Apr 14, 2024

Here are a few notes from looking through the front end code of Capacitor. They are not immediately actionable as issues, but it might be good to open a discussion around them

  • Typescript and MDN identifies the usage of the date parsing as not beind correct. We should look into moment or some other time library to handle this.
    Speaking of there are cases where Date objects are being compared against numbers

  • The usage of Redux is very old and should probably be update to use modern semantics

  • There seems to be a lot of prop drilling, especially with the capacitor client, that should rather be handle via a react context to pass it. Filters should rather be placed in the redux state and then saved to local storage on the update action. Similarly the target reference is also drilled into many components

  • The Kustomization component has a ref that is supposed to be used for scrolling into view, its not attached to anything

  • We should be using the newer react syntax with usecallback,etc when possible instead of constantly creating new handler functions

  • For others to contribute, can we get a contribution guide, as well as some utilities like formatting. We will likely need to make the testing more robust as well in that case

  • The APIBackend really doesn't look like it should be a component as its just there to react to the initial render. Can that not rather be triggered on the capacitor client creation once ?

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

No branches or pull requests

1 participant