Skip to content

feat:Detect new upgrade on launch - #2769

Closed
alexsupa597 wants to merge 1 commit into
nervosnetwork:developfrom
alexsupa597:fix/detect-new-upgrade-on-launch
Closed

feat:Detect new upgrade on launch#2769
alexsupa597 wants to merge 1 commit into
nervosnetwork:developfrom
alexsupa597:fix/detect-new-upgrade-on-launch

Conversation

@alexsupa597

@alexsupa597 alexsupa597 commented Jul 10, 2023

Copy link
Copy Markdown

What problem does this PR solve?

As title.

2023-07-12.17.38.46.mov

Ref: Magickbase/neuron-public-issues#139

Check List

Test

e2e Test

@alexsupa597
alexsupa597 marked this pull request as draft July 10, 2023 08:25
@Danie0918
Danie0918 requested review from Keith-CY, WhiteMinds, devchenyan and yanguoyu and removed request for Keith-CY, WhiteMinds, devchenyan and yanguoyu July 11, 2023 02:33
@alexsupa597
alexsupa597 marked this pull request as ready for review July 12, 2023 09:37
@yanguoyu

yanguoyu commented Jul 13, 2023

Copy link
Copy Markdown
Contributor

It will open a dialog like that if there is no update when I open the setting page. @JeffreyMa597

image

And if there is no update when I open Neuron, but after a while, there exists an update version, when I click check for update on the setting page, the dialog will close after checking the update. @JeffreyMa597

exception.mov

On the other hand, do we only check once when we open Neuron or should we check for updates every some intervals? @Danie0918

Comment thread packages/neuron-ui/src/components/GeneralSetting/index.tsx
Comment thread packages/neuron-ui/src/components/GeneralSetting/index.tsx
Comment thread packages/neuron-ui/src/components/GeneralSetting/generalSetting.module.scss Outdated
Comment thread packages/neuron-ui/src/components/GeneralSetting/index.tsx Outdated
const [searchParams] = useSearchParams()
const [errorMsg, setErrorMsg] = useState('')
const [dialogType, setDialogType] = useState<'' | 'checking' | 'updating' | 'updated'>('')
const [dialogType, setDialogType] = useState<'' | 'checking' | 'checked' | 'updating' | 'updated'>('')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new type checked can be avoided by const isChecked = !!updater.version

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The new type checked can be avoided by const isChecked = !!updater.version

In the logic of the function handleUpdate, there needs to a key to open our installation dialog, and on the other hand, we don't want the installation dialog to open as soon as we enter the page.

Comment thread packages/neuron-ui/src/widgets/Dot/dot.module.scss Outdated
@Keith-CY

Keith-CY commented Jul 13, 2023

Copy link
Copy Markdown
Contributor

It will open a dialog like that if there is no update when I open the setting page. @JeffreyMa597

image And if there is no update when I open Neuron, but after a while, there exists an update version, when I click `check for update` on the setting page, the dialog will close after checking the update. @JeffreyMa597

exception.mov
On the other hand, do we only check once when we open Neuron or should we check for updates every some intervals? @Danie0918

I would suggest checking new updates daily because some may keep Neuron open if it synchronizes slowly. The case may be rare but the cost is low

@Danie0918

Copy link
Copy Markdown

It will open a dialog like that if there is no update when I open the setting page. @JeffreyMa597
image
And if there is no update when I open Neuron, but after a while, there exists an update version, when I click check for update on the setting page, the dialog will close after checking the update. @JeffreyMa597
exception.mov
On the other hand, do we only check once when we open Neuron or should we check for updates every some intervals? @Danie0918

I would suggest checking new updates daily because some may keep Neuron open if it synchronizes slowly. The case may be rare but the cost is low

Yes, it is true that there may be users who keep Neuron open. So here we need to add a daily check in addition to the open check, how about we set it to UTC+0 check?

@alexsupa597

alexsupa597 commented Jul 14, 2023

Copy link
Copy Markdown
Author

/package

Packaging for test is done in 5554741165. @JeffreyMa597

@yanguoyu

Copy link
Copy Markdown
Contributor

how about we set it to UTC+0 check?

If we check it at UTC+0, we should check whether the current is UTC+0 every period of time. How about checking it every period of time?

@Danie0918

Copy link
Copy Markdown

how about we set it to UTC+0 check?

If we check it at UTC+0, we should check whether the current is UTC+0 every period of time. How about checking it every period of time?

OK, set up a 24-hour check.

@yanguoyu

Copy link
Copy Markdown
Contributor

Close with #2783

@yanguoyu yanguoyu closed this Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants