-
-
Notifications
You must be signed in to change notification settings - Fork 278
Markup timezone-aware time mentions #765
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
It turns out the first-party The |
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 Thanks for working on this - while entering the dates could be tricky in ZT (as discussed on czo), this will be useful to coordinate sync meetings for the rest of this Summer or generally across multiple timezones :)
I did notice that when I edit a date in ZT (possibly when I enter it wrongly first) then it doesn't update on the webapp, but I'm guessing that's an issue with the webapp - we re-fetch the message content and re-render fine from what I can tell.
This isn't a change in behavior, but perhaps we could indicate this is feature level 8/16 and new in v3.0?
zulipterminal/config/symbols.py
Outdated
@@ -7,3 +7,4 @@ | |||
APPLICATION_TITLE_BAR_LINE = '═' | |||
PINNED_STREAMS_DIVIDER = '-' | |||
LIST_TITLE_BAR_LINE = '━' | |||
TIME = '⧗' |
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 may be clearer to some degree, but I quite like the stopwatch type icon, perhaps from having something similar for 'busy' icons in older systems! We could perhaps discuss this in the stream; these all seem like options:
⌚ U+0231A WATCH
⌛ U+0231B HOURGLASS
⏰ U+023F0 ALARM CLOCK
⏱ U+023F1 STOPWATCH
⏳ U+023F3 HOURGLASS WITH FLOWING SAND
⧖ U+029D6 WHITE HOURGLASS
⧗ U+029D7 BLACK HOURGLASS
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.
Out of these, only ⏱, ⧖ and ⧗ seem to not cause the UI distortion bug that we have noticed in urwid
.
However, the emoji ⏱ appears to consume an extra space character. To recoup, I have added an extra space in TIME_MENTION_MARKER
itself, i.e., TIME_MENTION_MARKER = '⏱ '
.
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 looks good for this v1 as per discussion in the stream 👍
31c3a23
to
f48afe0
Compare
@neiljp Thanks for the review. I couldn't reproduce the issue that you mentioned with the web app. It worked well for me. The latest update only has the in-line suggestions incorporated and an extra comment about feature level and server version support. |
@preetmishra This looks good now, just pending:
I introduced some of the time mention ideas/issues in #general>Time mentions. |
This adds python-dateutil and tzlocal to render time mentions in local time zone. The package python-dateutil would be used for parsing ISO time string sent by the server and the package tzlocal would be used for getting user's local time zone.
f48afe0
to
d97caa2
Compare
d97caa2
to
c12d6a2
Compare
@neiljp Thanks for the review. I have made the suggested amendments in the latest update. |
@preetmishra This looks great. I happened to be on WSL when testing this and observed that the stopwatch icon appears much smaller than the other text. Small enough to be mistaken for a point, almost! Is this the same size in other platforms as well? |
@sumanthvrao Thanks for the review. That looks strange. It renders well on my |
This adds support for rendering timezone-aware time mentions which were recently added to the Zulip's markdown suite. See https://zulipchat.com/help/format-your-message-using-markdown#mention-a-time for markdown details. Complimentary additions: * msg_time style in themes.py. * TIME_MENTION_MARKER symbol in symbols.py. Test amended. Fixes zulip#691.
c12d6a2
to
44901d4
Compare
@preetmishra Thanks! Merged with an adjustment to the commit text to indicate the server version/feature-level for time mentions 🎉 |
This adds support for rendering timezone-aware time mentions which were recently added to the Zulip's markdown suite.
(See https://zulipchat.com/help/format-your-message-using-markdown#mention-a-time for markdown details.)
Complimentary additions
msg_time
style in themes.py.TIME_MENTION_MARKER
symbol in symbols.py.Test amended.
Fixes #691.