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

refactor(frontend): settings and friends #1400

Merged
merged 7 commits into from Apr 29, 2024

Conversation

amanape
Copy link
Collaborator

@amanape amanape commented Apr 27, 2024

Summary

This PR tests, rebuilds, and refactors code related to anything Settings so that it will be easier to work with in future updates. It also introduces a new feature of disabling modal actions.

Motivation

Extending settings proved to be a more annoying task than it should be (#1319) because of its current state. Responsibilities were mixed between functions, and some were outdated (settings Redux store).

Main Changes

  • Move API handlers to dedicated folder
  • Move initializeAgent to dedicated service folder
    • Modify function definition (initializeAgent(settings: Settings): void)
  • Rebuild settings API
  • Extend <BaseModal/> to support disabling actions
  • Retire Redux settings slice

Improvements

  • Everything modified has complementary tests (TDD except for initializeAgent)
  • Settings type is no longer a generic record type
  • Disable save button if no settings have been changed or if empty value
  • Separation of concerns/responsibilities
  • JSDoc on new/updated service functions
  • Settings is easier to read/extend

@rbren
Copy link
Collaborator

rbren commented Apr 27, 2024

This looks much cleaner! I'll wait for some FE folks to look but LGTM overall

Copy link
Collaborator

@yimothysu yimothysu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@neubig neubig merged commit 8954855 into OpenDevin:main Apr 29, 2024
16 checks passed
@amanape amanape deleted the refactor/settings-and-friends branch April 29, 2024 05:35
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

Successfully merging this pull request may close these issues.

None yet

5 participants