Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Sub-category caption is missing when a category has only one sub-group

Aperta Adatta ai principianti
#2,035 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

Inizia in src/components/NotesView.vue, concentrandoti sul ramo per il singolo gruppo e sul rendering di NotesCaption nel ramo raggruppato. Riproduci il caso con una nota in Personal/Work, quindi verifica che l’elenco delle note mostri la didascalia Work sia con una nota annidata sia dopo aver aggiunto una nota diretta in Personal.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug need to reproduce

When a user selects a category and all its visible notes belong to a single sub-category, the sub-category caption isn't being shown in the notes list. The notes appear directly under the selected category in the list and don't represent where they actually are in the hierarchy.

Since the navigation only lists top-level categories, that caption is the only place in the notes list that shows which category a note is in when it's nested. Without the sub-category in the notes list, it's not possible to know where in the hierarchy the note is without looking at the note's Details tab UI on the note (or switch to "All notes").

Steps to reproduce

  1. Create a note in the category Personal/Work, so it's the only note under Personal
  2. Select Personal in the navigation
  3. Observe the note list. The note shows in the notes list but with no sub-category (Work) caption
  4. Create a second note directly in Personal
  5. Observe the note list again. Now a "Work" caption appears above the first note
Expected behaviour

The sub-category caption should show in both cases. Step 3 should already display a "Work" caption above the note.

Actual behaviour

After step 3, the list shows no caption so the note looks as though it lives directly in Personal. The caption only appears once a second group exists.

Cause

In src/components/NotesView.vue, the single-group case takes a separate branch that renders NotesList on its own:

<NotesList v-if="groupedNotes.length === 1"
    :notes="groupedNotes[0].notes"
    :showCategoryTitle="category === null"
/>
<template v-for="(group, idx) in groupedNotes" v-else :key="idx">
    <NotesCaption v-if="group.category && category !== group.category" … />

NotesCaption only exists in the v-else branch, so it is skipped whenever there is exactly one group.

The note items do not carry the load. .NoteItem's subname would show the full category but its gated on showCategoryTitle (which is category === null). So it also is off when any category is selected. Both signals are suppressed at once.

Server

  • Notes app version: 6.1.0
  • Nextcloud version: 35.0.0
  • Browser: Edge 153

Related

Related to #879 (category tree). The flattened navigation makes this caption the only indication of nested placement, so losing it is more confusing than it would be otherwise.

Investigated with the help of Claude Code.

Lingua principale
JavaScript
Stelle
738
Fork
162
Merge medio
2h 40m
PR unite (30g)
39

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextcloud/notes

Tutte le issue di nextcloud/notes

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.