Skip to content
Snippets Groups Projects

Settings backup/restore + small fixes

Merged HJ requested to merge settings-import-export into develop

Another stepping stone for settings sync, should enable easier debug for us and manual sync solution for the impatient. Also should make wiping localstorage less of a problem since it also backs up user highlights which don't have proper UI for them.

Major:

  • Changed ImportExport component into a service since it's mostly logic/direct DOM-manip, not much of markup going on, makes it more reusable and avoid mess with slots
  • Implemented settings save/restore function
    • New dropdown button in modal footer: save, save with theme, restore
    • Settings saved with array version - current version [1, 0] - works similarly to semver but in array, for future-proofing it will refuse to load settings with major version != 1 (i.e. [2, 0]) but will work different minor version, i.e. [1, 1].
    • Separate control for theme saving since theme data is quite heavy.
      • For future we might add dialog box asking if user wants to import theme as well if it's present
    • Restoring goes over supported properties and updates them using setOption with data found in file. Minor stuff:
  • one more fix for "p's broken theme" fucking up theme editor and making it mostly unusable
  • changed "Peek"/"Close" buttons to use icons instead, feels a bit more natural and less confusing given that there are now button in footer too.
  • panel footers no longer use panel header colors, it just looked silly and didn't really work with some themes (redmond), cleaned up their styles a bit
Edited by HJ

Merge request reports

Pipeline #35460 passed

Pipeline passed for 5c064ccf on settings-import-export

Approval is optional

Merged by HJHJ 3 years ago (Apr 7, 2021 5:40pm UTC)

Merge details

  • Changes merged into develop with 8b96ea93.
  • Deleted the source branch.

Pipeline #35771 passed

Pipeline passed for 8b96ea93 on develop

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading