Skip to content

deps: update nextcloud/vue 8.26.0 #3150

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

Merged
merged 3 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ You can also check [on GitHub](https://github.com/nextcloud/news/releases), the
- respect global `disable all keyboard shortcuts` setting
- disable shortcuts in input fields from global overlays (e.g. Nextcloud assistant)
- fix relative date strings
- Switching between folders in compact mode doesn't close actual selected item
- current selected article is removed from the list after showing details in mobile mode

# Releases
## [25.3.1] - 2025-03-25
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@nextcloud/moment": "^1.3.2",
"@nextcloud/password-confirmation": "^5.3.1",
"@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^8.25.1",
"@nextcloud/vue": "^8.26.0",
"@vue/vue2-jest": "^29.2.6",
"lodash": "^4.17.21",
"vue": "^2.7.16",
Expand Down
8 changes: 7 additions & 1 deletion src/components/ContentTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
@update:showDetails="showItem(false)">
<template #list>
<NcAppContentList>
<FeedItemDisplayList :items="items"
<FeedItemDisplayList ref="itemListElement"
:items="items"
:fetch-key="fetchKey"
role="region"
:aria-label="t('news', 'Article list')"
Expand Down Expand Up @@ -81,6 +82,8 @@ const showDetails = ref(false)

const contentElement = ref()

const itemListElement = ref()

const layout = computed(() => {
switch (appStore.getters.splitmode(appStore.state)) {
case '1':
Expand Down Expand Up @@ -113,6 +116,9 @@ watch(selectedFeedItem, (newSelectedFeedItem) => {
*/
function showItem(value) {
showDetails.value = value
if (layout.value === 'no-split' && !value) {
itemListElement.value?.enableNavHotkeys()
}
}

</script>
Expand Down
4 changes: 0 additions & 4 deletions src/components/feed-display/FeedItemDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ export default Vue.extend({
},
created() {
// create shortcuts
if (this.splitModeOff) {
useHotKey(['s', 'l', 'i'], this.toggleStarred)
useHotKey('u', this.toggleRead)
}
if (this.splitModeOff && !this.screenReaderMode) {
useHotKey('Escape', this.closeDetails)
}
Expand Down
31 changes: 28 additions & 3 deletions src/components/feed-display/FeedItemDisplayList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:item-index="index + 1"
:item="item"
:class="{ 'active': selectedItem && selectedItem.id === item.id }"
@show-details="$emit('show-details')" />
@show-details="showDetails" />
</template>
</template>
</VirtualScroll>
Expand Down Expand Up @@ -80,6 +80,8 @@ export default Vue.extend({
selectedItem: undefined as FeedItem | undefined,
debouncedClickItem: null,
listOrdering: this.getListOrdering(),
stopPrevItemHotkey: null,
stopNextItemHotkey: null,
}
},
computed: {
Expand Down Expand Up @@ -167,8 +169,7 @@ export default Vue.extend({
},
created() {
// create shortcuts
useHotKey(['p', 'k', 'ArrowLeft'], this.jumpToPreviousItem)
useHotKey(['n', 'j', 'ArrowRight'], this.jumpToNextItem)
this.enableNavHotkeys()
useHotKey('r', this.refreshApp)
useHotKey('a', this.markRead, { shift: true })
useHotKey(['s', 'l', 'i'], this.toggleStarred)
Expand All @@ -191,6 +192,9 @@ export default Vue.extend({
this.$root.$on('next-item', this.jumpToNextItem)
this.$root.$on('prev-item', this.jumpToPreviousItem)
},
destroyed() {
this.disableNavHotkeys()
},
methods: {
async refreshApp() {
this.$refs.virtualScroll.scrollTop = 0
Expand Down Expand Up @@ -231,7 +235,28 @@ export default Vue.extend({
markRead() {
this.$emit('mark-read')
},
disableNavHotkeys() {
if (this.stopPrevItemHotkey) {
this.stopPrevItemHotkey()
}
if (this.stopNextItemHotkey) {
this.stopNextItemHotkey()
}
},
enableNavHotkeys() {
this.disableNavHotkeys()
this.stopPrevItemHotkey = useHotKey(['p', 'k', 'ArrowLeft'], this.jumpToPreviousItem)
this.stopNextItemHotkey = useHotKey(['n', 'j', 'ArrowRight'], this.jumpToNextItem)
},
showDetails() {
/*
* disable nav keys when showing details in no-split-mode
* proper navigation (fetchMore, scroll to last item when closed)
* isn't implemented yet
*/
if (this.splitModeOff) {
this.disableNavHotkeys()
}
this.$emit('show-details')
},
unreadFilter(item: FeedItem): boolean {
Expand Down