-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Migrate UI & Docs from Private to Direct phrasing #1322
Conversation
Hello @zulip/server-hotkeys members, this pull request was labeled with the "area: hotkeys" label, so you may want to check it out! |
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.
@theViz343 Thanks for looking into this 👍 Is there anything else visible to change?
I let a few comments inline. More generally, your commit message structure looks fine. However, there's no need to reference the issue in every commit, only the last one, and it can be on the final review - see the related notices that it gave in the issue already :)
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 PR looks good to me at first glance. Apart from Neil's suggestions, I have left a comment for a minor modification.
As for hotkeys.md
and developer-file-overview.md
, as Neil has mentioned, it is better to have them in separate commits later, as they are not updated manually, instead, scripts are used for this purpose.
2224bf8
to
0623252
Compare
Hello @theViz343, it seems like you have referenced #1288 in your pull request description, but you have not referenced them in your commit message description(s). Referencing an issue in a commit message automatically closes the corresponding issue when the commit is merged, which makes the issue tracker easier to manage. Please run An example of a correctly-formatted commit:
To learn how to write a great commit message, please refer to our guide. |
I've made the changes requested. I've also added the test for the PM button text. It it looks good, I can add similar tests for the other sidebar buttons. |
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.
@theViz343 Mainly just feedback on the commit structure:
-
Please do squash those two commits together; it's not going to pass CI (or tools/check-branch) otherwise, and one change is directly associated with the other. If it's just the one doc file, you can refer to it more specifically as 'hotkeys' in the commit title prefix.
-
For the title shortening in developer-file-overview, that's not a rename, so it can be in a separate commit. "It also" suggests it's worthy of being separate, and it makes it clearer to tell what's happening from the commit titles. It would also be good as a commit directly before the buttons/docs commit, as you have now but more explicit in the title text.
-
If we're introducing a new test, it's good to keep it as a standalone commit before the associated code is changed. For your previous iteration of the code change, such a test would have hopefully both passed for the existing code, and then failed with the new version. Ordering the commits like that ensures that's the case.
-
Reviewing the commits again, the README change is a change to a 'prose' document (ie. not generated), so since small would fit with the general docs/ commit.
Re the test, this seems like two or more tests which can be split fairly easily:
- The expected text, and maybe hotkey for this button; I say maybe since I'm not sure if we gain from specifying the hotkey, since it comes from the hotkeys dynamically
- Ensuring a style for the buttons generally, in terms of the elements of the regex. While a regex is fine, it doesn't tell you how the text is incorrect, or which one is wrong, if it fails multiple elements. Separate checks for the elements you list in the regex comment would individually fail and show the assert condition, telling you specifically what was wrong.
For this PR let's leave it for PMButton only, to focus on the transition, though based on how the latter tests would be near-identical for other buttons, the code similarity also suggests we could refactor at least some of those buttons into one class.
I agree with the hotkey not being useful to check here. Checking just the text should be fine.
So, I think checking the length of the button_text (since it remains the same) should be sufficient, apart from checking the expected text. This will catch the most common errors, I suppose. I've also moved the commit with the notifications change before any doc change commit to keep UI and doc changes separate. |
0623252
to
d6bf26d
Compare
This commit renames 'private messages' to 'direct messages' and 'private conversation' to 'direct message conversation' in narrow titles, as well as when a user attempts to edit another user's direct message. Tests updated.
This commit renames 'Private messages' to 'Direct messages' in the left sidebar menu button. Test updated.
This commit replaces the use of 'private' with 'direct' in notifications when the user sets the 'Include content of direct messages in desktop notifications' setting to False. Test updated.
d6bf26d
to
9e066bc
Compare
This commit renames 'private messages' to 'direct messages' in the keys source file, affecting the in-application help menu. hotkeys.md regenerated using lint-hotkeys.
This commit replaces the use of 'private' with 'direct' in the docs. It also removes instances of PM (abbreviation for private message) following the change in zulip#1293.
The maximum docstring length was reduced in 5745272, but the overview file was not regenerated at that point, so the column width in the document was not updated. Therefore, this regenerates the file to make updating of docstrings clearer later.
developer-file-overview.md regenerated using lint-docstring.
@theViz343 Thanks for the slight tidy 👍 I rephrased the commit text slightly, but otherwise this is as you wrote it, and I'll merge it now - thanks! 🎉 |
What does this PR do?
This PR replaces instances of 'private' with 'direct', in the context of private messages, in the UI and relevant docs.
This is in line with the design decision to rename private message (PM) to direct message (DM).
Fixes #1288
CZO Discussion Link
Tested?
Commit flow
Notes & Questions