Magickbase / neuron-public-issues

Neuron Issues
6 stars 3 forks source link

Remove the `fully rebuild index` option from confirmation dialog of clear cache #330

Open Keith-CY opened 11 months ago

Keith-CY commented 11 months ago

The fully rebuild index option in the confirmation dialog of clear cache was used to remove data of the independent ckb-indexer before, by checking this, the ckb-indexer will re-index data to fix transaction history.

After ckb-indexer was merged into the ckb full node, fully rebuild index is intended to remove the indexer directory of the full node. This directory is a part of full node, and can be treated as consistent with full node data. If the indexer data is broken, the entire data should be flushed and can be done by Menu => Tools => Clear all synchronized data.

In conclusion, the fully rebuild index became meaningless when the independent ckb-indexer was removed, so the option can be removed now.

Danie0918 commented 11 months ago

Consistent with the light client.

image

Keith-CY commented 11 months ago

Consistent with the light client.

image

If there won't be more options or operations on clear cache, can we simplify the action by removing the dialog? Because this action takes less than 3 secs and doesn't have destructive results.

Danie0918 commented 11 months ago

Checked out some of the software and for clearing the cache, most of them prompt a pop-up window. We can keep the pop-ups, but not use warning language to avoid the psychological burden on the user.

Text:It may take some time to clear the cache and rebuild the data, so please be patient.

image

@Keith-CY @yanguoyu

Keith-CY commented 11 months ago

Checked out some of the software and for clearing the cache, most of them prompt a pop-up window. We can keep the pop-ups, but not use warning language to avoid the psychological burden on the user.

Text:It may take some time to clear the cache and rebuild the data, so please be patient.

image

@Keith-CY @yanguoyu

I would like to know which applications show the alert/dialog on clearing cache. I ask this because I actually haven't seen an application(my daily used ones) does this.

I've tried

Didn't try WeChat because its cache strategy is weird, cannot be recovered after clearing cache

yanguoyu commented 11 months ago

Chrome will open a dialog to show which data will be removed and what effect it has. But it needs dialog because it has many options. Maybe we can add a tooltip for the clear cache button to show what will happen.

image
Danie0918 commented 11 months ago

Checked out some of the software and for clearing the cache, most of them prompt a pop-up window. We can keep the pop-ups, but not use warning language to avoid the psychological burden on the user. Text:It may take some time to clear the cache and rebuild the data, so please be patient. image @Keith-CY @yanguoyu

I would like to know which applications show the alert/dialog on clearing cache. I ask this because I actually haven't seen an application(my daily used ones) does this.

I've tried

  • Telegram
  • Chrome
  • Safari(ask for the duration)
  • NetEaseMusic
  • Apple Music

Didn't try WeChat because its cache strategy is weird, cannot be recovered after clearing cache

Have tried X, Youtube, Instagram, and other apps in the phone, but didn't find the ability to clear cache, so it didn't count.

Chrome has a clear option prompt for the user when selecting, so it makes sense that there is no confirmation box, this can't be used as a reference.

Apps like AE, China Merchants Bank, JD mall, Taobao, etc. will pop up a prompt.

Facebook does not require a prompt.

Danie0918 commented 11 months ago

Of course the list here is not comprehensive enough to conclude 'most', and that needs to be fixed.

However, I still think that there should be a reminder to clear the cache, either in the form of additional text or a pop-up window. This is because the user doesn't know if this action has any effect or not.

Keith-CY commented 11 months ago

Of course the list here is not comprehensive enough to conclude 'most', and that needs to be fixed.

However, I still think that there should be a reminder to clear the cache, either in the form of additional text or a pop-up window. This is because the user doesn't know if this action has any effect or not.

So the point would be if it is worth informing users about what does clear cache do with a dialog/double confirmation.

As mentioned in https://github.com/Magickbase/neuron-public-issues/issues/330#issuecomment-1849583125, telling what will be removed and what will they result in makes sense because data are categorized, what is more important is that these data are unrecoverable.

But in Neuron, what clear cache does is simply refresh data, it does not actually remove something. Speaking of the result, it may take seconds to minutes to refresh the data. IMO, the only valuable information is how long it takes to refresh the data, the time estimation could be appended in label.

Maybe the word clear cache is misleading, it's more like refresh the app, it doesn't actually take something valuable away.

Danie0918 commented 11 months ago

Of course the list here is not comprehensive enough to conclude 'most', and that needs to be fixed. However, I still think that there should be a reminder to clear the cache, either in the form of additional text or a pop-up window. This is because the user doesn't know if this action has any effect or not.

So the point would be if it is worth informing users about what does clear cache do with a dialog/double confirmation.

As mentioned in #330 (comment), telling what will be removed and what will they result in makes sense because data are categorized, what is more important is that these data are unrecoverable.

But in Neuron, what clear cache does is simply refresh data, it does not actually remove something. Speaking of the result, it may take seconds to minutes to refresh the data. IMO, the only valuable information is how long it takes to refresh the data, the time estimation could be appended in label.

Maybe the word clear cache is misleading, it's more like refresh the app, it doesn't actually take something valuable away.

So under what circumstances does it take a user a few minutes to rebuild their data? Does it affect the user in the meantime? @yanguoyu

yanguoyu commented 11 months ago

Of course the list here is not comprehensive enough to conclude 'most', and that needs to be fixed. However, I still think that there should be a reminder to clear the cache, either in the form of additional text or a pop-up window. This is because the user doesn't know if this action has any effect or not.

So the point would be if it is worth informing users about what does clear cache do with a dialog/double confirmation. As mentioned in #330 (comment), telling what will be removed and what will they result in makes sense because data are categorized, what is more important is that these data are unrecoverable. But in Neuron, what clear cache does is simply refresh data, it does not actually remove something. Speaking of the result, it may take seconds to minutes to refresh the data. IMO, the only valuable information is how long it takes to refresh the data, the time estimation could be appended in label. Maybe the word clear cache is misleading, it's more like refresh the app, it doesn't actually take something valuable away.

So under what circumstances does it take a user a few minutes to rebuild their data? Does it affect the user in the meantime? @yanguoyu

The wallet transaction counts decide on the rebuilding time. Before the local data rebuild finishes, the user can not send ckb. For example, the test wallet has about 900 transactions, which will take about 10 minutes.

Danie0918 commented 11 months ago

Of course the list here is not comprehensive enough to conclude 'most', and that needs to be fixed. However, I still think that there should be a reminder to clear the cache, either in the form of additional text or a pop-up window. This is because the user doesn't know if this action has any effect or not.

So the point would be if it is worth informing users about what does clear cache do with a dialog/double confirmation. As mentioned in #330 (comment), telling what will be removed and what will they result in makes sense because data are categorized, what is more important is that these data are unrecoverable. But in Neuron, what clear cache does is simply refresh data, it does not actually remove something. Speaking of the result, it may take seconds to minutes to refresh the data. IMO, the only valuable information is how long it takes to refresh the data, the time estimation could be appended in label. Maybe the word clear cache is misleading, it's more like refresh the app, it doesn't actually take something valuable away.

So under what circumstances does it take a user a few minutes to rebuild their data? Does it affect the user in the meantime? @yanguoyu

The wallet transaction counts decide on the rebuilding time. Before the local data rebuild finishes, the user can not send ckb. For example, the test wallet has about 900 transactions, which will take about 10 minutes.

What happens on the front end is that the synchronization progress is reset and the data is rebuilt to restore the previous progress? image

yanguoyu commented 11 months ago

What happens on the front end is that the synchronization progress is reset and the data is rebuilt to restore the previous progress?

It will grow from 0 to the lastest block number.

yanguoyu commented 11 months ago

Any update about this issue? @Danie0918 Has the interactive been confirmed yet?

Danie0918 commented 11 months ago

Any update about this issue? @Danie0918 Has the interactive been confirmed yet?

It's fine to keep the popup or not, but to make the product cleaner we remove it. And change the button "Clear Cache" to "Refresh". How about that? @ @Keith-CY @yanguoyu

Keith-CY commented 11 months ago

Any update about this issue? @Danie0918 Has the interactive been confirmed yet?

It's fine to keep the popup or not, but to make the product cleaner we remove it. And change the button "Clear Cache" to "Refresh". How about that? @ @Keith-CY @yanguoyu

LGTM

yanguoyu commented 11 months ago

https://github.com/nervosnetwork/neuron/pull/2990