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/13] 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/13] 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/13] 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 5a9e7850c235c23ca05de2e573ad7e3c96dcb4e0 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 5 Jan 2025 22:53:30 -0500 Subject: [PATCH 04/13] 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 05/13] 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 06/13] 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 07/13] 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 08/13] 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 09/13] 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 10/13] 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 11/13] 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 12/13] 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 13/13] 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;