-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
about_popup: Terminal size added in about popup. #1539
Conversation
Hi @neiljp |
@Swarnim114 Thanks for working on this! Welcome to the project! Visually this looks broadly like I was expecting, though I'd maybe add spaces around the the In terms of the code, it would be cleaner to pass the actual size directly, to avoid the view (and readers of the code) needing to know about the screen. The popup contents don't update dynamically while it is open right now. Thanks for looking at tests, and your current way of keeping them as a separate commit is great for now, though we generally squash minimal code and test changes into one commit in a branch before merging. Note that I don't mean all commits, rather that code additions/changes are kept together with matching tests :) For the next iteration it would be good to get all the checks passing. |
I apologize for the issues with my recent pull request.
Please let me know if there are any further changes you would like me to make. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Swarnim114 Thanks for making the updates 👍
To be clear: I was not expecting a dynamic update of size from you, rather meaning that the lack of that meant that the window size could be passed in :)
The current one remaining failing test refers to isolated commits, which is happening since in at least some cases, one of your commits is fixing a problem in an earlier one. See the README about this; you can use check-branch
to see what is happening locally.
For merging it would be useful to have
- all the commits squashed together (simplifying your test issue above)
- fixing the points I raised inline
- write a good single commit title and text, matching the Zulip-Terminal project style.
@@ -1137,7 +1145,6 @@ def __init__( | |||
|
|||
popup_width, column_widths = self.calculate_table_widths(contents, len(title)) | |||
widgets = self.make_table_with_categories(contents, column_widths) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check your PRs for these unrelated changes.
mocker.Mock() | ||
self.about_view = AboutView( | ||
self.controller, | ||
"About", | ||
zt_version=ZT_VERSION, | ||
server_version=MINIMUM_SUPPORTED_SERVER_VERSION[0], | ||
server_feature_level=MINIMUM_SUPPORTED_SERVER_VERSION[1], | ||
theme_name="zt_dark", | ||
color_depth=256, | ||
notify_enabled=False, | ||
autohide_enabled=False, | ||
maximum_footlinks=3, | ||
exit_confirmation_enabled=False, | ||
transparency_enabled=False, | ||
terminal_size=(80, 24), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new code is not necessary:
- please look up what
mocker
/mock
/Mock()
is used for, if you intend to use it :) self.about_view
is set automatically in the first function (fixture) of this test class, which is used automatically every time, so this is duplicated each time.
@Swarnim114 If you intend to contribute further to Zulip, note that you can use @zulipbot to set/unset the 'PR awaiting update' and 'PR needs review' tags, which can help us with identifying the state of PRs :) |
closes #1536
What does this PR do, and why?
Adds a Terminal size label under the "Detected Environment " in About popup
External discussion & connections
topic
How did you test this?
Self-review checklist for each commit
Visual changes