Skip to content

Improve UX of `Clear status after` field

Follow-up from !96800 (comment 1090313115)

The UX for the Clear status after field when setting your status is a little confusing. When you choose a value and then submit the form a message is added below the dropdown that says Your status resets on 2022-09-08 00:41:43 UTC. and the dropdown is changed back to Never. So then when the user comes back it isn't clear if your status will clear on the date or if it will never clear.

Proposed solution

  • User sees Clear status after dropdown with options as they are today
  • User selects an option
  • If the user returns via the update status option they see a date or time as the dropdown text
    • If the user chose a time (30 min, 3 hours, 8 hours) they see a time for example 3:30 pm EDT
    • If the user chose a date (1 day, ..., 30 days) they see a date for example Oct 2, 2022
    • This is just the display in the dropdown, the options would still be the same as in we don't need an option that displays Oct 2, 2022.
  • We could get rid of the helper text Your status resets on 2022-09-16 15:18:24 UTC.

image

Availability and Testing

  • No new E2E tests or updates needed at this time. Please update unit and integration tests as necessary.
  • Consider adding a feature spec to spec/features/profiles/user_edit_profile_spec.rb within the user status context that tests the following cases:
    • User chooses a time option, closes the modal, revisits the modal, and sees correct time populated in the dropdown
      • Keep in mind edge cases, such as a time option that overlaps to the next day
    • User chooses a date option, closes the modal, revisits the modal, and sees correct date populated in the dropdown
Edited by Valerie Burton