0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00
Commit Graph

3093 Commits

Author SHA1 Message Date
G.Ambatte
8b2c8c0feb Merge branch 'master' into addDBCheckMiddleware 2025-10-06 16:48:37 +13:00
Trevor Buckner
643e0ac650 small cleanups of localstorage keys code 2025-10-05 23:24:50 -04:00
Trevor Buckner
5395412ac5 Remove tests for getLocalStorageMap()
The function is a simple getter with trivial logic; test is effectively just asserting the size of the map, which coverage adds no meaningful value and adds cruft to the codebase.
2025-10-05 23:24:35 -04:00
Trevor Buckner
41aebf084b Make the renderSaveButton() function common between edit/new/home
Each of the edit/home/new pages renders its save button differently. This makes it a common function with all the same possible render states (does the document have unsaved changes? Is it already saved? Was it auto-saved?).

- Common save button
- Adds the "save" button to /home page which wasn't there before
- Animates the "save" button in /home and /new when the user makes their first change to signal that yes, you do have to actually click the save button if you want to keep this.
- "reminder... you haven't saved for X minutes" still not functional on /new and /home since that involves more moving pieces.
2025-10-05 21:57:19 -04:00
Trevor Buckner
12052853db Merge branch 'master' into new/home/edit/_unsavedChanges_common 2025-10-05 20:07:56 -04:00
Víctor Losada Hernández
1f51abaf10 this makes more sense 2025-10-05 19:57:49 +02:00
Víctor Losada Hernández
c90a8c53a5 lets test this 2025-10-05 19:56:50 +02:00
Víctor Losada Hernández
ac18f4bd1d Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-red-background 2025-10-05 19:43:29 +02:00
Víctor Losada Hernández
7393aef806 set up development config variavle 2025-10-05 19:42:01 +02:00
G.Ambatte
88bc9b79c9 Add new error message to nav bar error container 2025-10-05 15:31:53 +13:00
Trevor Buckner
2c4c4b8f92 Make unsavedChanges state common
/editPage.jsx uses `unsavedChanges` state to detect when autosave should fire, or unsaved changes warning should display.

/homePage.jsx uses a similar check (different variables) to detect when to show the popup "save now"! button

/newPage.jsx doesn't do any of this, but probably should pop up a warning when saving hasn't happened for a long time

This commit just gives all of the pages the same common `unsavedChanges` state, calculated in the same way, and updates any sections that depend on that updated state.

This is precursor work to adding "unsaved changes" warnings to all three pages.
2025-10-04 22:17:24 -04:00
G.Ambatte
d40f8ff380 Merge branch 'master' into addDBCheckMiddleware 2025-10-05 14:58:56 +13:00
Trevor Buckner
6057b35d19 Merge branch 'master' into UnifyNewHomeEdit-Structure&Naming 2025-10-04 21:48:10 -04:00
Trevor Buckner
e9f8302597 Merge branch 'master' into enableOldKeyDeletion 2025-10-04 21:47:06 -04:00
Trevor Buckner
20e12ebcb5 Remove handler function for cursor/renderer page. Use setState directly 2025-10-04 21:39:24 -04:00
G.Ambatte
ae51213c8c Permanently enable old local storage key deletion 2025-10-05 12:25:51 +13:00
G.Ambatte
400fa250ee Move key deletion out of key update check 2025-10-04 15:19:31 +13:00
G.Ambatte
e82921f81a Add key to activate deletion for testing 2025-10-04 14:54:57 +13:00
G.Ambatte
18367526bd Merge branch 'master' into standardizeLocalStorageKeyNames-#4119 2025-10-04 13:07:51 +13:00
Víctor Losada Hernández
aff9a85769 end of file character shit 2025-10-03 21:38:43 +02:00
Víctor Losada Hernández
e0379a0baa last cleanup 2025-10-03 21:38:10 +02:00
Víctor Losada Hernández
e8a0681015 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-red-background 2025-10-03 21:37:06 +02:00
Víctor Losada Hernández
3ed61ebe2c Merge branch 'fix-red-background' of https://github.com/naturalcrit/homebrewery into fix-red-background 2025-10-03 21:32:55 +02:00
Víctor Losada Hernández
c2e51b0baa removing isclient check to see what's what 2025-10-03 21:32:52 +02:00
Trevor Buckner
ba23763294 Merge branch 'master' into UnifyNewHomeEdit-Structure&Naming 2025-10-02 19:45:42 -04:00
Trevor Buckner
1c6a39363c Combine handleText/Style/Snippet/Meta functions into common function
Also adds any related imports and key names
2025-10-02 19:33:15 -04:00
Trevor Buckner
bcca5fa97d In /homepage, rename brew state to currentBrew to match /new and /edit 2025-10-02 19:27:45 -04:00
Trevor Buckner
51b91567f6 Merge branch 'master' into fix-red-background 2025-10-02 18:39:31 -04:00
Víctor Losada Hernández
eefda9fe45 simplifying per suggestion 2025-10-02 12:40:12 +02:00
G.Ambatte
900cf6aebb Change SAVEKEY definition to after username is populated 2025-10-02 22:59:24 +13:00
G.Ambatte
24db8f85ac Merge branch 'standardizeLocalStorageKeyNames-#4119' of https://github.com/G-Ambatte/homebrewery into standardizeLocalStorageKeyNames-#4119 2025-10-02 18:30:07 +13:00
Víctor Losada Hernández
e793db7b37 separating the words to make it less ugly 2025-10-01 22:55:32 +02:00
Víctor Losada Hernández
ff5450ad8c Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-red-background 2025-09-29 22:28:12 +02:00
Trevor Buckner
07495b0dea Make Print/Vault/New common nav buttons to all pages 2025-09-29 12:48:25 -04:00
G.Ambatte
718dba3e4a Merge branch 'master' into standardizeLocalStorageKeyNames-#4119 2025-09-29 23:14:14 +13:00
G.Ambatte
7c050fb9a9 Merge branch 'master' into addDBCheckMiddleware 2025-09-27 22:00:30 +12:00
Trevor Buckner
c6ed67db08 Merge branch 'master' into UnifyNewHomeEdit-Structure&Naming 2025-09-26 22:56:15 -04:00
Trevor Buckner
c5071aa27e Restore unsaved warning timeout duration to 15 mins 2025-09-22 19:55:39 -04:00
Trevor Buckner
f0baa763ec lint 2025-09-22 19:52:42 -04:00
Trevor Buckner
3ec650557e Fix Autosave and unsaved changes warning
Use normal setTimeout for autosave instead of _.debounce. Fixes a lot of issues with functional component.

Also fix existing bug where multiple "unsaved data" warnings could be queued up if the user keeps typing while the warning is being displayed.
2025-09-22 19:49:57 -04:00
Trevor Buckner
31a8101df7 Move "share" dropdown to own component 2025-09-13 19:37:59 -04:00
Trevor Buckner
788324fe31 Merge handText/Style/Snip/MetaChange into handleBrewChange 2025-09-11 22:03:25 -04:00
Trevor Buckner
da8772daa7 Use setXXXPageNum instead of handleXXXPageNum
No need for separate wrapper functions when we can just pass the setState functions directly.
2025-09-11 16:14:45 -04:00
G.Ambatte
87a36bb02d Add tests for localStorageKeyMap.js 2025-09-11 21:57:00 +12:00
G.Ambatte
1459f6a320 Tweak local storage update logic 2025-09-11 21:25:13 +12:00
G.Ambatte
a11fa72261 Change JSON file to JS getter function 2025-09-11 21:02:56 +12:00
G.Ambatte
2663d86627 Don't update storage values if key already exists 2025-09-10 20:31:50 +12:00
G.Ambatte
8d4ea7cfd8 Update listPage storage keys 2025-09-10 20:20:42 +12:00
G.Ambatte
b6818e963b Remove unused dismiss keys 2025-09-10 20:12:50 +12:00
G.Ambatte
dc1bc471aa Update SplitPane keys 2025-09-10 20:10:18 +12:00