Skip to content

Commit

Permalink
[MM-54367] Apply scope to the menu class (#213)
Browse files Browse the repository at this point in the history
* apply scope to the menu class

* change error message

* remove unused classnames

* fix lint
  • Loading branch information
kyeongsoosoo authored Sep 28, 2023
1 parent a309a7a commit 1aa947c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions server/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, " ")
Expand Down Expand Up @@ -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" {
Expand Down
2 changes: 1 addition & 1 deletion server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (p *Plugin) initializeAPI() {
}

// 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) {
w.Header().Set("Content-Type", "application/json")

p.router.ServeHTTP(w, r)
Expand Down
7 changes: 3 additions & 4 deletions webapp/src/widget/menu.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.status-dropdown-menu {
> .Menu {
> .TodoMenu {
position: inherit;
}
}

.Menu {
.TodoMenu {
display: flex;
flex-direction: column;
position: absolute;
Expand Down Expand Up @@ -125,8 +125,7 @@
}
}

.Menu,
.SubMenuOption .SubMenu {
.TodoMenu {
@media screen and (max-width: 430px) {
position: fixed;
top: 0;
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/widget/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class Menu extends React.PureComponent<Props> {

return (
<div
className={'Menu noselect ' + (position || 'bottom')}
className={'TodoMenu noselect ' + (position || 'bottom')}
tabIndex={0}
>
<div className='menu-contents'>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/widget/menuWrapper.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.MenuWrapper {
.TodoMenuWrapper {
position: relative;

&.disabled {
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/widget/menuWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const MenuWrapper = React.memo((props: Props) => {
}, []);

const {children} = props;
let className = 'MenuWrapper';
let className = 'TodoMenuWrapper';
if (props.disabled) {
className += ' disabled';
}
Expand Down

0 comments on commit 1aa947c

Please sign in to comment.