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

70 Commits

Author SHA1 Message Date
Alexey Sachkov
78d4487c58 Fix linter errors 2021-12-29 21:30:03 +03:00
Alexey Sachkov
8a3f52b704 [NFC] Add display name for custom React components
This improves readability of "Components" tab from React Development Tools extension for Chrome
2021-12-29 21:18:54 +03:00
Charlie Humphreys
38d8764f15 Disable code folding in style tab, disable active line highlight and whitespace visibility 2021-12-20 00:42:53 -06:00
Charlie Humphreys
53fcdd8d7a Prevent activeline class from being removed 2021-12-13 20:29:28 -06:00
Trevor Buckner
1bbacc974b lint 2021-12-06 22:31:25 -05:00
Trevor Buckner
b6e29c8a61 Change to callback style 2021-12-06 22:30:58 -05:00
Trevor Buckner
09f64e018e Tell CodeMirror to batch custom highlights before updating the browser 2021-12-06 16:23:18 -05:00
Trevor Buckner
8acd42fcbe Small cleanup. Reduce redundant code. 2021-12-06 15:36:41 -05:00
Gazook89
dcf4fe10cd lint 2021-12-03 20:25:04 -06:00
Gazook89
5cd45a1413 remove "in viewport" requirement for markdown highlight/pg numbers 2021-12-03 20:20:40 -06:00
Gazook89
372d33271d Change widgets to bookmarks for page counters 2021-11-21 15:17:23 -06:00
Gazook89
09f9e1d398 Merge branch 'master' into page-numbers-via-JS 2021-11-20 10:07:07 -06:00
Gazook89
f72d8f0ef0 merge pageNumber() into customHighlight() 2021-11-17 10:47:16 -06:00
Gazook89
f0608441fc fix circleCI errors 2021-11-17 09:58:31 -06:00
Gazook89
8b13528661 add check for change to current viewport 2021-11-17 09:47:51 -06:00
Charlie Humphreys
2d30ac21a7 Update code based on PR feedback
#692
2021-11-11 17:08:05 -06:00
Gazook89
9f05aae876 remove left property entirely and set height to cm.defaultTextHeight 2021-11-10 11:17:45 -06:00
Charlie Humphreys
cac9e208df Update editor.jsx to only clear marks that are not folds
#629
2021-11-10 10:27:32 -06:00
Gazook89
3e54f6e6e1 remove collection array from _.forEach() function
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-11-08 10:49:41 -06:00
Gazook89
796bd22000 circleCI update 2021-11-08 09:07:59 -06:00
Gazook89
c3e24ef4c5 replace _.reduce() with _.forEach() 2021-11-08 08:59:30 -06:00
Gazook89
9141b93a6b fix pageCountWidgets to get elements by correct class name 2021-11-07 16:47:54 -06:00
Gazook89
1fb63f8be3 initial commit to add programmatic page counts in editor
update element classname to be more descriptive, remove some commented code.
2021-11-07 16:33:50 -06:00
Trevor Buckner
47b99a24fb Clear out unneeded style when editor is hidden in Metadata panel 2021-10-24 16:46:46 -04:00
Trevor Buckner
63d659ff49 use CodeMirror Documents
Instead of re-building the whole editor box with every tab switch, we just swap in and out CodeMirror "documents".

Maintains undo history, scroll position, highlight coloring, etc.
2021-10-19 23:49:11 -04:00
G.Ambatte
9dd885e7eb Move Undo/Redo to SnippetBar 2021-10-18 22:29:26 +13:00
G.Ambatte
9bc52b412c Initial pass at Editor Toolbar - Undo and Redo. 2021-10-18 22:29:25 +13:00
Trevor Buckner
0610c9fe98 fix injecting images putting the cursor midway into the next line of text. 2021-09-01 14:54:52 -04:00
Trevor Buckner
1a71ba0eb2 Force \page on V3 to be alone on line. 2021-08-31 12:08:31 -04:00
Trevor Buckner
e14c8c5e91 Lint 2021-08-31 12:03:59 -04:00
Trevor Buckner
13ba5ebcc8 Fix snippets crashing in empty brew
If this.props.brew.text is an empty string, it will evaluate to `false` and, but since `isStyle()` is also false, `text` is just undefined.
2021-08-31 11:56:48 -04:00
G.Ambatte
04b2421793 Update client/homebrew/editor/editor.jsx
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-08-28 11:03:47 +12:00
G.Ambatte
31c348baff Handle brew.style being undefined when inject snippets. 2021-08-21 11:37:01 +12:00
Trevor Buckner
213ef9d94b Fix cursor getting stuck on divider in Meta panel view 2021-07-30 22:44:00 -04:00
Trevor Buckner
5b039b82a3 Update snippets 2021-07-30 12:31:30 -04:00
Trevor Buckner
98915e158d Fix editor highlighting 2021-07-30 02:11:26 -04:00
Trevor Buckner
e07bb1b3c2 Don't save style tab if user never put anything in it 2021-06-24 23:29:01 -04:00
Trevor Buckner
1ef5bfed94 Remove default text 2021-06-05 16:09:23 -04:00
Trevor Buckner
e67fadef02 Separate "style" and "metadata" panels 2021-06-05 15:58:31 -04:00
Trevor Buckner
983a37c77f Make cursor move to end of snippet after insertion 2021-04-06 11:43:34 -04:00
Christian Brickhouse
68811eb3fc Implementing magic item snippet from Issue 671. (#842)
* Implementing magic item snippet from Issue 671.

* Fixes syntax errors. Function moved into existing magic module.

* Implementing magic item snippet from Issue 671.

* Fixes syntax errors. Function moved into existing magic module.

* Magic Item Snippet, <dl>, `:` for blank line

Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-02-24 21:58:11 -05:00
Trevor Buckner
468b7319d1 Unify brew structure in all pages 2021-02-20 21:59:18 -05:00
Rasmus Bækgaard
009a11a9f5 Add QR-Code as snippet under Editor (#539)
* Add snippet for QR-code

* Add snippet for QR-code

* Refactor to expose metadata to snippets

* Lint

Co-authored-by: Rasmus Bækgaard <git@bakgaard.net>
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-02-19 23:39:29 -05:00
Trevor Buckner
e5ccfa3a50 Fix /page not working in legacy mode. (#1233)
* Fix brew styles overwriting each other.

* Word wrapping, start fixing spacing on Title letter

* Fix \page in legacy brews when not at line start
2021-02-08 13:58:24 -05:00
Trevor Buckner
e2cd7d9f07 Legacy renderer (#1184)
* Include two versions of Marked.js

* Include two versions of Marked.js

* Working two different render pipelines

Adds stylesheet "styleLegacy.less"
Adds markdownHandler "markdownLegacy.js"
The BrewRenderer will switch between these and the new pipeline dependent on the "version" prop passed in.

* Mustache-style div blocks

* Legacy snippets & columnbreak

* Codemirror styling for Div Blocks

* Lint

* Codemirror highlights for inline Divs as well

These will turn red `{{class Content}}`

Multi-line divs will turn purple

```
{{class,class2
content
}}
```

No real need for these to be different colors. Just for testing.

* More lint

* Update dependencies.

* Adding Button to switch render pipelines

* Update Marked.js

* Popup alert to refresh page when renderer changed

* Don't compress files in Development (very slow)

* Block DIV or inline Span depending on {{ placement

* \column emits a Div instead of Span

* Allow share page to use new renderer

* {{ divs no longer need empty lines. Spans work in lists.

* Typo

* Typo

* Enforce \page must be at start of line. Code cleanup.

* Inject newlines after/before {{/}} to avoid needing blank lines

* Fixes issues with tables.

* Remove console.log

* Fix spacing issue for Spans

* Move things from Brewrenderer to Markdown

Try to keep all custom text fiddling in one spot.

* Rename variables

* Update Font-Awesome to v5.15. Fix style issues on popups.

* Update {{ Divs/Spans, Fix nested hilighting

* Fixed Spans/divs with no tags or just commas

* Use blacklist for {{ to allow more characters

* Update package-lock.json

* Update all icons to Font-awesome 5

* V3 hidden behind config variable

Add "globalThis.enable_v3 = true" in the console to enable.

* lint
2021-02-02 20:38:25 -05:00
Trevor Buckner
8ffea70b2f Remove metadata on the Homepage (#1121)
* Remove the metadata button on home page

1) Hopefully make it more clear that the Homepage is meant as a sandbox to test out the site, not a real brew that will be saved.

2) Also, avoid errors resulting from trying to modify the metadata of a brew that doesn't really exist yet.

* Lint
2020-11-27 21:14:15 -05:00
Trevor Buckner
22a9799674 Update vitreum (#946)
- Updates Vitreum to v6.0.1 + some custom fixes.
  - Stylesheets must be imported with `require('./sheet.less');` but can also can now share stylesheets between jsx components.
  - Should eliminate a lot of security concerns with older nested dependencies.
  - Changed a lot of files to make this work
- Also removes dependency on PicoRouter in favor of React-Router
2020-05-19 01:36:31 -04:00
Scott Tolksdorf
f18a181e2e Updating to user create-react-class 2018-04-09 00:12:56 -04:00
Scott Tolksdorf
ed1b5252be lint 2018-04-09 00:12:56 -04:00
Scott Tolksdorf
9fe6fd979b Adding in line highlight for new pages 2017-01-19 12:10:19 -05:00