From b647dc55416e800038f470fceaf983a3ed9501ab Mon Sep 17 00:00:00 2001 From: Ksoosoo Date: Fri, 15 Sep 2023 22:54:56 +0900 Subject: [PATCH 1/4] apply scope to the menu class --- webapp/src/widget/menu.scss | 8 ++++---- webapp/src/widget/menu.tsx | 2 +- webapp/src/widget/menuWrapper.scss | 2 +- webapp/src/widget/menuWrapper.tsx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/webapp/src/widget/menu.scss b/webapp/src/widget/menu.scss index f93aaccd..22d21d32 100644 --- a/webapp/src/widget/menu.scss +++ b/webapp/src/widget/menu.scss @@ -1,10 +1,10 @@ .status-dropdown-menu { - > .Menu { + > .TodoMenu { position: inherit; } } -.Menu { +.TodoMenu { display: flex; flex-direction: column; position: absolute; @@ -125,8 +125,8 @@ } } -.Menu, -.SubMenuOption .SubMenu { +.TodoMenu, +.SubTodoMenuOption .SubTodoMenu { @media screen and (max-width: 430px) { position: fixed; top: 0; diff --git a/webapp/src/widget/menu.tsx b/webapp/src/widget/menu.tsx index f9c1198b..a7f40dbf 100644 --- a/webapp/src/widget/menu.tsx +++ b/webapp/src/widget/menu.tsx @@ -19,7 +19,7 @@ export default class Menu extends React.PureComponent { return (
diff --git a/webapp/src/widget/menuWrapper.scss b/webapp/src/widget/menuWrapper.scss index 266ad426..7139a4f9 100644 --- a/webapp/src/widget/menuWrapper.scss +++ b/webapp/src/widget/menuWrapper.scss @@ -1,4 +1,4 @@ -.MenuWrapper { +.TodoMenuWrapper { position: relative; &.disabled { diff --git a/webapp/src/widget/menuWrapper.tsx b/webapp/src/widget/menuWrapper.tsx index 690b5577..5ccfe04b 100644 --- a/webapp/src/widget/menuWrapper.tsx +++ b/webapp/src/widget/menuWrapper.tsx @@ -19,7 +19,7 @@ const MenuWrapper = React.memo((props: Props) => { const [open, setOpen] = useState(Boolean(props.isOpen)); if (!Array.isArray(props.children) || props.children.length !== 2) { - throw new Error('MenuWrapper needs exactly 2 children'); + throw new Error('TodoMenuWrapper needs exactly 2 children'); } const close = (): void => { @@ -76,7 +76,7 @@ const MenuWrapper = React.memo((props: Props) => { }, []); const {children} = props; - let className = 'MenuWrapper'; + let className = 'TodoMenuWrapper'; if (props.disabled) { className += ' disabled'; } From 5f590c7ec78d278197545511a5330d7f2ff01efc Mon Sep 17 00:00:00 2001 From: Ksoosoo Date: Thu, 28 Sep 2023 01:50:01 +0900 Subject: [PATCH 2/4] change error message --- webapp/src/widget/menuWrapper.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/widget/menuWrapper.tsx b/webapp/src/widget/menuWrapper.tsx index 5ccfe04b..f28905cf 100644 --- a/webapp/src/widget/menuWrapper.tsx +++ b/webapp/src/widget/menuWrapper.tsx @@ -19,7 +19,7 @@ const MenuWrapper = React.memo((props: Props) => { const [open, setOpen] = useState(Boolean(props.isOpen)); if (!Array.isArray(props.children) || props.children.length !== 2) { - throw new Error('TodoMenuWrapper needs exactly 2 children'); + throw new Error('MenuWrapper needs exactly 2 children'); } const close = (): void => { From 7182d1412c5fc17ecbe5f3fd97223e1f9541e986 Mon Sep 17 00:00:00 2001 From: Ksoosoo Date: Thu, 28 Sep 2023 01:51:00 +0900 Subject: [PATCH 3/4] remove unused classnames --- webapp/src/widget/menu.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webapp/src/widget/menu.scss b/webapp/src/widget/menu.scss index 22d21d32..5aadafd2 100644 --- a/webapp/src/widget/menu.scss +++ b/webapp/src/widget/menu.scss @@ -125,8 +125,7 @@ } } -.TodoMenu, -.SubTodoMenuOption .SubTodoMenu { +.TodoMenu { @media screen and (max-width: 430px) { position: fixed; top: 0; From 72251f3565e8597ddf69fc9428c276f1de07b852 Mon Sep 17 00:00:00 2001 From: Ksoosoo Date: Thu, 28 Sep 2023 02:05:52 +0900 Subject: [PATCH 4/4] fix lint --- server/command.go | 4 ++-- server/plugin.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/command.go b/server/command.go index 03271397..4442adac 100644 --- a/server/command.go +++ b/server/command.go @@ -102,7 +102,7 @@ func (p *Plugin) postCommandResponse(args *model.CommandArgs, text string) { } // ExecuteCommand executes a given command and returns a command response. -func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) { +func (p *Plugin) ExecuteCommand(_ *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) { spaceRegExp := regexp.MustCompile(`\s+`) trimmedArgs := spaceRegExp.ReplaceAllString(strings.TrimSpace(args.Command), " ") stringArgs := strings.Split(trimmedArgs, " ") @@ -287,7 +287,7 @@ func (p *Plugin) runListCommand(args []string, extra *model.CommandArgs) (bool, return false, nil } -func (p *Plugin) runPopCommand(args []string, extra *model.CommandArgs) (bool, error) { +func (p *Plugin) runPopCommand(_ []string, extra *model.CommandArgs) (bool, error) { issue, foreignID, err := p.listManager.PopIssue(extra.UserId) if err != nil { if err.Error() == "cannot find issue" { diff --git a/server/plugin.go b/server/plugin.go index 0617eaef..ba924ea5 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -105,7 +105,7 @@ func (p *Plugin) OnDeactivate() error { } // ServeHTTP demonstrates a plugin that handles HTTP requests by greeting the world. -func (p *Plugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) { +func (p *Plugin) ServeHTTP(_ *plugin.Context, w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case "/add": p.handleAdd(w, r)