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

multi-level selection support #786

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Sep 9, 2024

🚀 This description was created by Ellipsis for commit 825145c

Summary:

This pull request adds multi-level dropdown selection support by introducing new classes and functions, updating existing logic, and modifying templates for enhanced dropdown interaction.

Key points:

  • Added CustomSingleSelectResult class in skyvern/webeye/actions/handler.py to manage dropdown selection results.
  • Introduced sequentially_select_from_dropdown function in skyvern/webeye/actions/handler.py for handling multi-level dropdown selections.
  • Modified select_from_dropdown function in skyvern/webeye/actions/handler.py to support multi-level selection logic.
  • Updated opened-dropdown-confirm.j2 template to include reasoning and elements for dropdown confirmation.
  • Added is_ul_or_listbox_element_factory and check_id_in_dict_factory functions in skyvern/webeye/actions/handler.py for element identification.
  • Enhanced clean_and_remove_element_tree_factory to accept multiple check functions in skyvern/webeye/actions/handler.py.
  • Updated json_to_html and trim_element_tree functions in skyvern/webeye/scraper/scraper.py to support new attributes and trimming logic.
  • Added try_to_find_potential_scrollable_element function in skyvern/webeye/actions/handler.py to identify scrollable elements within dropdowns.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 825145c in 27 seconds

More details
  • Looked at 657 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. skyvern/webeye/scraper/scraper.py:87
  • Draft comment:
    Ensure need_skyvern_attrs is consistently used across all json_to_html calls to avoid inconsistent behavior.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The function json_to_html is used in multiple places, and the parameter need_skyvern_attrs is used to determine whether to include certain attributes. This parameter is not passed in some calls, which might lead to inconsistent behavior.
2. skyvern/webeye/scraper/scraper.py:529
  • Draft comment:
    Good refactoring by using trim_element within trim_element_tree for code reuse and maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The trim_element_tree function is used in multiple places, and the logic for trimming elements is encapsulated in trim_element. This refactoring is good for code reuse and maintainability.
3. skyvern/webeye/actions/handler.py:145
  • Draft comment:
    Refactored remove_exist_elements to use CheckExistIDFunc instead of DomUtil for improved flexibility and reusability.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The remove_exist_elements function has been refactored to use a CheckExistIDFunc instead of a DomUtil object. This change improves the function's flexibility and reusability.

Workflow ID: wflow_8rUalWxeV3YSaXur


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

MAKE SURE YOU OUTPUT VALID JSON. No text before or after JSON, no trailing commas, no comments (//), no unnecessary quotes, etc.

Reply in JSON format with the following keys:
{
"reasoning": str, // the reason why it's a dropdown menu or not a dropdown menu
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove comments from JSON template as JSON does not support comments.

@LawyZheng LawyZheng merged commit d7cb4f3 into main Sep 9, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/multi-level-selection-support branch September 9, 2024 03:34
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.

1 participant