0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 07:12:39 +00:00
Commit Graph

495 Commits

Author SHA1 Message Date
G.Ambatte
2779055e50 Stop error bar from blocking menus 2025-01-07 18:02:17 +13:00
G.Ambatte
d9b599e814 Fix error listing 2025-01-07 18:01:17 +13:00
G.Ambatte
40d453bc7c Return if no notifications 2025-01-07 18:00:45 +13:00
Trevor Buckner
6ff0cfe383 Merge branch 'master' into refactor-errorBar-to-functional-and-using-dialog 2025-01-06 12:03:34 -05:00
Trevor Buckner
766ab8f10a Lint 2025-01-05 23:07:53 -05:00
Trevor Buckner
aa4276a50e Move exit condition to start 2025-01-05 23:06:56 -05:00
Trevor Buckner
fbedafb204 typo 2025-01-05 23:04:57 -05:00
Trevor Buckner
85cd7c7336 Move calculation of error states outside of render
Our previous approach was technically bad practice to calculate side-effects inside of the render step. We can separate that out as part of this refactor.

Also use native javascript map instead of lodash.
2025-01-05 23:04:48 -05:00
Trevor Buckner
c137d40037 More alignment 2025-01-05 22:58:48 -05:00
Trevor Buckner
5a9e7850c2 space to tabs 2025-01-05 22:53:30 -05:00
Trevor Buckner
1c0eb720ad Undo 2024-12-24 00:38:36 -05:00
Trevor Buckner
93482f9022 Only list one page when in single page mode 2024-12-24 00:37:03 -05:00
Trevor Buckner
8159c408c8 Move formatVisiblePages
After simplifying, this has become a single-line function used in only one place. Can just be placed directly in the one place it is used.
2024-12-24 00:24:52 -05:00
Trevor Buckner
0632d78f71 Remove toolbar checks for empty visiblePages list
With `centerPage`, ToolBar will never receive an empty visiblePages array. No need to check if visiblepages.length == 0
2024-12-24 00:18:37 -05:00
Trevor Buckner
c0155052ea Further simplifying 2024-12-24 00:06:30 -05:00
Trevor Buckner
628b2542a0 Simplify logic for previous/next buttons 2024-12-24 00:02:55 -05:00
Trevor Buckner
85f1da942f Restore looping over entries. Needed for very fast scrolling 2024-12-23 23:08:30 -05:00
Trevor Buckner
3909d5aef9 remove unused iFrameRef
iFrameRef is not used anywhere
2024-12-23 22:48:57 -05:00
Trevor Buckner
f0e047e7cc Remove loop on intersectionObserver entries
Guaranteed to only be one entry each time, since we are attaching each page to its own observers.
2024-12-23 22:43:37 -05:00
Trevor Buckner
d588a92147 Change page range to only display a single range
Having multiple page ranges visible is a weird edge case that only happens in two-page view. Simplifying logic to just group all page ranges together if a middle page is partly obscured.
2024-12-23 18:37:20 -05:00
Trevor Buckner
2b7a1e1cb2 Reduce overlapping observer handlers
Combine handlePageVisibilityChange and handleCenterPageChange to reduce some of the infrastructure burden for handling centerPage.
2024-12-23 18:35:36 -05:00
Trevor Buckner
c8efca3120 useCallBack is not needed here. 2024-12-23 17:22:50 -05:00
Trevor Buckner
a53eacf055 remove CenterPage from ToolBar props
centerPage is not used in the toolbar component.
2024-12-23 17:17:13 -05:00
Trevor Buckner
1b10a4001a Merge branch 'master' into pr/3845 2024-12-23 11:37:40 -05:00
Trevor Buckner
870a4c3363 small cleanups 2024-12-09 17:06:26 -05:00
Trevor Buckner
aa951ff96c Small cleanups 2024-12-09 17:04:16 -05:00
Trevor Buckner
bae9fe939d Merge branch 'master' into Intersection-Observer 2024-12-09 16:16:11 -05:00
Víctor Losada Hernández
2c5c3d40df revert toolbar changes 2024-12-09 22:08:39 +01:00
Víctor Losada Hernández
eca0f59b40 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into adress-small-accessibility-concerns 2024-12-09 21:52:25 +01:00
David Bolack
e252a39bd2 Implement Gazook89's suggested fix 2024-12-01 11:41:29 -06:00
Trevor Buckner
fb9148ada5 Site runs and all tests pass 2024-11-20 16:21:35 -05:00
Víctor Losada Hernández
cf46a975aa Merge branch 'master' into Update-core-and-reset 2024-11-12 22:05:27 +01:00
David Bolack
4e4463fe4d Fix Issue 3718 by bounds checking prerender. 2024-11-11 11:17:00 -06:00
Gazook89
9bc4b1fb56 Changes to core.less, reset.less, and toolbar
Making some changes to the reset.less so that some default UA button styling is removed.

Then, changing core.less so that the classic "HB" button styling is scoped to a certain class `.colorButton`.  This will make it easier to use the button element in other places.
2024-11-10 21:48:01 -06:00
Gazook89
28a7f24989 add scrollToHash method back in
pretty much completely unchanged, was originally moved just to help with merging master in (ie it was erroneously removed)
2024-11-07 20:32:30 -06:00
Gazook89
28855d02a6 dynamic text input width to match characters 2024-11-07 19:46:07 -06:00
Gazook89
650ec04417 fix 'disabled' attribute on min/max of page range 2024-11-07 18:56:19 -06:00
Gazook89
9ef11bca99 lint and refactor 2024-11-07 10:40:44 -06:00
Gazook89
88b34a7ba3 Fix 'current page' input when zoomed in close
When the page is zoomed in very close, such that <30% of the page is in view, it doesn't register changes to the 'current page'.  This fixes that, passing in the 'centerPage' if 'visiblePages' is empty.

I don't love this fix, i think the visiblePages should always have *something* in it, but I can't quite figure out how to set that (since the normal update to visiblePages is happening in an observer that doesn't fire if nothing is in view).
2024-11-07 10:17:43 -06:00
Gazook89
9d86384032 refactor styles 2024-11-06 23:07:46 -06:00
Gazook89
a6bc87bcea apply displayOptions to legacy brews as well. 2024-11-06 23:07:03 -06:00
Gazook89
63add047b6 'fit page' zoom button fits two pages in "facing" spread
If the 'facing' spread is active, the 'fit to view' zoom button fits two pages side by side in the view, rather than setting only one page in view.
2024-11-06 23:03:24 -06:00
Gazook89
5b14e0e9b5 tweak alignment of spreads
the `safe` keyword for `justify-content`, in combo with `center`, means that the content will be centered in the viewport unless there is not enough space for it.  If there is not enough space, it aligns it to the *start*/left edge, rather than keeping it centered and clipping the left edge of the page.
2024-11-06 21:55:16 -06:00
Gazook89
274e734135 add displayOptions to dependency array for memo
The memoization of the renderPages() method prevents a re-render when something like pageShadows is updated, so displayOptions are added to the dependency array in the memo method.
2024-11-06 21:53:14 -06:00
Gazook89
3818424251 Adjust "next page" button
Prior to fix, the "next page" button in the toolbar wouldn't work well if there were multiple pages in view that were in a single 'row'.  This is because the logic is to take the pages that are "visible", take the max of those pages, and then scroll to that page.  But the issue is that if the 'max' page is in the same row as other pages, the range of visible pages doesn't change....the max will always be the same.

So the change here basically runs the scroll function twice-- if the first run results in the same 'max' page as before the scroll, it runs it again but with the target page being "max + 1", which will bump the target to the next row.
2024-11-06 21:24:18 -06:00
Gazook89
93b9f1d1da Merge branch 'Intersection-Observer' into Observer-Master-merge 2024-11-05 14:03:09 -06:00
Gazook89
172a3eaadf fix memoization on brewRenderer.jsx 2024-11-05 12:45:41 -06:00
Gazook89
89a16956b9 Merge branch 'master' into View-Modes 2024-11-04 14:22:54 -06:00
Gazook89
b098d28407 linting 2024-11-04 14:08:06 -06:00
Gazook89
1be1b3b747 small accessibility changes. 2024-11-04 13:55:18 -06:00