0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-09 18:28:45 +00:00
Commit Graph

3157 Commits

Author SHA1 Message Date
G.Ambatte e57b88a019 Limit max width of header navigation 2024-08-26 16:06:11 +12:00
G.Ambatte 380c1444ca Tweak position to account for new toolbar 2024-08-26 16:01:12 +12: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
Trevor Buckner d4d27aab6a Merge branch 'master' into Fill-Pane-Buttons 2024-08-24 23:59:19 -04:00
Trevor Buckner 4b0b56dd35 Lint the jsx files 2024-08-24 23:55:17 -04:00
Trevor Buckner bf6eae7b3c Simplify some logic in Toolbar 2024-08-24 23:54:09 -04:00
Trevor Buckner 3377d6645d Tidy up brewRenderer 2024-08-24 23:53:44 -04:00
Trevor Buckner 5069eadd0a Manual tidying of .less files 2024-08-24 23:53:07 -04:00
Gazook89 2b79583e8c Merge branch 'pr/3499' into View-Modes 2024-08-24 22:03:06 -05:00
Gazook89 35a0a12f16 Merge branch 'pr/3499' into Fill-Pane-Buttons 2024-08-24 22:02:56 -05:00
Gazook89 504bb78a8d switching padding to margin
using `padding-top` was breaking the navbar dropdowns (they would lose focus).
2024-08-24 22:02:43 -05:00
Gazook89 609b40e84c Merge branch 'pr/3499' into View-Modes 2024-08-24 21:28:39 -05:00
Gazook89 94ae33d328 Merge branch 'pr/3499' into Fill-Pane-Buttons 2024-08-24 21:28:13 -05:00
Gazook89 690c683943 select text when clicking into page input 2024-08-24 09:08:19 -05:00
Gazook89 3acf90dfdb Add handlePageChange() to control input
Reintroducing handlePageChange() method to handle the page input separately from the scroll function.  It tests the regex pattern on the string, parses to integer, and sets pageNum state.

scrollToPage also now sets the pageNum state after performing the scroll so the input box matches the new current page.
2024-08-24 09:05:43 -05:00
David Bolack e27e61aaca Bind livescrolling when done via scrollbars. 2024-08-24 00:47:06 -05:00
Gazook89 07c574fa42 Merge branch 'Fill-Pane-Buttons' into View-Modes 2024-08-23 23:26:24 -05:00
Gazook89 6bb5d04f07 round the calculated zoom level 2024-08-23 23:02:04 -05:00
Gazook89 b0b1f7fd0b update method calls for zoom buttons
update method names in onClick events to match latest changes to the branch this builds from.
2024-08-23 22:58:43 -05:00
Gazook89 c25bf95a66 Merge branch 'pr/3499' into Fill-Pane-Buttons 2024-08-23 22:56:37 -05:00
Gazook89 a351013359 remove some odd if statement in onChange 2024-08-23 22:54:29 -05:00
Gazook89 1f86b4c3d0 add mainRef back in
This was previously in the .pageInfo widget, probably not for any good reason, but I'm moving it to the popups div for probably not a good reason.

It's used to get the parent .pane div, and pull its `height` value which is then passed to the `.brewRenderer` div to set the height.

I tried alternate methods that would make this obsolete (CSS methods mostly), but due to some complexity am just ditching those alternatives and popping this sucker into `.popups` for now.
2024-08-23 22:41:12 -05:00
Gazook89 627a6a732b remove .ppr_msg styling
This message doesn't exist anymore (i'm pretty sure), so this is just unused styling.  Unrleated to the PR, but just minor.
2024-08-23 19:26:41 -05:00
Gazook89 77421c2950 remove .pageInfo widget in bottom of preview
page counter function is in toolbar now, so this isn't necessary.
2024-08-23 19:25:49 -05:00
Gazook89 f3ed174b0e eslint and stylelint
stylelint has a problem with the `:horizontal` pseudo selector in brewRenderer.jsx, which is being used to apply some styling to the custom scrollbars.  As far as i can tell, the selector is not standards-track, so that is probably why.  Not sure if we want to adjsut our stylelint config to allow it?
2024-08-23 19:16:59 -05:00
Gazook89 977d0ea73a eslint 2024-08-23 19:05:23 -05:00
Gazook89 04effa2150 removed whitepsace 2024-08-23 18:59:32 -05:00
Gazook89 7f694e6ca7 fold handlePageChange directly into input onChange
Moved the single-line handler to operate directly in the onChange handler of the input that is calling it.

Considered doing the same with handleZoomChange, but that handler is used by two buttons rather than just one.
2024-08-23 18:58:51 -05:00
Gazook89 769a03916b rename pageInput state variable to pageNum 2024-08-23 18:48:36 -05:00
Gazook89 e3c90a8295 unset padding on brewRenderer in @print
Fixes an issue with the padding being reflected in pdfs as a white stripe at the top.
2024-08-23 18:45:08 -05:00
Gazook89 561ff6283a remove redundant handleScroll() method
handleScroll is replaced by getCurrentPage(), which effectively does the same thing.  The math is slightly different, though very similar, and result seems to be the same.
2024-08-23 18:33:14 -05:00
Gazook89 f34107ee1d fix typo 2024-08-23 15:06:48 -05:00
Gazook89 2246944dd2 Remove duplicate ErrorBar/popups tray
Removed duplicated components.

Restyled the popups to accomodate extra height of viewer tools.
2024-08-23 14:40:19 -05:00
Gazook89 960ecae861 setup styles for different view modes
added styles for different modes-- basically a grid for 'facing' and flex for 'flow'.
2024-08-23 14:29:52 -05:00
Gazook89 49a4daa8f6 useEffect hook to update view after mode select
utilize useEffect hook to trigger render when the mode state is changed.

Move modes array to top level array, and change 'book-mode' to 'facing', and add 'flow' mode.

toggle modes as class names in .pages div, which are each styled as required.
2024-08-23 14:29:02 -05:00
Víctor Losada Hernández 1f41745d2b "Refactored Snippetbar component: updated JSX structure, added div wrapper for snippets, changed CSS styles for editors and snippets" 2024-08-23 13:37:12 +02:00
Víctor Losada Hernández 1602f0af37 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into snippet-bar-wrapping 2024-08-23 13:37:03 +02:00
Gazook89 375c54016c Get basic function worked out
Adds `setBookMode()` which toggles a className on `.pages`.  The `.book-mode` class sets display to grid, and the first child/page to start at the second slot of the book arrangement.
2024-08-23 00:32:30 -05:00
Gazook89 32c6224f40 remove console.log 2024-08-22 23:30:36 -05:00
Gazook89 8dadc57934 adjustment to toolbar spacing between items
testing the use of spacing to separate tool groups.  Could alternatively use a thin vertical bar.
2024-08-22 23:22:39 -05:00
Gazook89 0dc9e9ecdb Add 2 custom zoom related icons
New icons for Zoom to Fit, and Fit Width buttons.  Used SVGR online tool to create react components and then combined them.

If doing in future, be sure to set currentColor on `fill` property in the SVG itself.  Make the SVGs as closed curves only (don't rely on stroke).  set only a width property, not height.
2024-08-22 23:21:48 -05:00
Gazook89 977b871967 Combine toFit and toFill functions
Reduce overlap of the two functions and just require a 'mode' parameter.  Could like roll a 'manual' mode into this for the zoom slider, as well, but skipping for now.
2024-08-22 23:19:24 -05:00
Gazook89 90dd4326e7 Add a toFit() method to fit largest page in view
Adding a real toFit() button that takes the page with the largest single dimension (height or width) and makes it fit within the pane.
2024-08-22 20:56:42 -05:00
Gazook89 4c71987866 change the toFit method to toFill
Realized this method is filling the preview pane, and that toFit would force the zoom to show the entirety of a single page at once.
2024-08-22 15:56:23 -05:00
Gazook89 8965bb60aa add a toFit() method to determine zoom change
Adds a toFit() method to determine the delta/change needed to the current zoomLevel to fit the page to the pane, so that the widest page fits just inside the pane.
2024-08-22 15:52:52 -05:00
Gazook89 64fb032622 fix className 2024-08-22 15:51:16 -05:00
Trevor Buckner dc7d877e6f Add snippets and icons 2024-08-22 16:35:48 -04:00
David Bolack 695293333f Fix merge 2024-08-21 21:19:10 -05:00
David Bolack 5431d3ed9b Merge branch 'master' into Issue_241_Part_II 2024-08-21 21:03:26 -05:00