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

fix: context menu issues #191

Conversation

shafin-deriv
Copy link
Contributor

This pull request focuses on refactoring and improving the error handling and context menu functionalities in the bot-skeleton project. The key changes include refactoring the error_message_map to be a function, updating context menu options to be functions, and enhancing the error handling mechanism.

Error Handling Improvements:

  • Refactored error_message_map to be a function that returns the error messages. This change ensures that the error messages are dynamically generated. [1] [2]
  • Updated error handling in handleError to use the refactored error_message_map function.

Context Menu Refactoring:

  • Changed download_option, deleteBlocksLocaleText, and deleteAllBlocksLocaleText to be functions. This allows for dynamic generation of these options. [1] [2]
  • Updated all_context_menu_options to be a function to ensure the options are dynamically generated. [1] [2]

Miscellaneous Improvements:

  • Simplified the disableStrayBlocks method by removing an unnecessary function and directly using block methods.
  • Enhanced error message emission in various utility functions to use the refactored error_message_map function. [1] [2]

These changes collectively enhance the maintainability and readability of the codebase, ensuring that error messages and context menu options are dynamically and correctly generated.

Copy link

Preview Link: https://shafin-BOT-2608-fix1.bot-65f.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

@rupato-deriv rupato-deriv merged commit 97cb288 into deriv-com:master Dec 11, 2024
3 checks passed
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.

2 participants