diff --git a/.circleci/config.yml b/.circleci/config.yml index d1bc1ed80..3bf986cca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,8 +6,8 @@ version: 2 jobs: build: docker: - - image: circleci/node:12.16.3 - - image: circleci/mongo:3.4-jessie + - image: circleci/node:16.10.0 + - image: circleci/mongo:4.4 working_directory: ~/repo diff --git a/Dockerfile b/Dockerfile index 4483c7766..33adea2b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM node:14.15 +FROM node:16.11-alpine +RUN apk --no-cache add git ENV NODE_ENV=docker diff --git a/changelog.md b/changelog.md index 8ee6d33d2..1b22c7d8d 100644 --- a/changelog.md +++ b/changelog.md @@ -30,7 +30,74 @@ pre { } ``` -# changelog +## changelog +For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery). + +### Wednesday 17/11/2021 - v3.0.4 +{{taskList +* [x] Fixed incorrect sorting of Google brews by page count and views on the user page. + + Fixes issues: [#1793](https://github.com/naturalcrit/homebrewery/issues/1793) + +* [x] Added code folding! Only on a page-level for now. Hotkeys `CTRL + [` and `CTRL + ]` to fold/unfold all pages. (Thanks jeddai, new contributor!) + + Fixes issues: [#629](https://github.com/naturalcrit/homebrewery/issues/629) + +* [x] Fixed rendering issues due to the latest Chrome update to version 96. (Also thanks to jeddai!) + + Fixes issues: [#1828](https://github.com/naturalcrit/homebrewery/issues/1828) +}} + +### Wednesday 27/10/2021 - v3.0.3 + +{{taskList +* [x] Moved **Post To Reddit** button from {{fa,fa-info-circle}} **Properties** menu to the **SHARE** {{fa,fa-share-alt}} button as a dropdown. + +* [x] Added a **Copy URL** button to the **SHARE** {{fa,fa-share-alt}} button as a dropdown. + +* [x] Fixed pages being printed directly from `/new` not recognizing the V3 renderer. + + Fixes issues: [#1702](https://github.com/naturalcrit/homebrewery/issues/1702) + +* [x] Updated links to [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) on home page. + + Fixes issues: [#1744](https://github.com/naturalcrit/homebrewery/issues/1744) + +* [x] Added a [FAQ page](https://homebrewery.naturalcrit.com/faq). + + Fixes issues: [#810](https://github.com/naturalcrit/homebrewery/issues/810) + +* [x] Added {{fa,fa-undo}} **Undo** and {{fa,fa-redo}} **Redo** buttons to the snippet bar. + +* [x] Switching between the {{fa,fa-beer}} **Brew** and {{fa,fa-paint-brush}} **Style** tabs no longer loses your scroll position or undo history. + + Fixes issues: [#1735](https://github.com/naturalcrit/homebrewery/issues/1735) + +* [x] Divider bar between editor and preview panels can no longer be dragged off the edge of the screen. + + Fixes issues: [#1674](https://github.com/naturalcrit/homebrewery/issues/1674) +}} + + +### Wednesday 06/10/2021 - v3.0.2 + +{{taskList +* [x] Fixed V3 **EDITOR → QR Code** snippet not working on `/new` (unsaved) pages. + + Fixes issues: [#1710](https://github.com/naturalcrit/homebrewery/issues/1710) + +* [x] Reorganized several snippets from the **Brew Editor** panel into the **Style Editor** panel. + + Fixes issues: [Reported on Reddit](https://www.reddit.com/r/homebrewery/comments/pm6ki7/two_version_of_class_features_making_it_look_more/) + +* [x] Added a page counter to the right of each `\page` line in V3 to help navigate your brews. Starts counting from page 2. + + Fixes issues: [#846](https://github.com/naturalcrit/homebrewery/issues/846) + +* [x] Moved the changelog to be accessible by clicking on the Homebrewery version number. + + Fixes issues: [#1166](https://github.com/naturalcrit/homebrewery/issues/1166) +}} ### Friday, 17/09/2021 - v3.0.1 diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 20f084c28..14038f740 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -1,3 +1,4 @@ +/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/ require('./editor.less'); const React = require('react'); const createClass = require('create-react-class'); @@ -59,6 +60,10 @@ const Editor = createClass({ window.removeEventListener('resize', this.updateEditorSize); }, + componentDidUpdate : function() { + this.highlightCustomMarkdown(); + }, + updateEditorSize : function() { if(this.refs.codeEditor) { let paneHeight = this.refs.main.parentNode.clientHeight; @@ -103,7 +108,7 @@ const Editor = createClass({ const codeMirror = this.refs.codeEditor.codeMirror; //reset custom text styles - const customHighlights = codeMirror.getAllMarks(); + const customHighlights = codeMirror.getAllMarks().filter((mark)=>!mark.__isFold); //Don't undo code folding for (let i=0;i{ @@ -176,30 +181,60 @@ const Editor = createClass({ this.refs.codeEditor?.updateSize(); }, + //Called by CodeEditor after document switch, so Snippetbar can refresh UndoHistory + rerenderParent : function (){ + this.forceUpdate(); + }, + renderEditor : function(){ if(this.isText()){ - return ; + return <> + + ; } if(this.isStyle()){ - return ; + return <> + + ; } if(this.isMeta()){ - return ; + return <> + + + ; } }, + redo : function(){ + return this.refs.codeEditor?.redo(); + }, + + historySize : function(){ + return this.refs.codeEditor?.historySize(); + }, + + undo : function(){ + return this.refs.codeEditor?.undo(); + }, + render : function(){ - this.highlightCustomMarkdown(); return (
+ renderer={this.props.renderer} + undo={this.undo} + redo={this.redo} + historySize={this.historySize()} /> {this.renderEditor()}
diff --git a/client/homebrew/editor/editor.less b/client/homebrew/editor/editor.less index 0097ddbf6..8633e4eb3 100644 --- a/client/homebrew/editor/editor.less +++ b/client/homebrew/editor/editor.less @@ -50,4 +50,16 @@ .tooltipLeft("Jump to brew page"); } + .editorToolbar{ + position: absolute; + top: 5px; + left: 50%; + color: black; + font-size: 13px; + z-index: 9; + span { + padding: 2px 5px; + } + } + } diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.jsx b/client/homebrew/editor/metadataEditor/metadataEditor.jsx index 07158ad45..c7dea871b 100644 --- a/client/homebrew/editor/metadataEditor/metadataEditor.jsx +++ b/client/homebrew/editor/metadataEditor/metadataEditor.jsx @@ -65,18 +65,6 @@ const MetadataEditor = createClass({ }); }, - getRedditLink : function(){ - const meta = this.props.metadata; - - const shareLink = (meta.googleId || '') + meta.shareId; - const title = `${meta.title} [${meta.systems.join(' ')}]`; - const text = `Hey guys! I've been working on this homebrew. I'd love your feedback. Check it out. - -**[Homebrewery Link](https://homebrewery.naturalcrit.com/share/${shareLink})**`; - - return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`; - }, - renderSystems : function(){ return _.map(SYSTEMS, (val)=>{ return