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

Scrolling app window feature added #49

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

RahatAhmed171
Copy link
Contributor

@RahatAhmed171 RahatAhmed171 commented Oct 17, 2024

Issue Referenced

<issue #7 >

Describe the Changes

Using Desktop Assistant, now a user can scroll any app window in three ways through the voice commands below:

  • Scroll (left/right/down/up): It will only do simple scroll to the given direction
  • Scroll to (left/right/down/up): It will only do scroll to the extreme of given direction
  • Start scrolling (left/right/down/up) or stop scrolling : It will start or stop gradual scroll in the given direction
  • Change 1: <src/Assistant.py>

    To detect the scrolling commands and handling the condition when the query is None

    Change 2: <src/Support.py>

    lmplementing the code to scroll

    Change 3: <src/VoiceInterface.py>

    Correcting a typo in the code

    Type of Change

    • New feature (Scrollable app windows)

    Additional Setup Requirements

    To run the added feature you need to install:
    pip install pyautogui
    and
    pip install Pillow

    Neccessary Conditions

    • I have commented my code, particularly in hard-to-understand areas.
    • My changes generate no new warnings.
    • The changes do not involve any Private data leak/reveal.
    • Secrets, if any, are kept hidden via environment file, whose structure has been explained via documentation.

    @vihar-s1 vihar-s1 added the hacktoberfest issue available under Hacktoberfest Event. label Oct 17, 2024
    @vihar-s1 vihar-s1 self-requested a review October 17, 2024 20:40
    @vihar-s1
    Copy link
    Owner

    vihar-s1 commented Oct 17, 2024

    The code seems to be fine but there are some formatting inconsistencies like redundant blank lines after if statement and more. Clear those issues and I will merge this PR. I am marking some of the inconsistencies in Assistant.py for reference.

    src/Assistant.py Outdated
    import Support
    from VoiceInterface import VoiceInterface

    LISTENING_ERROR = "Say that again please..."


    Copy link
    Owner

    Choose a reason for hiding this comment

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

    two line gap is enough...no need for having three blank lines

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    Kept only two blank lines.

    src/Assistant.py Outdated
    @@ -40,15 +43,17 @@ def listen_for_query(self) -> str:


    def execute_query(self, query: str) -> None:

    Copy link
    Owner

    Choose a reason for hiding this comment

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

    redundant blank line

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    removed the lines

    src/Assistant.py Outdated
    if scroll_thread is not None:
    Support.stop_scrolling()


    Copy link
    Owner

    Choose a reason for hiding this comment

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

    unnecessary gap between two elif blocks

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    removed the blank lines. I also went the through the Support.py file then identified and removed some redundant/blank lines too.

    @vihar-s1 vihar-s1 enabled auto-merge (squash) October 25, 2024 16:15
    @vihar-s1
    Copy link
    Owner

    give @RahatAhmed171 100 points

    @vihar-s1 vihar-s1 merged commit 330530d into vihar-s1:main Oct 25, 2024
    3 checks passed
    @vihar-s1
    Copy link
    Owner

    Ping me once on discord if points are not reflected on slop leaderboard

    @RahatAhmed171 RahatAhmed171 deleted the scrollingapp branch October 26, 2024 13:27
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    hacktoberfest issue available under Hacktoberfest Event.
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants