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
compose: Add stream privacy decorations in banner box. #20562
base: main
Are you sure you want to change the base?
compose: Add stream privacy decorations in banner box. #20562
Conversation
Hm, that hash looks overly large to me. Could you also:
Thanks! |
Yes, I will adjust the hash size and also add screenshots for mentioned cases. Thanks for reviewing my PR. |
16d3dc7
to
2b1ed24
Compare
Fix vertical alignment and size of stream privacy decoration icons in banner box. Screenshots- |
Thanks for working on this @srdeotarse! I have a review regarding the commits. Also you might want to clean up your commit history, check out - https://zulip.readthedocs.io/en/latest/git/fixing-commits.html. Goodday! 😸 🐋 |
25ab9a7
to
692b6b0
Compare
@raghupalash I have cleaned my commit history and changed commit messages according to commit guidelines. |
Thanks! It looks to me like there's not enough spacing to the left of the lock and globe icons -- there should be as much space as you normally have between words. For the hash, can we try having less space between the # and the name of the stream? |
49d98ff
to
a7add53
Compare
Adjusted spacing to the left of globe and lock icons in banner box. Also, reduced spacing between # and name of stream. |
@srdeotarse Could you add updated screenshots here? Thanks! |
@alya Adding the updated screenshots - Added spacing to the left of lock icon - |
I think you'd want to squash all the commits in one single commit (as they all belong to a single change). This might help https://zulip.readthedocs.io/en/latest/git/fixing-commits.html#fixing-the-last-commit. Feel free to bump a thread on the development-help stream if you can't figure it out. |
static/js/stream_data.js
Outdated
@@ -571,6 +571,14 @@ export function get_stream_privacy_policy(stream_id) { | |||
return stream_privacy_policy_values.private_with_public_history.code; | |||
} | |||
|
|||
export function get_invite_only(stream_name) { |
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.
is_invite_only_by_stream_name
function on line 582 does the exact same thing as this, infact is_invite_only_by_stream_name
was formerly named as get_invite_only
and renamed by Tim on commit 3f4d66109be0265a45713419bbee14394c98414f. So I think we should use the already available helper method instead of making a new one.
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 have removed get_invite_only
function and used is_invite_only_by_stream_name
.
static/js/notifications.js
Outdated
{defaultMessage: "Narrow to {message_recipient}"}, | ||
{message_recipient: get_message_header(message)}, | ||
); | ||
const default_message = "Narrow to"; |
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 think $t
was used here for translation purposes, so I think we should still stick with using it, plus I don't think your implementation requires you to remove it anyways, you can just let that line be and use it in the compose_notification
template as it was used before with your additional changes.
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.
Now I have used $t along with my changes.
5aa4d3a
to
feff36f
Compare
@amanagr perhaps you could review and/or finish up this PR as well? |
feff36f
to
9c4a45a
Compare
I pushed the commits from #20588 here as well so that they are easier to merge and review. |
@srdeotarse please fetch this PR locally and change author of the last 2 commits to yourself. |
9c4a45a
to
2138e27
Compare
We will be using them in multiple places inside compose so it makes sense to have them as a class instead of an id.
a230b3a
to
3b1a5d8
Compare
3b1a5d8
to
f3fd8ac
Compare
@amanagr I have changed the author of the last two commits to me. |
@srdeotarse did you review the changes I made? Do they look good to you? |
@amanagr Yes, separate classes for |
Thanks for updating this! I'm not sure about the globe and lock, but the font on |
Heads up @srdeotarse, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
@srdeotarse , will you have time to address the remaining feedback on this PR, or should @amanagr take over from here? |
Let's just complete the banner icon changes in this PR. |
4ec3636
to
88b200c
Compare
This PR is for issue #19878
Fixes part (1/2) -
Add stream privacy decorations in banner box.
Part (2/2) in another PR as suggested by @alya in Zulip chat https://chat.zulip.org/#narrow/stream/9-issues/topic/missing.20hash.20before.20stream.20name/near/1261461 -
Add stream privacy decorations in compose box.
Testing plan:
Lint test.
Node test.
GIFs or screenshots:
Changes explained:
Earlier sent message notification - "Sent! Your message is outside current narrow. Narrow to test > blue"
Updated sent message notification - "Sent! Your message is outside current narrow. Narrow to #test > blue"