glossarist / glossarist-desktop

Glossarist Desktop
https://www.glossarist.org
GNU General Public License v3.0
4 stars 6 forks source link

When there is data that needs to be synced, the "sync" button should be highlighted #75

Open ronaldtse opened 3 years ago

ronaldtse commented 3 years ago

When a CR is created/proposed, there is a data change compared to the original data repository.

The user may forget to press the "sync" button to upload the changes (and fetch new changes).

Some indication should provided so the user is reminded to perform the sync.

strogonoff commented 3 years ago

The documentation tries to be explicit (might not be fully ported to updated Glossarist.org yet) that sync button is to be used often.

We do not perform repository-related operations in background, this includes checking filesystem for files that were not committed/not staged/not added to Git at all yet.

That said, we might implement a shortcut where we don’t check the repo for “actual” uncommitted files all the time, but simply highlight the button after user makes a change that we can suspect might’ve caused a commit to happen. (I.e. do this purely on frontend side without a trip to the main thread.)

(The actual behavior would thus be not “when there is data that needs to be synced”, but something along the lines of “after we catch user making a change ‘eligible for sync’”.)

ronaldtse commented 3 years ago

I wonder if a global variable could already work, meaning that if an action (new change, CR staged) has happened, we can highlight the button until it has been run. If the application is closed and re-opened, on re-open the app can fetch the repo status once.