-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Sticky Scroll isn't working for .vue files #157891
Comments
@gjsjohnmurray This is the new issue i created |
@danielgroen what does the Outline view for your file show? If you're not sure where to find this, run the command |
|
Sticky scroll relies on the same information as Outline. It looks like you don't have an extension which implements |
Hi thanks for the feedback. Could you share the .vue file to copy paste? I will try to reproduce the issue on my computer. |
<template>
<div class="drop-down__wrapper">
<aside v-if="hasPrefix" class="drop-down__prefix">
<slot name="prefix" />:
</aside>
<div
v-if="dropdownState === 'idle'"
:class="[
'drop-down',
`drop-down--${color}`,
`drop-down--${alignment}`,
{ 'drop-down--open': dropdownIsOpen }]"
>
<li class="hidden-words">
{{ dropdownValues.default.name }}
</li>
<li v-for="option in options" :key="option.id" class="hidden-words">
{{ option.name }}
</li>
<div class="drop-down__current" @click="changeDropdownState()">
<span class="drop-down__current__word">{{ getCurrentName }}</span>
<AtomSvg class="drop-down__current__svg" type="chevrondown" />
</div>
<ul class="drop-down__selections">
<li
v-if="!dropdownValues.default.id"
disabled
:class="[
'drop-down__selections__word',
{ disabled: dropdownValues.required || !dropdownValues.current.id },
]"
@click="changeValue('default')"
>
{{ dropdownValues.default.name }}
</li>
<li
v-for="(option, i) in options"
:key="option.id"
:class="[
'drop-down__selections__word',
{ disabled: dropdownValues.current.name === option.name },
]"
:val="option.id"
@click="changeValue(i)"
>
{{ option.name }}
</li>
</ul>
</div>
</div>
</template>
<script>
import { defineComponent, onMounted, onBeforeUnmount, computed } from '@nuxtjs/composition-api';
import useDropdown from '@/composables/useDropdown';
export default defineComponent({
name: 'AtomDropdown',
props: {
options: {
type: Array,
required: true
},
color: {
type: String,
default: 'white',
validator: color => !!['white', 'sand'].includes(color)
},
alignment: {
type: String,
default: 'left',
validator: color => !!['left', 'right'].includes(color)
}
},
setup ({ options }, { slots }) {
const {
dropdownValues,
reset,
setOptions,
dropdownIsOpen,
changeState,
dropdownState,
changeDropdownState
} = useDropdown();
const hasPrefix = !!slots.prefix;
onMounted(() => {
reset();
setOptions(options);
changeState('idle');
});
onBeforeUnmount(() => {
reset();
});
const getCurrentName = computed(() => {
if (dropdownValues.value.current.name) {
return dropdownValues.value.current.name;
} else {
return dropdownValues.value.default.name;
}
});
const changeValue = (i) => {
if (i === 'default') {
dropdownValues.value.current = { id: null, name: null };
} else {
dropdownValues.value.current = dropdownValues.value.options[i];
}
changeDropdownState();
};
return { dropdownValues, hasPrefix, changeValue, dropdownIsOpen, changeDropdownState, dropdownState, getCurrentName };
}
});
</script>
<style lang="scss" scoped>
.drop-down {
}
</style> |
@danielgroen thanks for pasting that. Which extension did you add to get Outline content? |
However i now see that the stickyness work on the javascript! |
However, maybe this is a new feature request, but can it also be sticky in the |
I just tested on my computer on the latest VSCode Insiders version which you can find here https://code.visualstudio.com/insiders/. For the sticky scroll to work you need a language service provider extension. I used the |
Great it works! Thanks. I indeed had the deprecated ext |
@danielgroen thanks for addressing this issue. and thanks for resolving it @gjsjohnmurray @aiday-mar |
According due the new nice feature that allows sticky view in editors there is a bug with
.vue
files.It keeps hanging on the
<template>
tag, no matter how far you scroll.Related issue.
I have tested this issue on:
The text was updated successfully, but these errors were encountered: