-
-
Notifications
You must be signed in to change notification settings - Fork 278
Fetch and indicate server version and feature level #653
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
Conversation
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.
@preetmishra I think this could be a useful in-app feature 👍
I think it would be useful to split changes related to adding a simple UI, from ones which acquire/access extra information and extend that UI.
If you have other thoughts on what to include in an 'about' popup then we could include it here too.
I know we need to pick a key to use for this, I'm just aware that we need to avoid webapp keys (for compatibility) and also adding extra keys which we may later find useful to apply to other UI elements.
One point I noticed was that focus by default was on the last row of the popup; However the up/down arrows didn't work. This makes me wonder if we don't to remove marking anything as 'focus' in this popup, since we may not show enough data for it to be scrollable at any point. |
@sumanthvrao The keys don't work because there's nothing to scroll in the about popup; they will work fine if there's more data. Were you referring to
|
a2d9583
to
129dac4
Compare
@sumanthvrao @neiljp Thank you for the reviews and the suggestions. I have incorporated the suggestions and split the commits into two parts:
I went with |
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.
@preetmishra This is looking good, though possibly the split could be tidier; that said, if we did merge the other popup PR first then this would be simpler as the common code would be present already.
meta ?
seems like a reasonable key that isn't going to be needed for other uses, and we could always move it around. My minor concerns are:
- meta is not clearly 'alt' (which seems to be the case on most systems?), and also applies to other keys in the help menu
meta ?
is reallymeta shift /
(at least here), which is not to say that we should have it that way as it may well depend on keyboard layout, but it's not necessarily clear that two modifiers are needed
@neiljp Thanks for the review and the in-line suggestions. I have split the commits to tidy up the PR and incorporated the suggestion that you left. I have added a refactor commit before the commit that fetches zulip version and feature level. It was necessary to support the The I have left the trigger key to be Meta + ? as per our discussion at #zulip-terminal > Hotkey for about menu. |
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.
@preetmishra I merged the first two commits as one squashed commit, so we now have an about menu 🎉
For the others:
- is the test refactoring necessary for the fixture parametrization? If so, that seems odd and potentially worrisome?
- While I like the idea of parametrizing across server versions, just adding one extra version adds ~300 (?) tests - and more feature levels will add maybe that many per level? I'm wondering if we can explore other approaches as that seems like this could be a problem. Also, should we primarily work with
feature_level
rather than version?
Other than thinking how to test this, this is pretty straightforward to merge! We could just merge the test cases and iterate, but those ~300 extra tests concern me.
@neiljp Thanks for the review and the merge. 🎉 To avoid adding extra tests, I have hard-coded the value in Moreover, I have moved the server version and the feature level under 'Server' category. Furthermore, since the refactor commit isn't necessary anymore, I have moved it to the end. We could shelve it if you'd like to address it after reactions test refactor work. |
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.
@preetmishra This is looking good. I think if we set up the list of supported versions then testing the model with just the minimum (tuple) for now would be fine.
@neiljp Thanks for the review and the comments on CZO. I have updated the PR with |
a9822b3
to
9ae848f
Compare
Updated with the comment about |
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.
@preetmishra This looks almost good to go, and would have been more straightforward except for our discussion of a way to introduce server versions/feature-levels and changes which could accompany that.
@kaustubh-nair Do you have any thoughts on the supported-version structures? We can iterate, but obviously if they look insufficient in the first instance for what you might have had in mind, it'd be good to hear what you think.
@neiljp Thanks for the review. I have made the amendments accordingly. |
This looks good for the use case that I need it for 🎉 |
This adds SUPPORTED_SERVER_VERSIONS and MINIMUM_SUPPORTED_SERVER_VERSION in version.py. Additionally, this adds a note in the README to specify the minimum supported server version. The intent is to use these versions for testing and potentially provide feedback to the user if the server version is below the MINIMUM_SUPPORTED_SERVER_VERSION.
This adds zulip_version among the requested event_types to fetch zulip_version and zulip_feature_level via POST /register API endpoint. Feature level, a monotonic integer (starts from 1), is introduced in Zulip 3.0 and is always returned in POST /register from feature level 3 along with zulip version. However, it is likely that some servers might choose to not adhere to feature level. Test amended. Fixes zulip#616 partially.
I have updated the references to |
The server version and the feature level are shown under a 'Server' category. Note that the feature level is only shown when it is present. For testing, this also introduces zulip_version fixture to test different components based on the server version and the feature level. Test amended and added. Fixes zulip#616.
@preetmishra Thanks for working on this! I just merged this manually with a minor change to a commit title and moving the README change to a more prominent position - thanks for persevering, since I know this was more than we originally intended for this PR. Anyhow, merged as last 3 commits ending at d9dc81c 🎉 |
This introduces
AboutView
to show server version and feature level within the app and makes other related amendments.Fixes #616.