Gazook89
4126188df1
linting
2024-10-21 22:29:58 -05:00
Gazook89
5c0d6e6012
move formatting of visible pages to toolbar
...
Doesn't need to be set in brewRenderer state and passed as a prop, when it can just do it's work directly in the toolbar.
2024-10-21 22:18:25 -05:00
Gazook89
de7b13bc15
Add some comments and cleanup
...
Little changes like removing console.logs and adding comments.
2024-10-21 22:13:12 -05:00
Gazook89
822d0c7738
Fix NaN/undefined showing on first load
...
Removes currentPage as a variable since it's been replaced.
2024-10-21 21:27:06 -05:00
Gazook89
0afc2ab2e6
modify effect to enable Jump Editor button
...
This fixes the "jump editor to preview position" button.
2024-10-21 20:43:32 -05:00
Gazook89
119755e23a
Merge branch 'master' into Intersection-Observer
2024-10-21 00:33:56 -05:00
Gazook89
41fdf48ad3
Setup Intersection Observers & more...
...
Bad commit here with too much stuff. I apologize.
This sets up two Intersection Observers: the first captures every page that is at least 30% visible inside the `.pages` container, and the second captures every page that has at least one pixel on the horizontal center line of `.pages`. Both can be arrays of integers (page index).
The "visiblePages" array is duplicated and formatted into a "formattedPages" state, which gets displayed in the toolbar.
The toolbar displays that, unless the user clicks into the page input and enters their own integer (only a single integer, no range), which can then jump the preview to that page on Enter or blur().
The Arrow 'change page' buttons jump the preview back and forth by a 'full set'.
If one page is viewed at a time, this is moved on page a time, and if 10 pages are viewed at a time it jumps the pages by 10.
Left to do: adapt the "jump editor to match preview" divider button to work with new "centerPage".
2024-10-21 00:30:45 -05:00
Trevor Buckner
ac766f3b37
Update brewRenderer.jsx
2024-10-18 10:23:56 -04:00
Víctor Losada Hernández
d872a496a7
fix mutation observer integration
2024-10-17 23:38:11 +02:00
Víctor Losada Hernández
9a4473526a
move around 2
2024-10-17 22:59:29 +02:00
Víctor Losada Hernández
5077fda3f6
move stuff around for minimal changes
2024-10-17 22:58:14 +02:00
Víctor Losada Hernández
397ae31f56
remove stale changes
2024-10-17 22:56:58 +02:00
Víctor Losada Hernández
87915ef0ef
remove unnecessary changes
2024-10-17 22:42:55 +02:00
Víctor Losada Hernández
ccfd5578cf
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into scroll-to-element
2024-10-17 22:39:28 +02:00
Trevor Buckner
7888bfa878
Merge branch 'master' into tweakBrewRendererBackgroundStyle
2024-10-16 16:23:47 -04:00
Trevor Buckner
2aa60f793d
Fix /new
...
/new starts with no `text` so it will crash without `?.`
2024-10-15 22:39:13 -04:00
Trevor Buckner
321bbba4b8
Rearrange
2024-10-15 22:07:41 -04:00
Trevor Buckner
36af1cdb7f
Update brewRenderer.jsx
2024-10-15 21:47:27 -04:00
Víctor Losada Hernández
3c66907a86
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into scroll-to-element
2024-10-13 11:15:15 +02:00
Gazook89
0855c5c181
remove errant console.log
2024-10-12 23:12:37 -05:00
Gazook89
ae11da2bc7
Fix the styles overriding previous styles
...
If there were two inputs sending styles to the same target (ie row and column gap), they would override each other.
This change fixes that by deepening the merges. Admittedly, I turned to cGPT to help me with this as the nesting was throwing me for a loop. It works, though, and I understand it now that I can read it.
2024-10-12 11:53:52 -05:00
Gazook89
ba0b3e7d93
Add toggle for Page Shadows
...
Reworks the pagesStyles to a broader object previewStyles. This new object has this structure:
```
{
targetElement : { cssProperty: value }
}
```
2024-10-12 11:05:23 -05:00
G.Ambatte
bec830c3b8
Tweak color of Brew Renderer background text
2024-10-12 08:09:51 +13:00
Gazook89
c4074d67f5
Merge branch 'master' into View-Modes
2024-10-10 23:34:26 -05:00
G.Ambatte
d534eddb29
Remove unnecessary useEffect import
2024-10-11 13:14:53 +13:00
G.Ambatte
9099db5ea1
Remove obsolete state and event handlers
2024-10-11 11:56:29 +13:00
G.Ambatte
a9a8b4b9bb
Shift static height style to LESS file
2024-10-11 11:55:51 +13:00
G.Ambatte
5d29d40c97
Implement suggested change
2024-10-11 11:42:03 +13:00
G.Ambatte
4291284252
Merge branch 'master' into experimentalDeploymentIdentification
2024-10-11 11:10:28 +13:00
Víctor Losada Hernández
6456c22c61
testing mutation Observer, don't review this yet
2024-10-09 21:33:26 +02:00
Gazook89
d6d6cc1e29
Add View Mode Options
...
Adds a new AnchoredBox component that is functionally a clone of the "saving error" notifications, but drops a lot of the JS in favor of the new (chrome-only!) CSS Anchor Positioning API. In subsequent commits, either alternate styling or a polyfill will be added non-supported browsers.
The box contains a few inputs that modify the CSS applied to `.pages`, most critically a "start on right" toggle for the Facing Pages mode.
2024-10-06 21:51:44 -05:00
Trevor Buckner
ae123a8310
Change the other page number values as well
2024-09-27 11:35:01 -04:00
G.Ambatte
1f047890ab
Change default value of currentEditorCursorPageNum
2024-09-27 23:32:19 +12:00
Víctor Losada Hernández
2e5ebb861e
simplify logic
2024-09-17 19:50:39 +02:00
Víctor Losada Hernández
e92c169e71
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into scroll-to-element
2024-09-16 23:01:40 +02:00
Trevor Buckner
c07c02f1d9
Remove unused variable
2024-09-15 21:44:02 -04:00
Trevor Buckner
85401ba71b
Fix BrewRenderer scrolling to 0
2024-09-15 21:26:49 -04:00
Víctor Losada Hernández
e213eb0a78
"Refactor BrewRenderer: removed iframe load event listener, simplified page scrolling logic, and inlined getPageContainingElement functionality"
2024-09-15 18:37:27 +02:00
Víctor Losada Hernández
422829cbd8
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into scroll-to-element
2024-09-15 16:52:12 +02:00
Trevor Buckner
d4fa5d55d0
Merge branch 'master' into pr/3484
2024-09-14 19:15:12 -04:00
Trevor Buckner
76c9f2ee71
Lint
2024-09-14 18:58:23 -04:00
Trevor Buckner
fa2874b18f
Let brewRenderer pass changes up, and inherit values down
2024-09-14 18:50:38 -04:00
Trevor Buckner
3ef91cb1ea
Add check for scroll event complete/ lift page state up
2024-09-12 12:55:11 -04:00
David Bolack
7a37bf47c5
Bodge Render side mirroring back into place.
2024-09-07 21:33:51 -05:00
Víctor Losada Hernández
3360b4e829
refctor logic
2024-09-07 19:12:59 +02:00
Víctor Losada Hernández
9e1a532105
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into scroll-to-element
2024-09-07 18:45:03 +02:00
G.Ambatte
cc7fe99760
Initial functionality pass
2024-08-29 21:26:24 +12:00
David Bolack
a4f30d687d
Merge branch 'master' into Issue_241_Part_II
2024-08-28 21:17:10 -05:00
G.Ambatte
a59135430c
Fix missing comma
2024-08-26 15:30:58 +12:00
G.Ambatte
bdf2c97942
Merge branch 'master' into experimentalHeaderNavigation
2024-08-26 15:28:46 +12:00