Skip to content
This repository was archived by the owner on Apr 10, 2023. It is now read-only.

Update Available Notifications #65

Merged
merged 9 commits into from
Feb 2, 2023
Merged

Update Available Notifications #65

merged 9 commits into from
Feb 2, 2023

Conversation

markphelps
Copy link
Contributor

@markphelps markphelps commented Feb 1, 2023

Fixes: FLI-91

Blocked By: flipt-io/flipt#1308

  • Shows bell icon if update available
  • Clicking on bell brings up notification with link to new version
  • Bell icon pulses on first visit with new update, after dismall pulse goes away until browser is closed (using sessionStorage)
  • Refactored useStorage hook to support both localStorage and sessionStorage and made them their own hooks

With Update Available

Kapture 2023-02-01 at 11 44 36

Without Update Available

CleanShot 2023-02-01 at 11 45 32@2x

@markphelps markphelps requested a review from a team as a code owner February 1, 2023 16:58
useEffect(() => {
getInfo()
.then((info: Info) => {
setInfo(info);
Copy link
Contributor Author

@markphelps markphelps Feb 1, 2023

Choose a reason for hiding this comment

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

TODO: we should prob move this into it's own InfoContext or other storage mechanism since its now used by two components (this one and Footer)

Copy link
Contributor

Choose a reason for hiding this comment

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

Great thinking, agreed

Copy link
Contributor

@darinmclain darinmclain left a comment

Choose a reason for hiding this comment

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

LGTM!

@markphelps markphelps merged commit 8ec6676 into main Feb 2, 2023
@markphelps markphelps deleted the notifications branch February 2, 2023 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants