- Notifications
You must be signed in to change notification settings - Fork929
feat: Add support for update checks and notifications#4810
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
14 commits Select commitHold shift + click to select a range
cc28c1b
feat: Add support for checking for updates
mafredric163af8
wip(site): Add support for informing of updates
mafredrie9ed0b7
Add /api/v2/updatecheck to noauthorize list
mafredri64ad0f5
Fix edge case where update check has never succeeded
mafredri0238d5a
Fix logging
mafredri9e1ea9e
Use AlertBanner for coder version notice
mafredri979ff80
Update golden files
mafredrib80de3c
Fix margins, improve alert banner and add stories
mafredri81d11dd
Add authorization, dismissal and fetch after login
mafredri392d06e
Apply suggestions from code review
mafredriad38c3b
Add forgotten UpdateCheckBanner.stories.tsx
mafredri1c9dbc1
fix(api): Amend PR comments
mafredri49a7bfc
fix(site): Always show prefix for update check errors, remove as const
mafredri44f6475
fix(site): Add jest tests for UpdateCheckBanner
mafredriFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Add forgotten UpdateCheckBanner.stories.tsx
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitad38c3b7894ee59664dd0681b61688ab3370120c
There are no files selected for viewing
34 changes: 34 additions & 0 deletionssite/src/components/UpdateCheckBanner/UpdateCheckBanner.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ComponentMeta, Story } from "@storybook/react" | ||
import { UpdateCheckBanner, UpdateCheckBannerProps } from "./UpdateCheckBanner" | ||
export default { | ||
title: "components/UpdateCheckBanner", | ||
component: UpdateCheckBanner, | ||
} as ComponentMeta<typeof UpdateCheckBanner> | ||
const Template: Story<UpdateCheckBannerProps> = (args) => ( | ||
<UpdateCheckBanner {...args} /> | ||
) | ||
export const UpdateAvailable = Template.bind({}) | ||
UpdateAvailable.args = { | ||
updateCheck: { | ||
current: false, | ||
version: "v0.12.9", | ||
url: "https://github.com/coder/coder/releases/tag/v0.12.9", | ||
}, | ||
} | ||
export const NoUpdateAvailable = Template.bind({}) | ||
NoUpdateAvailable.args = { | ||
updateCheck: { | ||
current: true, | ||
version: "v0.12.9", | ||
url: "https://github.com/coder/coder/releases/tag/v0.12.9", | ||
}, | ||
} | ||
export const UpdateCheckError = Template.bind({}) | ||
UpdateCheckError.args = { | ||
error: new Error("Coder update check failed."), | ||
} |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.