Skip to content
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

Introduce application-wide time format setting #770

Closed
preetmishra opened this issue Aug 11, 2020 · 3 comments
Closed

Introduce application-wide time format setting #770

preetmishra opened this issue Aug 11, 2020 · 3 comments
Labels
enhancement New feature or request further discussion required Discuss this on #zulip-terminal on chat.zulip.org
Milestone

Comments

@preetmishra
Copy link
Member

Currently, we default to the 24-hour time format in Zulip Terminal. It would be reasonable to introduce an application-wide setting to select between the 12-hour and the 24-hour time format.

For v1, we might want to introduce it as a custom zuliprc setting. (In the web app, it is shown under Settings > Display settings.)

Lastly, we would want to discuss which time format should be the new default.

@preetmishra preetmishra added enhancement New feature or request further discussion required Discuss this on #zulip-terminal on chat.zulip.org labels Aug 11, 2020
@neiljp
Copy link
Collaborator

neiljp commented Aug 11, 2020

Note that if we can use the API to fetch user settings then we could use that as a reasonable default.

@aryanshridhar
Copy link
Member

Hey , @neiljp . I looked into the Zulip Api documentation (https://zulip.com/api/get-user) , but I don't see a response type which signifies the user's time-format setting ( Maybe its stored in client side ). Is there something I am missing out ?

@neiljp
Copy link
Collaborator

neiljp commented Oct 27, 2020

@aryanshridhar I believe this is not currently documented in the server. Based on reading events.py and urls.py in the server, if we were to take the server-fetched approach, we could add an extra string to the initial register call to fetch display settings and then also a handler to update them as events are received - other data/events work in a similar way if you want to look at that. Then we would render based on the value.

mkp6781 added a commit to mkp6781/zulip-terminal that referenced this issue Jan 6, 2021
Initial time format settings are fetched during initial register call.
Event handler enables update of this setting as events arerecieved
from the server.

Fixes zulip#770
mkp6781 added a commit to mkp6781/zulip-terminal that referenced this issue Feb 12, 2021
Initial time format settings are fetched during initial register call.
Event handler enables update of this setting as events are recieved
from the server.

Fixes zulip#770
mkp6781 added a commit to mkp6781/zulip-terminal that referenced this issue Feb 19, 2021
Initial time format settings are fetched during initial register call.
Event handler enables update of this setting as events are recieved
from the server.

Tests added.

Fixes zulip#770
mkp6781 added a commit to mkp6781/zulip-terminal that referenced this issue Feb 20, 2021
Initial time format settings are fetched during initial register call.
Event handler enables update of this setting as events are recieved
from the server.

Tests added.

Fixes zulip#770
@neiljp neiljp closed this as completed in 0608209 Feb 21, 2021
@neiljp neiljp added this to the Next Release milestone Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request further discussion required Discuss this on #zulip-terminal on chat.zulip.org
Projects
None yet
3 participants