Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework (work in progress) #39

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

rework (work in progress) #39

wants to merge 6 commits into from

Conversation

k2s
Copy link
Contributor

@k2s k2s commented Aug 6, 2023

The current state of the released plugin is very, hmmm ... unfinished.

Goal of this pull request is to modify this plugin for my personal needs.
After some review, discussion and improvement it could be merged. If it is too radical change, then other plugin could be published.

Current changes:

  • dev: filter console log with [plugin-git]
  • dev: logDebug, logInfo, logWarn
  • fix switching of graph in current LogSeq instance
  • fix use correct git folder when using multiple LogSeq instance
  • change the plugin has to be enabled on graph (it will initialize GIT for the graph if enabled, setting :plugin-git/enabled true) (BREAKING)
  • add multiple states to status icon, support for loading
  • fix HIDE_POPUP_STYLE
  • add 'plugin disabled' state (gray color) with action to enable plugin
  • add action to disable plugin (will only remove git operation from plugin, will not change anything git config)
  • add Synchronization action - it should safelly execute commit->pull rebase->push (merge conflicts need to be solved manually)
  • change shortcut mapping Mod+S to Synchronization action
  • change shortcut mapping Mod+Alt+S to Commit action
  • change use theme colors for status icon
  • MISSING following actions were not reworked for now: commit&push, push, checkout, pull, pull rebase (BREAKING)
  • MISSING state is checked by performing manual status check or navigating betwen pages or when the window get visibility (BREAKING)
  • MISSING checking of state for now means check of local commit situation and also difference against remote repository (BREAKING)
  • MISSING autoPush setting uses sync() operation, not commitAndPush() (BREAKING)

Todos:

  • maybe provide all GIT actions for user (not sure if this is really benefical)
  • provide user settings (global or per graph?) to configure when to query the states
  • protect remote repository from too many status queries
  • :plugin-git/enabled true is commited to Git, find really local way
    • my original idea was to check if the graph has git enabled, but the LogSeq git wrapper always performs git int :-(
  • improve log messages
    • my idea would be to git exclude special page and put results of last action into it
  • changing setting will not change the plugin without restart

Some ideas how to use it safely on multiple PCs:

  • commit journal files many days ahead - adding from multiple PCs will cause merge conflicts
  • add 1 level of journal template as user/PC name - that will merge without conflicts
  • sync often

@k2s k2s changed the title rework rework (work in progress) Aug 6, 2023
k2s added 2 commits August 7, 2023 17:08
…nesting

change showPopup() and hidePopup() also use status variable and doesn't directly modify style
@haydenull haydenull force-pushed the main branch 2 times, most recently from f081d79 to 52d170b Compare May 21, 2024 06:57
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.

1 participant