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 dashboards-search-relevance plugin #191

Open
noCharger opened this issue Apr 19, 2023 · 5 comments
Open

Refactor dashboards-search-relevance plugin #191

noCharger opened this issue Apr 19, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@noCharger
Copy link
Collaborator

Refactoring the dashboards-search-relevance plugin can provide several benefits, making the application more maintainable, scalable, and efficient. The primary purposes for refactoring the plugin are:

  1. Improve code readability and maintainability: Refactoring helps in simplifying complex code structures and making them more readable. This ensures that other contributers can easily understand and maintain the codebase in the long run.

  2. Enhance performance and optimization: By refactoring, contributers can identify and eliminate bugs, optimize code, and improve the app's overall performance. This ensures a better user experience and faster loading times.

  3. Increase reusability and modularity and facilitate easier testing: Breaking down large components into smaller, reusable components enhances the modularity of the application. This makes it easier to manage, test, and scale the application in the future. For example, this index.ts has several functions that cannot be easily unit tested until they are modulated.

  4. Adhere to best practices and design patterns: Refactoring helps in aligning the codebase with industry best practices and widely accepted design patterns. This ensures consistency, reduces the chances of bugs, and makes the codebase easier to work with for other contributers .

Overall, refactoring the dashboards-search-relevance app aims to make the application more efficient, maintainable, and scalable, providing a better experience for both developers and users.

@macohen
Copy link
Collaborator

macohen commented Apr 20, 2023

Can you break this down into specifics? I see that the example of index.ts makes sense to modularize, but what else? Why? Creating PRs with specific refactorings can work, too.

@macohen
Copy link
Collaborator

macohen commented May 2, 2023

@sejli since you're going to be working in this plugin (#195 and #196), can you take a look at some of these issues?

These are much appreciated general guidelines, but if we can turn the big ones into specific tasks then making some of these refactorings an active part of development would be good.

@macohen macohen moved this from 🆕 New to Now(This Quarter) in Search Project Board May 2, 2023
@macohen
Copy link
Collaborator

macohen commented May 30, 2023

Can we create a checklist here of items to focus on while in the code? There's only one concrete task I see here. I'm create an issue from that one.

@noCharger
Copy link
Collaborator Author

One more factor work: reduce the scope of using global context https://github.com/opensearch-project/dashboards-search-relevance/pull/267/files#r1312006788

@macohen
Copy link
Collaborator

macohen commented Sep 21, 2023

In the interest of clarity, can @sejli break this out into targeted issues that can be completed independently?

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
Status: Now(This Quarter)
Development

No branches or pull requests

2 participants