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

fix: update local time option from user settings #951

Merged
merged 5 commits into from
Mar 10, 2023

Conversation

OgDev-01
Copy link
Contributor

@OgDev-01 OgDev-01 commented Mar 5, 2023

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

This PR updates display local time check option in user's settings to reflect previously saved value and also hide timezone ui when this option is false

Related Tickets & Documents

Fixes #946

Mobile & Desktop Screenshots/Recordings

image

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Mar 5, 2023

βœ… Deploy Preview for oss-insights ready!

Name Link
πŸ”¨ Latest commit 32be3ad
πŸ” Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/640b440752bd840008d75780
😎 Deploy Preview https://deploy-preview-951--oss-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 5, 2023

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit 32be3ad
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/640b4407d8bccf000893a34c
😎 Deploy Preview https://deploy-preview-951--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@brandonroberts
Copy link
Contributor

@OgDev-01 @bdougie we are currently using this setting here

https://github.com/open-sauced/insights/blob/beta/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx#L76

That needs to be updated also if we're no longer using this setting

@bdougie
Copy link
Member

bdougie commented Mar 6, 2023

@OgDev-01 @bdougie we are currently using this setting here

If the setting is being used in the UI, it doesn't seem to be not working as intended. Can you confirm @OgDev-01. This was the report from Steven, we may have jumped to a conclusion to remove the feature rather than fix it.

As I read it now, he is stating the Timezone is still displayed but doesn't confirm if local time if not (the intended feature).

image

@OgDev-01
Copy link
Contributor Author

OgDev-01 commented Mar 6, 2023

I just confirmed that the value is being used in the user profile. Just a minor issue with the checkbox because its default value is not populated from the user's data but a local state variable. So when a user updates their profile to show the date and reloads the page, the checkbox remains unchecked even if the settings have been updated

image

The displayLocalTime value in the above screenshot is derived from a local useState variable and I think that's what needs fixing

Copy link
Member

@bdougie bdougie left a comment

Choose a reason for hiding this comment

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

We incorrectly interpreted this request from the user. We should remove timezone from the public profile in addition to local time when this is selected.

Leave the setting available.

@OgDev-01
Copy link
Contributor Author

Option added back and now reflects users previously saved value by defauilt
image

@OgDev-01 OgDev-01 requested a review from bdougie March 10, 2023 14:55
@OgDev-01 OgDev-01 changed the title fix: remove local time option from user settings fix: update local time option from user settings Mar 10, 2023
@OgDev-01 OgDev-01 added needs review PRs that need review from core engineering team and removed requested changes labels Mar 10, 2023
Copy link
Contributor

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

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

LGTM

@brandonroberts brandonroberts added needs-approval and removed needs review PRs that need review from core engineering team labels Mar 10, 2023
Copy link
Contributor

@0-vortex 0-vortex left a comment

Choose a reason for hiding this comment

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

Thought this switch in the user settings would change the display from "bdougie time is 09:00" to "bdougie is -10 hrs behind", otherwise LGTM! πŸ‘

@brandonroberts brandonroberts merged commit c91a513 into beta Mar 10, 2023
@brandonroberts brandonroberts deleted the 946-remove-local-time branch March 10, 2023 17:09
github-actions bot pushed a commit that referenced this pull request Mar 10, 2023
## [1.34.0-beta.9](v1.34.0-beta.8...v1.34.0-beta.9) (2023-03-10)

### πŸ› Bug Fixes

* update local time option from user settings ([#951](#951)) ([c91a513](c91a513))
@github-actions
Copy link
Contributor

πŸŽ‰ This PR is included in version 1.34.0-beta.9 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

github-actions bot pushed a commit that referenced this pull request Mar 10, 2023
## [1.34.0](v1.33.0...v1.34.0) (2023-03-10)

### πŸ• Features

* add custom tooltip to pr list icon ([#962](#962)) ([44fa050](44fa050)), closes [#955](#955)
* add delete highlight implementation ([#963](#963)) ([10575f1](10575f1)), closes [#906](#906)
* implement highlight's permanent link ([#957](#957)) ([78ad176](78ad176)), closes [#895](#895) [#950](#950)
* remove the repo click to filter feature & link to github ([#989](#989)) ([6f62b46](6f62b46)), closes [#983](#983)

### πŸ§‘β€πŸ’» Code Refactoring

* add invalid pull url feedback ([#992](#992)) ([28fe15c](28fe15c)), closes [#961](#961)

### πŸ› Bug Fixes

* add Rust to interests options and combine utility function ([#977](#977)) ([28a5270](28a5270)), closes [#976](#976)
* add skeleton wrapper atom to storybook ([#990](#990)) ([780d345](780d345))
* adds more placeholder ([#971](#971)) ([bf5daa7](bf5daa7))
* adjust input body overlap when editing a highlight ([#991](#991)) ([1512f7d](1512f7d))
* fix pointer-events when closing edit dialog ([#987](#987)) ([df6eb2b](df6eb2b))
* update local time option from user settings ([#951](#951)) ([c91a513](c91a513))
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.34.0-beta.9](open-sauced/app@v1.34.0-beta.8...v1.34.0-beta.9) (2023-03-10)

### πŸ› Bug Fixes

* update local time option from user settings ([#951](open-sauced/app#951)) ([c91a513](open-sauced/app@c91a513))
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.34.0](open-sauced/app@v1.33.0...v1.34.0) (2023-03-10)

### πŸ• Features

* add custom tooltip to pr list icon ([#962](open-sauced/app#962)) ([44fa050](open-sauced/app@44fa050)), closes [#955](open-sauced/app#955)
* add delete highlight implementation ([#963](open-sauced/app#963)) ([10575f1](open-sauced/app@10575f1)), closes [#906](open-sauced/app#906)
* implement highlight's permanent link ([#957](open-sauced/app#957)) ([78ad176](open-sauced/app@78ad176)), closes [#895](open-sauced/app#895) [#950](open-sauced/app#950)
* remove the repo click to filter feature & link to github ([#989](open-sauced/app#989)) ([6f62b46](open-sauced/app@6f62b46)), closes [#983](open-sauced/app#983)

### πŸ§‘β€πŸ’» Code Refactoring

* add invalid pull url feedback ([#992](open-sauced/app#992)) ([28fe15c](open-sauced/app@28fe15c)), closes [#961](open-sauced/app#961)

### πŸ› Bug Fixes

* add Rust to interests options and combine utility function ([#977](open-sauced/app#977)) ([28a5270](open-sauced/app@28a5270)), closes [#976](open-sauced/app#976)
* add skeleton wrapper atom to storybook ([#990](open-sauced/app#990)) ([780d345](open-sauced/app@780d345))
* adds more placeholder ([#971](open-sauced/app#971)) ([bf5daa7](open-sauced/app@bf5daa7))
* adjust input body overlap when editing a highlight ([#991](open-sauced/app#991)) ([1512f7d](open-sauced/app@1512f7d))
* fix pointer-events when closing edit dialog ([#987](open-sauced/app#987)) ([df6eb2b](open-sauced/app@df6eb2b))
* update local time option from user settings ([#951](open-sauced/app#951)) ([c91a513](open-sauced/app@c91a513))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Localtime settings doesn't do anything
5 participants