From cac87b14c7d7aad411d0145feeab834151c2ff30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sun, 20 Oct 2024 22:07:33 +0200 Subject: [PATCH 01/19] refactor to func comp and using dialog --- .../brewRenderer/errorBar/errorBar.jsx | 136 ++++++++++-------- .../brewRenderer/errorBar/errorBar.less | 70 +++++---- 2 files changed, 115 insertions(+), 91 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index d2f847306..0b030c668 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -1,75 +1,87 @@ require('./errorBar.less'); const React = require('react'); -const createClass = require('create-react-class'); -const _ = require('lodash'); +const _ = require('lodash'); -const ErrorBar = createClass({ - displayName : 'ErrorBar', - getDefaultProps : function() { - return { - errors : [] - }; - }, - - hasOpenError : false, - hasCloseError : false, - hasMatchError : false, - - renderErrors : function(){ - this.hasOpenError = false; - this.hasCloseError = false; - this.hasMatchError = false; +import Dialog from '../../../components/dialog.jsx'; - const errors = _.map(this.props.errors, (err, idx)=>{ - if(err.id == 'OPEN') this.hasOpenError = true; - if(err.id == 'CLOSE') this.hasCloseError = true; - if(err.id == 'MISMATCH') this.hasMatchError = true; - return
  • - Line {err.line} : {err.text}, '{err.type}' tag -
  • ; - }); +const DISMISS_BUTTON = ; - return ; - }, +const ErrorBar = ( props ) => { + let hasOpenError = false; + let hasCloseError = false; + let hasMatchError = false; - renderProtip : function(){ - const msg = []; - if(this.hasOpenError){ - msg.push(
    - An unmatched opening tag means there's an opened tag that isn't closed. You need to close your tags, like this {'
    '}. Make sure to match types! - ); - } + const renderErrors = () => { + hasOpenError = false; + hasCloseError = false; + hasMatchError = false; - if(this.hasCloseError){ - msg.push(
    - An unmatched closing tag means you closed a tag without opening it. Either remove it, or check to where you think you opened it. -
    ); - } + const errors = _.map(props.errors, (err, idx) => { + if (err.id === 'OPEN') hasOpenError = true; + if (err.id === 'CLOSE') hasCloseError = true; + if (err.id === 'MISMATCH') hasMatchError = true; - if(this.hasMatchError){ - msg.push(
    - A type mismatch means you closed a tag, but the last open tag was a different type. -
    ); - } - return
    -

    Protips!

    - {msg} -
    ; - }, + return ( +
  • + Line {err.line} : {err.text}, '{err.type}' tag +
  • + ); + }); - render : function(){ - if(!this.props.errors.length) return null; + return ; + }; - return
    - -

    There are HTML errors in your markup

    - If these aren't fixed your brew will not render properly when you print it to PDF or share it - {this.renderErrors()} -
    - {this.renderProtip()} -
    ; - } -}); + const renderProtip = () => { + const msg = []; + if (hasOpenError) { + msg.push( +
    + An unmatched opening tag means there's an opened tag that isn't closed. You need to close your tags, like this {'
    '}. Make sure to match types! + + ); + } + + if (hasCloseError) { + msg.push( +
    + An unmatched closing tag means you closed a tag without opening it. Either remove it, or check to where you think you opened it. +
    + ); + } + + if (hasMatchError) { + msg.push( +
    + A type mismatch means you closed a tag, but the last open tag was a different type. +
    + ); + } + + return ( +
    +

    Protips!

    + {msg} +
    + ); + }; + + if (!props.errors.length) return null; + + return ( + +
    + +

    There are HTML errors in your markup

    + + If these aren't fixed your brew will not render properly when you print it to PDF or share it + + {renderErrors()} +
    +
    + {renderProtip()} +
    + ); +}; module.exports = ErrorBar; diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.less b/client/homebrew/brewRenderer/errorBar/errorBar.less index f3f2dbaae..7fa37c91e 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.less +++ b/client/homebrew/brewRenderer/errorBar/errorBar.less @@ -1,60 +1,72 @@ -.errorBar{ +.errorBar { position : absolute; - z-index : 10000; - box-sizing : border-box; + z-index : 1000; width : 100%; - margin-right : 13px; padding : 20px; padding-bottom : 10px; - padding-left : 100px; - background-color : @red; color : white; - i{ - position : absolute; - left : 30px; - opacity : 0.8; - font-size : 3em; + background-color : @red; + border : unset; + + .content { + > i { + float : left; + margin-right : 10px; + margin-bottom : 20px; + font-size : 3em; + opacity : 0.8; + } + h3 { + font-size : 1.1em; + font-weight : 800; + } } - h3{ - font-size : 1.1em; - font-weight : 800; - } - ul{ + + ul { margin-top : 15px; font-size : 0.8em; list-style-position : inside; list-style-type : disc; - li{ - line-height : 1.6em; - } + li { line-height : 1.6em; } } - hr{ + hr { box-sizing : border-box; + width : 100%; height : 2px; - width : 150%; margin-top : 25px; margin-bottom : 15px; margin-left : -100px; background-color : darken(@red, 8%); border : none; } - small{ - font-size: 0.6em; - opacity: 0.7; + small { + font-size : 0.6em; + opacity : 0.7; } - .protips{ - margin-left : -80px; + .protips { font-size : 0.6em; - &>div{ + & > div { margin-bottom : 10px; line-height : 1.2em; } - h4{ - opacity : 0.8; + h4 { font-weight : 800; line-height : 1.5em; text-transform : uppercase; + opacity : 0.8; } } + button.dismiss { + position : absolute; + top : 30px; + right : 30px; + height : max-content; + padding : unset; + font-size : 40px; + cursor : pointer; + background-color : transparent; + opacity : 0.6; + &:hover { opacity : 1; } + } } \ No newline at end of file From 976740dc8b84c96c10a5232c250daf704c446324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sun, 20 Oct 2024 22:21:07 +0200 Subject: [PATCH 02/19] make more concise --- .../brewRenderer/errorBar/errorBar.jsx | 81 ++++++------------- 1 file changed, 25 insertions(+), 56 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index 0b030c668..e951e4aaa 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -7,67 +7,36 @@ import Dialog from '../../../components/dialog.jsx'; const DISMISS_BUTTON = ; -const ErrorBar = ( props ) => { - let hasOpenError = false; - let hasCloseError = false; - let hasMatchError = false; +const ErrorBar = (props) => { + let hasOpenError = false, hasCloseError = false, hasMatchError = false; - const renderErrors = () => { - hasOpenError = false; - hasCloseError = false; - hasMatchError = false; + const renderErrors = () => ( +
      + {_.map(props.errors, (err, idx) => { + if (err.id === 'OPEN') hasOpenError = true; + if (err.id === 'CLOSE') hasCloseError = true; + if (err.id === 'MISMATCH') hasMatchError = true; + return ( +
    • + Line {err.line} : {err.text}, '{err.type}' tag +
    • + ); + })} +
    + ); - const errors = _.map(props.errors, (err, idx) => { - if (err.id === 'OPEN') hasOpenError = true; - if (err.id === 'CLOSE') hasCloseError = true; - if (err.id === 'MISMATCH') hasMatchError = true; - - return ( -
  • - Line {err.line} : {err.text}, '{err.type}' tag -
  • - ); - }); - - return
      {errors}
    ; - }; - - const renderProtip = () => { - const msg = []; - if (hasOpenError) { - msg.push( -
    - An unmatched opening tag means there's an opened tag that isn't closed. You need to close your tags, like this {'
    '}. Make sure to match types! - - ); - } - - if (hasCloseError) { - msg.push( -
    - An unmatched closing tag means you closed a tag without opening it. Either remove it, or check to where you think you opened it. -
    - ); - } - - if (hasMatchError) { - msg.push( -
    - A type mismatch means you closed a tag, but the last open tag was a different type. -
    - ); - } - - return ( -
    -

    Protips!

    - {msg} -
    - ); - }; + const renderProtip = () => ( +
    +

    Protips!

    + {hasOpenError &&
    Unmatched opening tag. Close your tags, like this {'
    '}. Match types!
    } + {hasCloseError &&
    Unmatched closing tag. Either remove it or check where it was opened.
    } + {hasMatchError &&
    Type mismatch. Closed a tag with a different type.
    } + + ); if (!props.errors.length) return null; + return (
    From ebdbb39f247f956619f8711242a6e68ff1bd4dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sun, 20 Oct 2024 22:29:14 +0200 Subject: [PATCH 03/19] linting --- .../brewRenderer/errorBar/errorBar.jsx | 64 +++++++++---------- .../brewRenderer/errorBar/errorBar.less | 39 ++++------- 2 files changed, 44 insertions(+), 59 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index e951e4aaa..c79e068b0 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -7,49 +7,49 @@ import Dialog from '../../../components/dialog.jsx'; const DISMISS_BUTTON = ; -const ErrorBar = (props) => { - let hasOpenError = false, hasCloseError = false, hasMatchError = false; +const ErrorBar = (props)=>{ + let hasOpenError = false, hasCloseError = false, hasMatchError = false; - const renderErrors = () => ( -
      - {_.map(props.errors, (err, idx) => { - if (err.id === 'OPEN') hasOpenError = true; - if (err.id === 'CLOSE') hasCloseError = true; - if (err.id === 'MISMATCH') hasMatchError = true; - return ( -
    • + const renderErrors = ()=>( +
        + {_.map(props.errors, (err, idx)=>{ + if(err.id === 'OPEN') hasOpenError = true; + if(err.id === 'CLOSE') hasCloseError = true; + if(err.id === 'MISMATCH') hasMatchError = true; + return ( +
      • Line {err.line} : {err.text}, '{err.type}' tag -
      • - ); - })} -
      - ); +
    • + ); + })} +
    + ); - const renderProtip = () => ( -
    -

    Protips!

    - {hasOpenError &&
    Unmatched opening tag. Close your tags, like this {'
    '}. Match types!
    } - {hasCloseError &&
    Unmatched closing tag. Either remove it or check where it was opened.
    } - {hasMatchError &&
    Type mismatch. Closed a tag with a different type.
    } -
    - ); + const renderProtip = ()=>( +
    +

    Protips!

    + {hasOpenError &&
    Unmatched opening tag. Close your tags, like this {'
    '}. Match types!
    } + {hasCloseError &&
    Unmatched closing tag. Either remove it or check where it was opened.
    } + {hasMatchError &&
    Type mismatch. Closed a tag with a different type.
    } + + ); - if (!props.errors.length) return null; + if(!props.errors.length) return null; - return ( - -
    - -

    There are HTML errors in your markup

    + return ( + +
    + +

    There are HTML errors in your markup

    If these aren't fixed your brew will not render properly when you print it to PDF or share it {renderErrors()}
    -
    - {renderProtip()} -
    +
    + {renderProtip()} +
    ); }; diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.less b/client/homebrew/brewRenderer/errorBar/errorBar.less index 7fa37c91e..14abc4b6e 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.less +++ b/client/homebrew/brewRenderer/errorBar/errorBar.less @@ -3,13 +3,11 @@ position : absolute; z-index : 1000; width : 100%; - padding : 20px; - padding-bottom : 10px; color : white; background-color : @red; border : unset; - .content { + div { > i { float : left; margin-right : 10px; @@ -17,26 +15,19 @@ font-size : 3em; opacity : 0.8; } - h3 { - font-size : 1.1em; - font-weight : 800; - } - } - - ul { - margin-top : 15px; - font-size : 0.8em; - list-style-position : inside; - list-style-type : disc; - li { line-height : 1.6em; } + h2 { font-weight : 800; } + ul { + margin-top : 15px; + font-size : 0.8em; + list-style-position : inside; + list-style-type : disc; + li { line-height : 1.6em; } + } } hr { - box-sizing : border-box; - width : 100%; height : 2px; margin-top : 25px; margin-bottom : 15px; - margin-left : -100px; background-color : darken(@red, 8%); border : none; } @@ -45,26 +36,20 @@ opacity : 0.7; } .protips { - font-size : 0.6em; - & > div { - margin-bottom : 10px; - line-height : 1.2em; - } + font-size : 0.6em; + line-height : 1.2em; h4 { font-weight : 800; line-height : 1.5em; text-transform : uppercase; - opacity : 0.8; } } button.dismiss { position : absolute; - top : 30px; + top : 20px; right : 30px; - height : max-content; padding : unset; font-size : 40px; - cursor : pointer; background-color : transparent; opacity : 0.6; &:hover { opacity : 1; } From 674fb6ff579e1c462a482fb145ecdce26b337ecd Mon Sep 17 00:00:00 2001 From: David Bolack Date: Fri, 20 Dec 2024 20:33:12 -0600 Subject: [PATCH 04/19] Update Docker instructions in support of #1930 Updates README.DOCKER.md and Dockerfile --- Dockerfile | 1 + README.DOCKER.md | 111 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 104 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 84652fbf9..317625f42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ WORKDIR /usr/src/app # Copy package.json into the image, then run yarn install # This improves caching so we don't have to download the dependencies every time the code changes COPY package.json ./ +COPY config/default.json config/default.json # --ignore-scripts tells yarn not to run postbuild. We run it explicitly later RUN npm install --ignore-scripts diff --git a/README.DOCKER.md b/README.DOCKER.md index 356ac398a..ca8e7c864 100644 --- a/README.DOCKER.md +++ b/README.DOCKER.md @@ -1,12 +1,107 @@ -# Running Homebrewery via Docker +# Offline Install Instructions: Docker -The repo includes a Dockerfile and a docker-compose.yml file. + These instructions are for setting up a persistent instance of the Homebrewery application locally using Docker. + + If you intend to develop with Homebrewery, following the Homebrewery application section of this guide is not recommended. Using docker to deploy MongoDB locally for development is not a bad idea at all, however. + + # Install Docker -To run the application via docker-compose.yml: -`docker-compose up -d` + ## Docker Desktop (MacOS/Windows) + + Windows and Mac installs use Docker Desktop. Current install instructions are below. + + * [Mac](https://docs.docker.com/desktop/mac/install/) + * [Windows](https://docs.docker.com/desktop/windows/install/) + + You can set up the docker engine to start on boot via the Docker desktop UI. + + ## Docker Engine -To stop the application: -`docker-compose down` + Linux installs use Docker Engine. Docker provides installers and instructions for several of the most common distrubutions. If you do not see yours listed, it is very likely supported indirectly by your distribution. + + * [Arch](https://docs.docker.com/desktop/setup/install/linux/archlinux/) + * [CentOS](https://docs.docker.com/engine/install/centos/) + * [Debian](https://docs.docker.com/engine/install/debian/) + * [Fedora](https://docs.docker.com/engine/install/fedora/) + * [RHEL](https://docs.docker.com/engine/install/rhel/) + * [Ubuntu](https://docs.docker.com/engine/install/ubuntu/) + + ### Post installation steps + [Manage Docker as a non-root user (highly recommended)](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) + [Enable Docker to start on boot (highly recommended)](https://docs.docker.com/engine/install/linux-postinstall/#configure-docker-to-start-on-boot) + + # Build Homebrewery Image + +Next we build the homebrewery docker image. Start by cloning the repository. + + ```shell + git clone https://github.com/naturalcrit/homebrewery.git + cd homebrewery + ``` + + Make an changes you need to `config/default.json` then build the image. + + ```shell + docker-compose build homebrewery + ``` + + # Add Mongo container + + Once docker is installed and running, it is time to set up the containers. First up, Mongo. + + ```shell + docker run --name homebrewery-mongodb -d --restart unless-stopped -v mongodata:/data/db -p 27017:27017 mongo:latest + ``` + + Older CPUs may run into an issue with AVX support. + ``` + WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that! + see https://jira.mongodb.org/browse/SERVER-54407 + see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2 + see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814 +``` +If you see a message similar to this, try using the bitnami mongo instead. + +```shell +docker run --name homebrewery-mongodb -d --restart unless-stopped -v mongodata:/data/db -p 27017:27017 bitnami/mongo:latest +``` + + If your distribution is running on an arm device such as a Raspberry Pi, you will need to run the arm-built MongoDB v4.4. + +```shell +docker run --name homebrewery-mongodb -d --restart unless-stopped -v mongodata:/data/db -p 27017:27017 arm64v8/mongo:4.4 +``` + + ## Run the Homebrewery Image + ```shell + # Make sure you run this in the homebrewery directory + docker run --name homebrewery-app -d --restart unless-stopped -e NODE_ENV=docker -v $(pwd)/config/docker.json:/usr/src/app/config/docker.json -p 8000:8000 docker.io/library/homebrewery:latest + ``` + + ## Updating the Image + +When Homebrewery code updates, your docker container will not automatically follow the changes. To do so you will need to rebuild your homebrewery image. + +First, return to your homebrewery clone (from Build Homebrewery Image above) or recreate the clone if you deleted your copy of the code. + +First, delete the existing image. + + ```shell + docker rm -f homebrewery-app + ``` + + Next, update the clone's code to the latest version. + + ```shell + cd homebrewery + git checkout master + git pull upstream master + ``` + + Finally, rebuild and restart the homebrewery image. + + ```shell + docker-compose build homebrewery + docker run --name homebrewery-app -d --restart unless-stopped -e NODE_ENV=docker -v $(pwd)/config/docker.json:/usr/src/app/config/docker.json -p 8000:8000 docker.io/library/homebrewery:latest + ``` -To stop the application and remove all data: -`docker-compose down -v` From 2bedc6d7d4b3c0c94e8be43f2cdd91de4a3dfd8a Mon Sep 17 00:00:00 2001 From: David Bolack Date: Fri, 20 Dec 2024 21:30:19 -0600 Subject: [PATCH 05/19] Updates to docker files and cooresponding documentation. --- Dockerfile | 6 +- README.DOCKER.md | 164 ++++++++++++++++++++++++--------------------- docker-compose.yml | 1 - 3 files changed, 92 insertions(+), 79 deletions(-) diff --git a/Dockerfile b/Dockerfile index 317625f42..17d02b01f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine +FROM node:22-alpine RUN apk --no-cache add git ENV NODE_ENV=docker @@ -9,8 +9,10 @@ WORKDIR /usr/src/app # Copy package.json into the image, then run yarn install # This improves caching so we don't have to download the dependencies every time the code changes COPY package.json ./ -COPY config/default.json config/default.json +COPY config/docker.json usr/src/app/config # --ignore-scripts tells yarn not to run postbuild. We run it explicitly later +RUN node --version +RUN npm --version RUN npm install --ignore-scripts # Bundle app source and build application diff --git a/README.DOCKER.md b/README.DOCKER.md index ca8e7c864..ee2d0bb2f 100644 --- a/README.DOCKER.md +++ b/README.DOCKER.md @@ -1,107 +1,119 @@ # Offline Install Instructions: Docker - These instructions are for setting up a persistent instance of the Homebrewery application locally using Docker. - - If you intend to develop with Homebrewery, following the Homebrewery application section of this guide is not recommended. Using docker to deploy MongoDB locally for development is not a bad idea at all, however. - - # Install Docker +These instructions are for setting up a persistent instance of the Homebrewery application locally using Docker. - ## Docker Desktop (MacOS/Windows) - - Windows and Mac installs use Docker Desktop. Current install instructions are below. - - * [Mac](https://docs.docker.com/desktop/mac/install/) - * [Windows](https://docs.docker.com/desktop/windows/install/) - - You can set up the docker engine to start on boot via the Docker desktop UI. - - ## Docker Engine +If you intend to develop with Homebrewery, following the Homebrewery application section of this guide is not recommended. Using docker to deploy MongoDB locally for development is not a bad idea at all, however. - Linux installs use Docker Engine. Docker provides installers and instructions for several of the most common distrubutions. If you do not see yours listed, it is very likely supported indirectly by your distribution. +# Install Docker - * [Arch](https://docs.docker.com/desktop/setup/install/linux/archlinux/) - * [CentOS](https://docs.docker.com/engine/install/centos/) - * [Debian](https://docs.docker.com/engine/install/debian/) - * [Fedora](https://docs.docker.com/engine/install/fedora/) - * [RHEL](https://docs.docker.com/engine/install/rhel/) - * [Ubuntu](https://docs.docker.com/engine/install/ubuntu/) - - ### Post installation steps - [Manage Docker as a non-root user (highly recommended)](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) - [Enable Docker to start on boot (highly recommended)](https://docs.docker.com/engine/install/linux-postinstall/#configure-docker-to-start-on-boot) - - # Build Homebrewery Image +## Docker Desktop (MacOS/Windows) + +Windows and Mac installs use Docker Desktop. Current install instructions are below. + +* [Mac](https://docs.docker.com/desktop/mac/install/) +* [Windows](https://docs.docker.com/desktop/windows/install/) + +You can set up the docker engine to start on boot via the Docker desktop UI. + +## Docker Engine + +Linux installs use Docker Engine. Docker provides installers and instructions for several of the most common distrubutions. If you do not see yours listed, it is very likely supported indirectly by your distribution. + +* [Arch](https://docs.docker.com/desktop/setup/install/linux/archlinux/) +* [CentOS](https://docs.docker.com/engine/install/centos/) +* [Debian](https://docs.docker.com/engine/install/debian/) +* [Fedora](https://docs.docker.com/engine/install/fedora/) +* [RHEL](https://docs.docker.com/engine/install/rhel/) + * [Ubuntu](https://docs.docker.com/engine/install/ubuntu/) + +### Post installation steps +[Manage Docker as a non-root user (highly recommended)](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) +[Enable Docker to start on boot (highly recommended)](https://docs.docker.com/engine/install/linux-postinstall/#configure-docker-to-start-on-boot) + +# Build Homebrewery Image Next we build the homebrewery docker image. Start by cloning the repository. - ```shell - git clone https://github.com/naturalcrit/homebrewery.git - cd homebrewery - ``` +```shell +git clone https://github.com/naturalcrit/homebrewery.git +cd homebrewery +``` - Make an changes you need to `config/default.json` then build the image. +Make an changes you need to `config/docker.json` then build the image. If it does not exist,the below as a template. - ```shell - docker-compose build homebrewery - ``` - - # Add Mongo container +``` +{ +"host" : "localhost:8000", +"naturalcrit_url" : "local.naturalcrit.com:8010", +"secret" : "secret", +"web_port" : 8000, +"enable_v3" : true, +"mongodb_uri": "mongodb://172.17.0.2/homebrewery", +"enable_themes" : true, +} +``` - Once docker is installed and running, it is time to set up the containers. First up, Mongo. +```shell +docker-compose build homebrewery +``` - ```shell - docker run --name homebrewery-mongodb -d --restart unless-stopped -v mongodata:/data/db -p 27017:27017 mongo:latest - ``` +# Add Mongo container - Older CPUs may run into an issue with AVX support. - ``` - WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that! - see https://jira.mongodb.org/browse/SERVER-54407 - see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2 - see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814 +Once docker is installed and running, it is time to set up the containers. First up, Mongo. + +```shell +docker run --name homebrewery-mongodb -d --restart unless-stopped -v mongodata:/data/db -p 27017:27017 mongo:latest +``` + +Older CPUs may run into an issue with AVX support. +``` +WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that! + see https://jira.mongodb.org/browse/SERVER-54407 + see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2 + see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814 ``` If you see a message similar to this, try using the bitnami mongo instead. ```shell docker run --name homebrewery-mongodb -d --restart unless-stopped -v mongodata:/data/db -p 27017:27017 bitnami/mongo:latest ``` - - If your distribution is running on an arm device such as a Raspberry Pi, you will need to run the arm-built MongoDB v4.4. - + +If your distribution is running on an arm device such as a Raspberry Pi, you will need to run the arm-built MongoDB v4.4. + ```shell docker run --name homebrewery-mongodb -d --restart unless-stopped -v mongodata:/data/db -p 27017:27017 arm64v8/mongo:4.4 ``` - - ## Run the Homebrewery Image - ```shell - # Make sure you run this in the homebrewery directory - docker run --name homebrewery-app -d --restart unless-stopped -e NODE_ENV=docker -v $(pwd)/config/docker.json:/usr/src/app/config/docker.json -p 8000:8000 docker.io/library/homebrewery:latest - ``` - - ## Updating the Image - + +## Run the Homebrewery Image +```shell +# Make sure you run this in the homebrewery directory +docker run --name homebrewery-app -d --restart unless-stopped -e NODE_ENV=docker -v $(pwd)/config/docker.json:/usr/src/app/config/docker.json -p 8000:8000 docker.io/library/homebrewery:latest +``` + +## Updating the Image + When Homebrewery code updates, your docker container will not automatically follow the changes. To do so you will need to rebuild your homebrewery image. First, return to your homebrewery clone (from Build Homebrewery Image above) or recreate the clone if you deleted your copy of the code. First, delete the existing image. - - ```shell - docker rm -f homebrewery-app - ``` - Next, update the clone's code to the latest version. +```shell +docker rm -f homebrewery-app +``` - ```shell - cd homebrewery - git checkout master - git pull upstream master - ``` +Next, update the clone's code to the latest version. - Finally, rebuild and restart the homebrewery image. - - ```shell - docker-compose build homebrewery - docker run --name homebrewery-app -d --restart unless-stopped -e NODE_ENV=docker -v $(pwd)/config/docker.json:/usr/src/app/config/docker.json -p 8000:8000 docker.io/library/homebrewery:latest - ``` +```shell +cd homebrewery +git checkout master +git pull upstream master +``` + +Finally, rebuild and restart the homebrewery image. + +```shell +docker-compose build homebrewery +docker run --name homebrewery-app -d --restart unless-stopped -e NODE_ENV=docker -v $(pwd)/config/docker.json:/usr/src/app/config/docker.json -p 8000:8000 docker.io/library/homebrewery:latest +``` diff --git a/docker-compose.yml b/docker-compose.yml index f74fadc0a..d7e5f3b90 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '2' services: mongodb: image: mongo:latest From 59006d354f44846305dd6acdb61eb77872124d39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 03:43:42 +0000 Subject: [PATCH 06/19] Bump mongoose from 8.9.2 to 8.9.3 Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.9.2 to 8.9.3. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md) - [Commits](https://github.com/Automattic/mongoose/compare/8.9.2...8.9.3) --- updated-dependencies: - dependency-name: mongoose dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86621deaa..e9991c8f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", - "mongoose": "^8.9.2", + "mongoose": "^8.9.3", "nanoid": "5.0.9", "nconf": "^0.12.1", "react": "^18.3.1", @@ -10170,9 +10170,9 @@ } }, "node_modules/mongoose": { - "version": "8.9.2", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.2.tgz", - "integrity": "sha512-mLWynmZS1v8HTeMxyLhskQncS1SkrjW1eLNuFDYGQMQ/5QrFrxTLNwWXeCRZeKT2lXyaxW8bnJC9AKPT9jYMkw==", + "version": "8.9.3", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.3.tgz", + "integrity": "sha512-G50GNPdMqhoiRAJ/24GYAzg13yxXDD3FOOFeYiFwtHmHpAJem3hxbYIxAhLJGWbYEiUZL0qFMu2LXYkgGAmo+Q==", "dependencies": { "bson": "^6.10.1", "kareem": "2.6.3", diff --git a/package.json b/package.json index fba3db7d8..4fd3db424 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", - "mongoose": "^8.9.2", + "mongoose": "^8.9.3", "nanoid": "5.0.9", "nconf": "^0.12.1", "react": "^18.3.1", From e9b5e4ab0c9335ea169fe21ba1d9314e77ac9a37 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 5 Jan 2025 15:04:55 -0500 Subject: [PATCH 07/19] indent --- README.DOCKER.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.DOCKER.md b/README.DOCKER.md index ee2d0bb2f..4dfbef045 100644 --- a/README.DOCKER.md +++ b/README.DOCKER.md @@ -24,7 +24,7 @@ Linux installs use Docker Engine. Docker provides installers and instructions fo * [Debian](https://docs.docker.com/engine/install/debian/) * [Fedora](https://docs.docker.com/engine/install/fedora/) * [RHEL](https://docs.docker.com/engine/install/rhel/) - * [Ubuntu](https://docs.docker.com/engine/install/ubuntu/) +* [Ubuntu](https://docs.docker.com/engine/install/ubuntu/) ### Post installation steps [Manage Docker as a non-root user (highly recommended)](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) From a091a1860422d6f64b3b67039bbe8f8067ef286a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 03:06:16 +0000 Subject: [PATCH 08/19] Bump marked-extended-tables from 1.0.10 to 1.1.0 Bumps [marked-extended-tables](https://github.com/calculuschild/marked-extended-tables) from 1.0.10 to 1.1.0. - [Release notes](https://github.com/calculuschild/marked-extended-tables/releases) - [Changelog](https://github.com/calculuschild/marked-extended-tables/blob/main/release.config.cjs) - [Commits](https://github.com/calculuschild/marked-extended-tables/commits/v1.1.0) --- updated-dependencies: - dependency-name: marked-extended-tables dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index e9991c8f4..3bf93d8f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "lodash": "^4.17.21", "marked": "11.2.0", "marked-emoji": "^1.4.3", - "marked-extended-tables": "^1.0.10", + "marked-extended-tables": "^1.1.0", "marked-gfm-heading-id": "^3.2.0", "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", @@ -9791,11 +9791,11 @@ } }, "node_modules/marked-extended-tables": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/marked-extended-tables/-/marked-extended-tables-1.0.10.tgz", - "integrity": "sha512-zvRS0GPTkxq8UWawSDecd1Rxd2KD8crrmq2QALGDdrgkcgRNQzHlbnlujBGuXxdgDJg7f6UTv+JpcfejBpKdSg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/marked-extended-tables/-/marked-extended-tables-1.1.0.tgz", + "integrity": "sha512-xPQlnmr/mpIJEjwg9/guSKzxoKu7hyCD/sM59mcZc+nMIh2JuVM2se+kCa1Jo1UH+BEHcNlZ221ziJ/cOxAgCA==", "peerDependencies": { - "marked": ">=3 <15" + "marked": ">=3 <16" } }, "node_modules/marked-gfm-heading-id": { diff --git a/package.json b/package.json index 4fd3db424..6b9a4f930 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "lodash": "^4.17.21", "marked": "11.2.0", "marked-emoji": "^1.4.3", - "marked-extended-tables": "^1.0.10", + "marked-extended-tables": "^1.1.0", "marked-gfm-heading-id": "^3.2.0", "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", From b49936c24b96eb3151c630586f60d802c2f66cc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 03:13:48 +0000 Subject: [PATCH 09/19] Bump babel-plugin-transform-import-meta from 2.2.1 to 2.3.2 Bumps [babel-plugin-transform-import-meta](https://github.com/javiertury/babel-plugin-transform-import-meta) from 2.2.1 to 2.3.2. - [Changelog](https://github.com/javiertury/babel-plugin-transform-import-meta/blob/master/CHANGELOG.md) - [Commits](https://github.com/javiertury/babel-plugin-transform-import-meta/compare/v2.2.1...v2.3.2) --- updated-dependencies: - dependency-name: babel-plugin-transform-import-meta dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 13 ++++++------- package.json | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3bf93d8f9..da1759b43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ }, "devDependencies": { "@stylistic/stylelint-plugin": "^3.1.1", - "babel-plugin-transform-import-meta": "^2.2.1", + "babel-plugin-transform-import-meta": "^2.3.2", "eslint": "^9.17.0", "eslint-plugin-jest": "^28.10.0", "eslint-plugin-react": "^7.37.3", @@ -3659,14 +3659,13 @@ } }, "node_modules/babel-plugin-transform-import-meta": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-import-meta/-/babel-plugin-transform-import-meta-2.2.1.tgz", - "integrity": "sha512-AxNh27Pcg8Kt112RGa3Vod2QS2YXKKJ6+nSvRtv7qQTJAdx0MZa4UHZ4lnxHUWA2MNbLuZQv5FVab4P1CoLOWw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-import-meta/-/babel-plugin-transform-import-meta-2.3.2.tgz", + "integrity": "sha512-902o4GiQqI1GqAXfD5rEoz0PJamUfJ3VllpdWaNsFTwdaNjFSFHawvBO+cp5K2j+g2h3bZ4lnM1Xb6yFYGihtA==", "dev": true, - "license": "BSD", "dependencies": { - "@babel/template": "^7.4.4", - "tslib": "^2.4.0" + "@babel/template": "^7.25.9", + "tslib": "^2.8.1" }, "peerDependencies": { "@babel/core": "^7.10.0" diff --git a/package.json b/package.json index 6b9a4f930..7acffcda8 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ }, "devDependencies": { "@stylistic/stylelint-plugin": "^3.1.1", - "babel-plugin-transform-import-meta": "^2.2.1", + "babel-plugin-transform-import-meta": "^2.3.2", "eslint": "^9.17.0", "eslint-plugin-jest": "^28.10.0", "eslint-plugin-react": "^7.37.3", From 5a9e7850c235c23ca05de2e573ad7e3c96dcb4e0 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 5 Jan 2025 22:53:30 -0500 Subject: [PATCH 10/19] space to tabs --- client/homebrew/brewRenderer/errorBar/errorBar.jsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index c79e068b0..664b835fe 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -4,7 +4,6 @@ const _ = require('lodash'); import Dialog from '../../../components/dialog.jsx'; - const DISMISS_BUTTON = ; const ErrorBar = (props)=>{ @@ -18,7 +17,7 @@ const ErrorBar = (props)=>{ if(err.id === 'MISMATCH') hasMatchError = true; return (
  • - Line {err.line} : {err.text}, '{err.type}' tag + Line {err.line} : {err.text}, '{err.type}' tag
  • ); })} @@ -42,10 +41,10 @@ const ErrorBar = (props)=>{

    There are HTML errors in your markup

    - - If these aren't fixed your brew will not render properly when you print it to PDF or share it - - {renderErrors()} + + If these aren't fixed your brew will not render properly when you print it to PDF or share it + + {renderErrors()}

    {renderProtip()} From c137d40037a7e828bf33cad500a7aa33712b3a0f Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 5 Jan 2025 22:58:48 -0500 Subject: [PATCH 11/19] More alignment --- client/homebrew/brewRenderer/errorBar/errorBar.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index 664b835fe..9529fa9a4 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -27,7 +27,7 @@ const ErrorBar = (props)=>{ const renderProtip = ()=>(

    Protips!

    - {hasOpenError &&
    Unmatched opening tag. Close your tags, like this {'
    '}. Match types!
    } + {hasOpenError &&
    Unmatched opening tag. Close your tags, like this {'
    '}. Match types!} {hasCloseError &&
    Unmatched closing tag. Either remove it or check where it was opened.
    } {hasMatchError &&
    Type mismatch. Closed a tag with a different type.
    } @@ -42,7 +42,7 @@ const ErrorBar = (props)=>{

    There are HTML errors in your markup

    - If these aren't fixed your brew will not render properly when you print it to PDF or share it + If these aren't fixed your brew will not render properly when you print it to PDF or share it {renderErrors()} From 85cd7c7336ff17a7d0a9c5ebfc5e759e4967e62e Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 5 Jan 2025 23:04:48 -0500 Subject: [PATCH 12/19] 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. --- client/homebrew/brewRenderer/errorBar/errorBar.jsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index 9529fa9a4..33e461fa8 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -1,6 +1,5 @@ require('./errorBar.less'); const React = require('react'); -const _ = require('lodash'); import Dialog from '../../../components/dialog.jsx'; @@ -9,13 +8,15 @@ const DISMISS_BUTTON = ; const ErrorBar = (props)=>{ let hasOpenError = false, hasCloseError = false, hasMatchError = false; + props.errors.map( err => { + if(err.id === 'OPEN') hasOpenError = true; + if(err.id === 'CLOSE') hasCloseError = true; + if(err.id === 'MISMATCH') hasMatchError = true; + }); + const renderErrors = ()=>(
      - {_.map(props.errors, (err, idx)=>{ - if(err.id === 'OPEN') hasOpenError = true; - if(err.id === 'CLOSE') hasCloseError = true; - if(err.id === 'MISMATCH') hasMatchError = true; - return ( + {props.errors.map((err, idx)=>{
    • Line {err.line} : {err.text}, '{err.type}' tag
    • From fbedafb20421d7e4e9b8bafe7a90e7233dabb83d Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 5 Jan 2025 23:04:57 -0500 Subject: [PATCH 13/19] typo --- client/homebrew/brewRenderer/errorBar/errorBar.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index 33e461fa8..847ccbc32 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -20,7 +20,6 @@ const ErrorBar = (props)=>{
    • Line {err.line} : {err.text}, '{err.type}' tag
    • - ); })}
    ); From aa4276a50eb17c52fa24a80afafd53f313c733d5 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 5 Jan 2025 23:06:56 -0500 Subject: [PATCH 14/19] Move exit condition to start --- client/homebrew/brewRenderer/errorBar/errorBar.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index 847ccbc32..156046b1e 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -6,6 +6,7 @@ import Dialog from '../../../components/dialog.jsx'; const DISMISS_BUTTON = ; const ErrorBar = (props)=>{ + if(!props.errors.length) return null; let hasOpenError = false, hasCloseError = false, hasMatchError = false; props.errors.map( err => { @@ -33,9 +34,6 @@ const ErrorBar = (props)=>{ ); - if(!props.errors.length) return null; - - return (
    From 766ab8f10a95947cf29b64ae0d2363393e815956 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 5 Jan 2025 23:07:53 -0500 Subject: [PATCH 15/19] Lint --- client/homebrew/brewRenderer/errorBar/errorBar.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index 156046b1e..78eec51ff 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -9,7 +9,7 @@ const ErrorBar = (props)=>{ if(!props.errors.length) return null; let hasOpenError = false, hasCloseError = false, hasMatchError = false; - props.errors.map( err => { + props.errors.map((err)=>{ if(err.id === 'OPEN') hasOpenError = true; if(err.id === 'CLOSE') hasCloseError = true; if(err.id === 'MISMATCH') hasMatchError = true; @@ -18,9 +18,9 @@ const ErrorBar = (props)=>{ const renderErrors = ()=>(
      {props.errors.map((err, idx)=>{ -
    • - Line {err.line} : {err.text}, '{err.type}' tag -
    • +
    • + Line {err.line} : {err.text}, '{err.type}' tag +
    • ; })}
    ); From 40d453bc7cdfd7e3320d6ffa6216bad8b27ca632 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 7 Jan 2025 18:00:45 +1300 Subject: [PATCH 16/19] Return if no notifications --- .../brewRenderer/notificationPopup/notificationPopup.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx index 0c8fc4b8c..b2045f13d 100644 --- a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx +++ b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx @@ -49,6 +49,7 @@ const NotificationPopup = ()=>{ )); }; + if(!notifications.length) return; return
    From d9b599e8148d260312e735ab2db9e16d207a4900 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 7 Jan 2025 18:01:17 +1300 Subject: [PATCH 17/19] Fix error listing --- client/homebrew/brewRenderer/errorBar/errorBar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index 78eec51ff..78b36d70c 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -18,7 +18,7 @@ const ErrorBar = (props)=>{ const renderErrors = ()=>(
      {props.errors.map((err, idx)=>{ -
    • + return
    • Line {err.line} : {err.text}, '{err.type}' tag
    • ; })} From 37d00f1255ef833cf9e33a3389847257753a28f3 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 7 Jan 2025 18:01:58 +1300 Subject: [PATCH 18/19] Remove dismissKeys check before displaying dialog --- client/components/dialog.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/components/dialog.jsx b/client/components/dialog.jsx index 0cdda2dee..e88d06c99 100644 --- a/client/components/dialog.jsx +++ b/client/components/dialog.jsx @@ -6,10 +6,8 @@ function Dialog({ dismisskeys = [], closeText = 'Close', blocking = false, ...re const dialogRef = useRef(null); useEffect(()=>{ - if(dismisskeys.length !== 0) { - blocking ? dialogRef.current?.showModal() : dialogRef.current?.show(); - } - }, [dialogRef.current, dismisskeys]); + blocking ? dialogRef.current?.showModal() : dialogRef.current?.show(); + }, []); const dismiss = ()=>{ dismisskeys.forEach((key)=>{ From 2779055e50643339f7dfe0c2b74b42193d391a66 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 7 Jan 2025 18:02:17 +1300 Subject: [PATCH 19/19] Stop error bar from blocking menus --- client/homebrew/brewRenderer/errorBar/errorBar.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.less b/client/homebrew/brewRenderer/errorBar/errorBar.less index 14abc4b6e..163648533 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.less +++ b/client/homebrew/brewRenderer/errorBar/errorBar.less @@ -1,7 +1,8 @@ .errorBar { position : absolute; - z-index : 1000; + top : 32px; + z-index : 1; width : 100%; color : white; background-color : @red;