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

Minimizing Browser Window #341

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

soumyashaw
Copy link

Issue that this pull request solves

Closes: #295

Proposed changes

Minimizes the Browser window for Terminal Chat mode

Types of changes

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (Documentation content changed)
  • Other (please describe):

Checklist

Put an x in the boxes that apply

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Other information

Tested the working on my system (Windows)

Copy link
Member

@rpotter12 rpotter12 left a comment

Choose a reason for hiding this comment

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

@soumyashaw minimizing browser window should be in every option. currently by this PR it will minimize the browser in chatting only.

@rpotter12 rpotter12 added gssoc21 easy easy issue labels May 17, 2020
@soumyashaw
Copy link
Author

Should I remove the whitespaces?

@rpotter12
Copy link
Member

@soumyashaw Remove whitespaces and resolve the conflicts

@soumyashaw
Copy link
Author

I don't understand the change needed. Could you give some insight @rpotter12

@rpotter12
Copy link
Member

I don't understand the change needed. Could you give some insight @rpotter12

To make code easily readable we follow some basic rules to write a good code like we use PEP8 to do it.

Copy link
Member

@rpotter12 rpotter12 left a comment

Choose a reason for hiding this comment

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

@soumyashaw Instead of adding same code in each file, create a function in browser_config.py file and add the code in that function and call that function in each file.

Adding same type of code in each decreases the code quality.

@rpotter12
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- wplay/terminal_chat.py  1
         

See the complete overview on Codacy

@soumyashaw
Copy link
Author

The changes you suggested are done.

@soumyashaw
Copy link
Author

@rpotter12

@rpotter12
Copy link
Member

@soumyashaw I need to test it first. :)

Copy link
Member

@rpotter12 rpotter12 left a comment

Choose a reason for hiding this comment

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

@soumyashaw win32gui and win32con are only compatible with windows. Try to find the solution which can be executable in all the platforms.

@xandao-dev
Copy link
Collaborator

This is not a good approach, in addition to being for windows only adds additional libraries. Pyppeteer has an option to hide the browser, the "headless" parameter must be set in this function below. Changes in the session manager will also be necessary, since it is necessary to show the browser when the user is not logged in.

https://github.com/rpotter12/whatsapp-play/blob/1d3103001b66c77e9aee82a386e224752ada6d05/wplay/utils/browser_config.py#L124

@soumyashaw
Copy link
Author

I saw that part in Pyppeteer and that's why didn't use that as it won't serve the purpose.

@rpotter12
Copy link
Member

I saw that part in Pyppeteer and that's why didn't use that as it won't serve the purpose.

@soumyashaw Implement that solution which can be run in all platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy easy issue gssoc21
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide Chrome window?
3 participants