-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added labels to the map #38
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3ba4c9b
Removed warnings for commas
philippewarren 3a68ae1
Update NPM to support lockfile v2
philippewarren 551290e
WIP
philippewarren dfa0128
Trying again with @latest with build-essential
philippewarren 48077b1
Trying sudo again
philippewarren 7e7ce45
Revert "Trying sudo again"
philippewarren dedd547
Added label navigation
philippewarren f3166c4
Labels are now sync using ROS
philippewarren 96c7f2c
Added label addition and move
philippewarren 21c55b4
Added label editing
philippewarren 5cc062f
Added dropdown menu functionnality to map settings and navigation set…
philippewarren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,22 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
node: true | ||
}, | ||
extends: [ | ||
"plugin:vue/vue3-essential", | ||
"eslint:recommended", | ||
"@vue/typescript/recommended", | ||
"@vue/prettier", | ||
"@vue/prettier/@typescript-eslint", | ||
"@vue/prettier/@typescript-eslint" | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
ecmaVersion: 2020 | ||
}, | ||
ignorePatterns: ["/submodules/*"], | ||
rules: { | ||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", | ||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", | ||
"comma-dangle": [ | ||
"warn", | ||
{ | ||
arrays: "always-multiline", | ||
objects: "always-multiline", | ||
imports: "always-multiline", | ||
exports: "always-multiline", | ||
functions: "never", | ||
}, | ||
], | ||
}, | ||
"prettier/prettier": "off" | ||
} | ||
}; | ||
Comment on lines
1
to
22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to the warnings in CI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.div { | ||
display: inline-block; | ||
transition: all 1s ease-in-out; | ||
--padding-top: 0; | ||
} | ||
|
||
.toggle-button { | ||
position: relative; | ||
display: inline-block; | ||
background-color: transparent; | ||
border: none; | ||
padding: 0.5rem; | ||
width: fit-content; | ||
height: fit-content; | ||
} | ||
|
||
.left { | ||
margin-right: auto; | ||
} | ||
|
||
.right { | ||
margin-left: auto; | ||
} | ||
|
||
.icon { | ||
font-size: larger; | ||
font-weight: 600; | ||
width: 1rem; | ||
color: inherit; | ||
padding: 0.4rem; | ||
} | ||
|
||
.inner { | ||
display: inline-block; | ||
width: fit-content; | ||
height: fit-content; | ||
position: relative; | ||
transition: all 1s ease-in-out; | ||
padding-top: var(--padding-top); | ||
} |
106 changes: 106 additions & 0 deletions
106
teleop-vue/src/components/DropdownMenu/DropdownMenu.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<template> | ||
<div | ||
class="div" | ||
@mouseenter="mouseEnter" | ||
@mouseleave="mouseLeave" | ||
@mousemove="clearTimer" | ||
> | ||
<button | ||
class="toggle-button" | ||
:class="align" | ||
:style="{ color: color, 'text-align': align }" | ||
@click="togglePinned" | ||
> | ||
<span v-if="align === 'right'">{{ label }}</span> | ||
<span v-show="!hidden && hoverShown && !pinnedShown" class="icon" | ||
>📌</span | ||
> | ||
<span v-show="!hidden && pinnedShown" class="icon">ᐱ</span> | ||
<span v-show="hidden" class="icon">ᐯ</span | ||
><span v-if="align === 'left'">{{ label }}</span></button | ||
><br /> | ||
<div v-show="!hidden" class="inner"> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "dropdown-menu", | ||
props: { | ||
label: { | ||
type: String, | ||
required: false, | ||
default: "", | ||
}, | ||
color: { | ||
type: String, | ||
required: false, | ||
default: "#FFF", | ||
}, | ||
align: { | ||
type: String, | ||
required: false, | ||
default: "left", | ||
}, | ||
hoverTimeout: { | ||
type: Number, | ||
required: false, | ||
default: 400, | ||
}, | ||
}, | ||
data() { | ||
return { | ||
pinnedShown: false, | ||
hoverShown: false, | ||
timer: null, | ||
}; | ||
}, | ||
computed: { | ||
hidden() { | ||
return !this.pinnedShown && !this.hoverShown; | ||
}, | ||
}, | ||
methods: { | ||
clearTimer() { | ||
if (this.timer) { | ||
clearTimeout(this.timer); | ||
} | ||
}, | ||
resetTimer(timeout) { | ||
this.clearTimer(); | ||
this.timer = setTimeout(this.timerTimeout, timeout, timeout); | ||
}, | ||
mouseEnter() { | ||
this.hoverShown = true; | ||
this.clearTimer(); | ||
}, | ||
timerTimeout(timeout) { | ||
const a = document.querySelector("#div:hover"); | ||
if (a === null) { | ||
this.hoverShown = false; | ||
} else { | ||
this.timer = setTimeout(this.timerTimeout, timeout, timeout); | ||
} | ||
}, | ||
mouseLeave(event) { | ||
// Needed to fix a bug on Firefox where hovering above a <select> dropdown menu triggers the mouseleave event | ||
if (event.relatedTarget === null) { | ||
event.stopPropagation(); | ||
this.resetTimer(2 * this.hoverTimeout); | ||
} else { | ||
this.resetTimer(this.hoverTimeout); | ||
} | ||
}, | ||
togglePinned() { | ||
this.pinnedShown = !this.pinnedShown; | ||
this.clearTimer(); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import "./DropdownMenu.scss"; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as DropdownMenu } from "./DropdownMenu.vue"; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to the warnings in CI