-
Notifications
You must be signed in to change notification settings - Fork 398
status: Add status end time functionality (#1944) #2080
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
base: main
Are you sure you want to change the base?
status: Add status end time functionality (#1944) #2080
Conversation
|
@gnprice, This is the PR for review. I have corrected and cleaned the commit history as well as added screenshots. Please let me know if any changes are needed after review - I'm open to feedback. |
|
Hm, why is the label for the dropdown so small compared to other text? Is that expected? |
|
Note that marking a PR as a draft indicates to maintainers that it's not ready for review, as our contributor docs explain. |
This what was told by maintainers #1269 (comment) |
Surely not let me check what is the cause |
Add the scheduledEndTime field to UserStatusChange to support the scheduled_end_time API parameter. This allows users to set a time at which their status will be automatically cleared by the server. The field is an Option<int?> representing a Unix timestamp in seconds: - OptionNone: no change to the scheduled end time - OptionSome(value): set the scheduled end time to value - OptionSome(null): clear any existing scheduled end time Changes: - Add scheduledEndTime field to UserStatusChange - Add _scheduledEndTimeFromJson parsing method - Update toJson to serialize the field - Update copyWith to include scheduledEndTime
Update the updateStatus API call to include the scheduled_end_time parameter when present in UserStatusChange. This allows the server to store when the user's status should be automatically cleared.
Add localization strings for the status expiration dropdown:
- statusExpirationLabel: "Automatically clear status"
- statusExpirationNever: "Never"
- statusExpirationIn30Minutes: "In 30 minutes"
- statusExpirationIn1Hour: "In 1 hour"
- statusExpirationTodayAtTime: "Today at {time}"
- statusExpirationTomorrow: "Tomorrow"
- statusExpirationCustom: "Custom"
a12aaf4 to
5ac9707
Compare
|
@alya could you check now whether it is right? |
Add a dropdown to the set status page that allows users to set when their status should automatically expire. The dropdown appears below the status suggestions. Options: - Never (default for custom statuses) - In 30 minutes - In 1 hour - Today at 5:00 PM - Tomorrow - Custom (opens date/time picker) When a preset status is selected, the expiration is automatically set based on the status type: - Busy, In a meeting: In 1 hour - Commuting: In 30 minutes - Out sick: Tomorrow - Vacationing: Never - Working remotely, At the office: Today at 5 PM The time format respects the user's 24-hour time preference. The actual clearing of expired statuses happens server-side via the clear_user_status background job. Fixes: zulip#1944
5ac9707 to
cd5aaac
Compare



Screenshots:
Demo is not possible as web//server is not merged yet
Closes #1944