Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add timezone to user profile #12967

Closed
wants to merge 18 commits into from
Closed

Conversation

Half-Shot
Copy link
Contributor

@Half-Shot Half-Shot commented Sep 6, 2024

Implements MSC4175
Depends on matrix-org/matrix-js-sdk#4391

Design provided at https://www.figma.com/design/gpxHFDTNK796n84r1ZxYG2?node-id=1360-28954#941702635

This provides a basic presentation of a user's current time & timezone on their profile. It also adds a setting to allow publishing the time.

Timezone in user profile

image

Timezone publish setting

image

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

@Half-Shot
Copy link
Contributor Author

@daniellekirkwood tagged as discussed. I think this just needs some thoughts about how best to fit it into the profile view. I'm happy to wait if existing designs are in the process of landing, I can just rebase.

@Half-Shot Half-Shot added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Sep 9, 2024
@Half-Shot Half-Shot marked this pull request as ready for review September 9, 2024 16:18
@Half-Shot Half-Shot requested a review from a team as a code owner September 9, 2024 16:18
Copy link

@daniellekirkwood daniellekirkwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise looks good! I think your disable-line needs to be on the preceding line.

/**
* Fetch a user's delclared timezone through their profile, and return
* a friendly string of the current time for that user. This will keep
* in sync with the current time, and will be refreshed once a minute.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating feels like it might be overkill here, especially since it doesn't look like there's any UI to suggest it's dynamically refreshing, but seems fine I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just felt weird to me that the time would slowly drift out of date if you left the user open for a minute. I suppose it's an incredibly minor thing, but also I don't think it's a costly rerender.

@Half-Shot
Copy link
Contributor Author

Closing in favor of element-hq/matrix-react-sdk#20

@Half-Shot Half-Shot closed this Sep 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants