1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-12 22:15:55 +00:00

314 Commits

Author SHA1 Message Date
Scott Tolksdorf
bf21c3d351 lint 2018-12-06 18:19:43 -05:00
Scott Tolksdorf
52c0462a4f Finished the clean up brew ui 2018-12-06 18:19:43 -05:00
Scott Tolksdorf
1184fe86a5 Removing the admin key, switching to full basic auth 2018-12-06 18:19:43 -05:00
Scott Tolksdorf
7656e53606 Finished stats and brew lookup on admin panel 2018-12-06 18:19:43 -05:00
Scott Tolksdorf
8b04cc9269 Adding some more text to the default issue title to guide peopel to add an issue title 2018-11-27 10:38:29 +00:00
Marius
96466211c7 Make imgur link https in order to display image
Newer browsers warn and/or do not display content that gets loaded via HTTP if site is visited via HTTPS.
2018-11-26 20:13:25 -05:00
Kurtis Miller
fcb0cd8ee7 Reset to previous commit 2018-11-26 20:12:59 -05:00
Kurtis Miller
aafac16af2 Add bold/italic shortcuts, reposition renderer warning 2018-11-26 20:12:59 -05:00
Trevor Buckner
f4e7e46a04 Added spaces for lint... 2018-11-08 16:04:14 -05:00
Trevor Buckner
8b3b7cb5aa Found the lint-friendly way to do it. Just needed to pass along the event data. 2018-11-08 16:04:14 -05:00
Trevor Buckner
77081b39b4 Fix metadata not working. Some earlier linting caused the handleFieldChange and handleSystem functions to not have access to event data. Returning these to their pre-lint state for now, but there might be a more lint-friendly way to do this later. 2018-11-08 16:04:14 -05:00
Rae Che
3532d75365 s/let/const/ to satisfy ESLint 2018-08-24 10:12:53 -04:00
Rae Che
f6b058f3c9 brewRenderer: Capture event properties while still in event loop.
React [pools events](https://github.com/facebook/react/issues/2850),
which means that once the lambda runs later on the properties we want
to read will be null. Instead, we capture the properties in the event
loop.
2018-08-20 14:14:52 -04:00
Rae Che
c5ecb9d57d ESLint reformatting 2018-05-31 10:53:07 -04:00
Rae Che
d0c473878a BrewSearch: Remove stale piece of React state 2018-05-31 10:53:07 -04:00
Rae Che
796df9a1ac EditPage: Remove stale bit of React state 2018-05-31 10:53:07 -04:00
Rae Che
9e8e403195 HomebrewAdmin: Remove stale piece of React state 2018-05-31 10:53:07 -04:00
Rae Che
a369871a06 ESLint reformatting 2018-05-31 10:53:07 -04:00
Rae Che
e86ce5cf06 PrintPage: Fix potentially inconsistent React state update 2018-05-31 10:53:07 -04:00
Rae Che
8d73ff6833 BrewLookup: Mark links as noreferrer 2018-05-31 10:53:07 -04:00
Rae Che
c4397d34f8 BrewItem: Mark links as noreferrer 2018-05-31 10:53:07 -04:00
Rae Che
66c0c96a4f EditPage: Mark link as noreferrer 2018-05-31 10:53:07 -04:00
Rae Che
838b64c589 EditPage: Simplify hasChanges.
In particular, remove unreachable `return` statement.
2018-05-31 10:53:07 -04:00
Rae Che
730dde730c MetadataEditor: Mark link as noreferrer 2018-05-31 10:53:07 -04:00
Rae Che
d867aa7ce1 EditPage: Consistent trySave on handle[Metadata|Text]change
Previously, one of these happened in React's post-state-update callback,
while the other happened directly. They now both use the callback.
2018-05-31 10:53:07 -04:00
Rae Che
761597e71f EditPage: Fix potentially inconsistent React state updates 2018-05-31 10:53:07 -04:00
Rae Che
4bde5fcbf8 HomebrewAdmin: Mark links as noreferrer. 2018-05-31 10:53:07 -04:00
Rae Che
ff0aa56ddc HomebrewAdmin: Remove direct React state mutation. 2018-05-31 10:53:07 -04:00
Rae Che
74f92f3e44 Use noreferrer in recent-brew links. 2018-05-31 10:53:07 -04:00
Rae Che
ec0de7a408 BrewRenderer: Remove redundant errors state property.
The errors are in fact tracked in `this.props`, not `this.state`.
2018-05-31 10:53:07 -04:00
Rae Che
9ea99236ff Omit redundant property definition in brew renderer 2018-05-31 10:53:07 -04:00
Rae Che
15ac397b63 Fix inconsistent React state update.
Flagged by lgtm.com (as js/react/inconsistent-state-update).
2018-05-31 10:53:07 -04:00
Trevor Buckner
31cbd9ef40 Fix regression with updated Pico-Router
This variable name changed with the v2.0.0 of Pico-Router and it wasn't changed here. This was causing every page to display a  `<div class="homePage page">` rather than the appropriate `editPage` or `sharePage`. It just wasn't immediately noticeable since `homePage` and `editPage` are almost identical. The problem is clearly visible on `sharePage` however.

`homebrew.jsx` was set to always render a defaultUrl of ` ` which creates a `<div class="homePage page">` by default, overwriting the expected `<div>` on for the current url.
2018-05-23 17:41:50 +01:00
Trevor Buckner
eaab6de691 Fix border-image bug on PDFs
I think this might be caused by a new bug in Chrome or something since it seems to have popped up in GMBinder as well in the last couple weeks. See #683

Anyway, the error only occurs on the Class Table and Descriptive Text Box, which are also the only ones to use `border-image-repeat: round`. I changed it to `border-image-repeat: stretch` which solves the graphical issue and doesn't affect the appearance otherwise in this particular case.
2018-05-22 10:01:03 +01:00
Trevor Buckner
d417c76c56 Remove unused event triggers
Removed `onMouseOver` and `onMouseOut` since they are no longer needed to trigger `will-change`
2018-05-14 08:30:19 +01:00
Trevor Buckner
2f15cc5611 Lint 2018-05-14 08:30:19 +01:00
Trevor Buckner
eb08172fb1 Move will-change to stylesheet
This makes `will-change: transform` permanent in the brewRenderer stylesheet rather than trying to load and unload it programatically.
2018-05-14 08:30:19 +01:00
Trevor Buckner
0cc87a4f0f Lint Fixes 2? 2018-05-14 08:30:19 +01:00
Trevor Buckner
004dc79eb2 Lint fixes 2018-05-14 08:30:19 +01:00
Trevor Buckner
a8a70c2d70 Unified spacing 2018-05-14 08:30:19 +01:00
Trevor Buckner
825c259fba Optimize for smooth scrolling of BrewRenderer
The will-change property allows the browser to optimize for smoother animations. This completely eliminates the scrolling stutter.
2018-05-14 08:30:19 +01:00
Rae2che5
cbbb7292d9 Revert "Fix duplicated text from Class Feature snippet"
This reverts commit 9519a0b4e4.
2018-05-11 20:44:53 +01:00
Trevor Buckner
9519a0b4e4 Fix duplicated text from Class Feature snippet
When adding the Class Feature snippet, all curent text in the document is inserted in place of the randomly generated class name, creating several duplicates of the document and generally creating a mess.  See #413 which was closed but the issue was never fixed.

Most of the snippet code generators do not have any input arguments in the `module.exports` function, so they don't have this issue. However, Table of Contents needs to parse the text in the brew, so it is passed a copy of the brew document. Unfortunately, Class Feature (classfeature.gen.js) also has an input parameter for when it is used as part of the Full Class snippet.  Thus, the unintended consequence occurs in snippetbar.jsx in the `execute` function.

This fix simply adds a check to the execute function and only passes in the brew as an argument if the clicked snipped actually is the Table of Contents. Some restructuring might later reveal a cleaner way to do this rather than an awkward special case check like this.
2018-05-11 10:20:18 +01:00
Eric Scheid
9dd16b6dd5 add page-break-inside to support Firefox, the laggard 2018-05-10 14:36:24 -04:00
Eric Scheid
d693301c37 Fix property name break-inside 2018-05-10 14:36:24 -04:00
Rae Che
fd5d142c16 Fix calculation of currently-viewed page.
Previously, this relied on a hard-coded constant determining the
height of a page. However, that's unnecessary -- we know the scroll
height of the window and the number of pages, so we can compute it.
2018-05-10 14:35:03 -04:00
Trevor Buckner
ee63d2d857 Fix duplicate table headers
Fixes a common issue. See #318.
2018-05-10 18:26:46 +01:00
Trevor Buckner
3e69e8c1aa Revert "Merge pull request #1 from calculuschild/Fix-Duplicated-Table-Headers"
This reverts commit 1a0bc1952c, reversing
changes made to 4f4ef908e0.
2018-05-08 21:33:34 -04:00
Trevor Buckner
7e2c3381ae Fix Duplicated Table Header
Fixes a pretty common issue. See #318.
2018-05-08 12:42:11 -04:00
Trevor Buckner
3fe2360d92 Revert "Fix duplicated table headers"
This reverts commit 13a2a7efd2.
2018-05-08 12:36:30 -04:00