-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Add Application config menu in About section. #821
Conversation
Hello @zee-bit, it seems like you have referenced #812 in your pull request description, but you have not referenced them in your commit message description(s). When you reference an issue in a commit message, it automatically closes the corresponding issue when the commit is merged. Please run An example of a correctly-formatted commit:
Thank you for your contributions to Zulip! |
Author: zee-bit Date: Wed Nov 4 10:49:49 2020 +0530 Pull Request: WIP: Add Application config menu in About section. Fixes zulip#51
0821c47
to
187a0cd
Compare
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.
@zee-bit Thanks for working on this 👍 The code change looks reasonable and works fine :)
It would be good to fix the tests - you can try running pytest
like I mentioned in the issue. The errors are in the core and popups tests, and it looks like a lot, but you should see that many of these are duplicates. You may find the -x
(fail after any failure) and --lf
(just run recent last-failing tests) options useful.
In addition, while the commit title text is fine, if you take a look at our development notes in the README or browse our git history, you'll see that we have a different style, which it would be great if you could adapt the commit to 👍 I'm not sure why you have the commit summary text you have - we can discuss that or anything else here or in the #zulip-terminal stream if you like.
@@ -28,9 +28,10 @@ class Controller: | |||
the application. | |||
""" | |||
|
|||
def __init__(self, config_file: str, theme: ThemeSpec, | |||
def __init__(self, config_file: str, theme_name: str, theme: ThemeSpec, |
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.
Since you've added an extra parameter to this method, this has broken the tests which expect a different number of parameters.
server_feature_level=self.model.server_feature_level, | ||
theme_name=self.theme_name, color_depth=self.color_depth, | ||
autohide_enabled=self.autohide, | ||
footlink_enabled=self.footlinks_enabled) |
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.
The extra parameters added here also have broken the AboutView
tests, so you'll need to update these too.
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.
I wasn't able to think of a way to access these parameters in test_popups
so, I just hard-coded them. I think for testing purposes this should be okay, as we just need to check the parameters given are fine and with desired types. I also looked at other classes from the test_popup file and I found some similar cases there as well.
409f05a
to
eefeabc
Compare
eefeabc
to
47fdd4b
Compare
@neiljp Thanks for the review and those handy |
@zee-bit Thanks for the contribution 👍 We've discussed adding pytest tips to the docs previously, so I've added some to #820 at https://github.com/neiljp/zulip-terminal/tree/2020-11-03-FAQ-updates#tips-for-working-with-tests-pytest If you have any feedback, please let us know :) |
@neiljp This is a very nice addition. Although the list of commands is more than enough for testing ZT code-changes, it would be better if we could add the link to official |
The about section has now an added menu
Application Configuration
, that lists the options that Zulip-terminal was loaded with. Here is the screenshot of the newAbout
section:Fixes #812