Skip to content

Commit 8bba8f1

Browse files
committed
ui: call nextcloud categories subfolders as in qownnotes desktop
1 parent 577c88c commit 8bba8f1

41 files changed

Lines changed: 238 additions & 236 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1212
- The app is translated into German, Chinese (Simplified), Russian, Italian, Portuguese (Brazil),
1313
Polish, French, and Spanish. It follows the system language, and on Android 13 or newer the
1414
language can also be chosen per app in the system settings.
15-
- Nested Nextcloud categories are shown as a folder tree in a drawer, opened from the folder button
16-
or the note-list menu. Each folder shows its note count, folders can be expanded and collapsed,
17-
and a per-account **Show notes from subfolders** switch decides whether a folder also lists the
18-
notes below it, as in QOwnNotes desktop. The previous **Undefined** and **All categories**
19-
choices are the root folder without and with subfolders.
20-
- Search stays within the listed folder and, in title and content mode, also matches categories.
21-
**Search all folders** in the search filter widens a search to the whole account.
15+
- Nested Nextcloud categories are shown as a subfolder tree in a drawer, opened from the folder
16+
button or the note-list menu. Each subfolder shows its note count and can be expanded and
17+
collapsed, and a per-account **Show notes from subfolders** switch decides whether a subfolder
18+
also lists the notes below it, as in QOwnNotes desktop. The previous **Undefined** and **All
19+
categories** choices are the root folder without and with subfolders.
20+
- Search stays within the listed subfolder and, in title and content mode, also matches subfolder
21+
names. **Search all folders** in the search filter widens a search to the whole account.
2222

2323
### Changed
2424

25-
- The **Change category** dialog lists folders as an indented tree, including parent folders that
26-
contain no notes of their own.
27-
28-
- Note-list widgets follow the app's note-list settings: "Show note preview", "Show category"
29-
for the widget's account, and "Highlight categories" with its color, in addition to "Compact
25+
- Nextcloud categories are now called subfolders throughout the app, as in QOwnNotes desktop:
26+
**Show subfolder**, **Highlight subfolders**, **Move to subfolder**, and **Root folder** for
27+
notes without one. Existing settings are kept.
28+
- The **Move to subfolder** dialog lists subfolders as an indented tree, including parent folders
29+
that contain no notes of their own.
30+
- Note-list widgets follow the app's note-list settings: "Show note preview", "Show subfolder"
31+
for the widget's account, and "Highlight subfolders" with its color, in addition to "Compact
3032
note list". Changing these settings updates placed widgets
3133
([#24](https://github.com/qownnotes/qownnotes-android/issues/24)).
3234

‎app/src/androidTest/kotlin/org/qownnotes/mobile/AppLaunchTest.kt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -626,17 +626,17 @@ class AppLaunchTest {
626626
listAction("settings")
627627
composeRule.onNodeWithTag("toggle-category").performClick()
628628
composeRule.onNodeWithTag("close-settings").performClick()
629-
composeRule.waitForText("Uncategorized")
629+
composeRule.waitForText("Root folder")
630630

631631
importAccount("bob", "Bob note", "etag-b", 20)
632-
composeRule.onNodeWithText("Uncategorized").assertDoesNotExist()
632+
composeRule.onNodeWithText("Root folder").assertDoesNotExist()
633633

634634
composeRule.activityRule.scenario.recreate()
635635
composeRule.waitForText("Bob note")
636-
composeRule.onNodeWithText("Uncategorized").assertDoesNotExist()
636+
composeRule.onNodeWithText("Root folder").assertDoesNotExist()
637637
accountAction("account-choice-${alice.localAccountId()}")
638638
composeRule.waitForText("Alice note")
639-
composeRule.onNodeWithText("Uncategorized").assertIsDisplayed()
639+
composeRule.onNodeWithText("Root folder").assertIsDisplayed()
640640
}
641641

642642
@Test
@@ -698,7 +698,7 @@ class AppLaunchTest {
698698

699699
fun assertAppearance() {
700700
composeRule.onNodeWithTag("note-list-header-title")
701-
.assertTextEquals("Uncategorized")
701+
.assertTextEquals("Root folder")
702702
composeRule.onNodeWithTag("note-list-header-account").assertTextEquals(displayName)
703703
assertEquals(0xFF1565C0.toInt(), pixel("note-list-header"))
704704
// Sample the row's start padding: card corners are clipped and outlined.

‎app/src/androidTest/kotlin/org/qownnotes/mobile/NoteWidgetTest.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class NoteWidgetTest {
253253

254254
val undefined = header(NoteCategoryScope.Undefined, null)
255255
assertEquals(
256-
"Uncategorized",
256+
"Root folder",
257257
undefined.findViewById<TextView>(R.id.widget_title).text.toString()
258258
)
259259
assertEquals(View.GONE, undefined.findViewById<TextView>(R.id.widget_subtitle).visibility)
@@ -385,7 +385,7 @@ class NoteWidgetTest {
385385
note.copy(category = ""),
386386
NoteListWidgetDisplay(showCategory = true)
387387
).reapply(context, row)
388-
assertEquals("Uncategorized", label.text.toString())
388+
assertEquals("Root folder", label.text.toString())
389389
assertEquals(View.GONE, background.visibility)
390390
assertEquals(0, label.paddingStart)
391391
assertEquals(context.getColor(R.color.widget_text), label.currentTextColor)

‎app/src/androidTest/kotlin/org/qownnotes/mobile/WidgetConfigurationTest.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class WidgetConfigurationTest {
3030
}
3131

3232
composeRule.onNodeWithText("All categories").assertIsDisplayed()
33-
composeRule.onNodeWithText("Uncategorized").assertIsDisplayed()
33+
composeRule.onNodeWithText("Root folder").assertIsDisplayed()
3434
composeRule.onNodeWithTag("widget-category-all").performClick()
3535
composeRule.onNodeWithTag("widget-category-undefined").performClick()
3636
composeRule.onNodeWithTag("widget-category-Work/Projects").performClick()

‎app/src/main/res/values-de/strings.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<string name="widget_reset_appearance">Zurücksetzen</string>
1313
<string name="widget_save">Speichern</string>
1414
<string name="widget_all_notes">Notizen</string>
15-
<string name="widget_all_categories">Alle Kategorien</string>
16-
<string name="widget_uncategorized">Ohne Kategorie</string>
15+
<string name="widget_all_categories">Alle Unterordner</string>
16+
<string name="widget_uncategorized">Stammordner</string>
1717
<string name="widget_no_notes">Keine Notizen</string>
1818
<string name="widget_note_unavailable">Notiz nicht verfügbar</string>
1919
<string name="widget_create_note">Notiz erstellen</string>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<!-- Note folder navigation -->
4-
<string name="folders_title">Ordner</string>
5-
<string name="folders_open">Ordner anzeigen</string>
4+
<string name="folders_title">Unterordner</string>
5+
<string name="folders_open">Unterordner öffnen</string>
66
<string name="folders_root">Stammordner</string>
77
<string name="folders_show_subfolders">Notizen aus Unterordnern anzeigen</string>
88
<string name="folders_expand">%1$s aufklappen</string>
99
<string name="folders_collapse">%1$s zuklappen</string>
10-
<string name="folders_menu_label">Ordner: %1$s</string>
10+
<string name="folders_menu_label">Unterordner: %1$s</string>
1111
<string name="search_all_folders">Alle Ordner durchsuchen</string>
1212
</resources>

‎app/src/main/res/values-de/strings_main.xml‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@
4949
<string name="sort_option_latest_first">Neueste zuerst</string>
5050
<string name="sort_option_title_ascending">Titel A–Z</string>
5151
<string name="sort_option_title_descending">Titel Z–A</string>
52-
<string name="category_option_undefined">Keine Kategorie</string>
52+
<string name="category_option_undefined">Stammordner</string>
5353
<string name="bookmarks">Lesezeichen</string>
5454
<string name="trash">Papierkorb</string>
5555
<string name="about">Über</string>
5656
<string name="notes_empty_search">Keine passenden Notizen</string>
5757
<string name="notes_empty_tags">Keine Notizen mit den ausgewählten Tags</string>
58-
<string name="notes_empty_category">Keine Notizen in dieser Kategorie</string>
58+
<string name="notes_empty_category">Keine Notizen in diesem Unterordner</string>
5959

6060
<!-- Settings -->
6161
<string name="settings_title">Einstellungen</string>
6262
<string name="settings_show_note_preview">Notizvorschau anzeigen</string>
63-
<string name="settings_show_category">Kategorie anzeigen</string>
63+
<string name="settings_show_category">Unterordner anzeigen</string>
6464
<string name="settings_compact_note_list">Kompakte Notizliste</string>
6565
<string name="settings_compact_note_list_description">Verringert die Abstände in der Notizliste und in Listen-Widgets.</string>
6666
<string name="settings_swipe_note_actions">Wischaktionen für Notizen</string>
@@ -110,7 +110,7 @@
110110
<!-- Note list items -->
111111
<string name="favorite_remove">Aus Favoriten entfernen</string>
112112
<string name="favorite_add">Zu Favoriten hinzufügen</string>
113-
<string name="note_uncategorized">Ohne Kategorie</string>
113+
<string name="note_uncategorized">Stammordner</string>
114114
<string name="account_avatar_description">Konto: %1$s</string>
115115
<string name="sync_available_offline">Offline verfügbar</string>
116116
<string name="sync_refreshing">Wird aktualisiert</string>
@@ -140,7 +140,7 @@
140140
<string name="note_menu_versions">Versionen</string>
141141
<string name="note_menu_tags">Tags</string>
142142
<string name="note_menu_information">Informationen</string>
143-
<string name="change_category">Kategorie ändern</string>
143+
<string name="change_category">In Unterordner verschieben</string>
144144
<string name="action_rename">Umbenennen</string>
145145
<string name="retry_sync">Synchronisierung wiederholen</string>
146146
<string name="note_text_size_decrease">Notizschrift verkleinern</string>
@@ -194,7 +194,7 @@
194194
<string name="list_separator">", "</string>
195195
<string name="merge_field_title">Titel</string>
196196
<string name="merge_field_content">Inhalt</string>
197-
<string name="merge_field_category">Kategorie</string>
197+
<string name="merge_field_category">Unterordner</string>
198198
<string name="merge_field_favorite">Favorit</string>
199199
<string name="conflict_use_merged">Zusammengeführte Version verwenden</string>
200200
<string name="conflict_keep_local_copy">Lokale als Kopie behalten</string>
@@ -218,7 +218,7 @@
218218
<string name="note_info_words">Wörter</string>
219219
<string name="note_info_characters">Zeichen</string>
220220
<string name="note_info_lines">Zeilen</string>
221-
<string name="note_info_category">Kategorie</string>
221+
<string name="note_info_category">Unterordner</string>
222222
<string name="note_info_category_root">Stammordner</string>
223223
<string name="note_info_account">Konto</string>
224224
<string name="note_info_synchronization">Synchronisierung</string>
@@ -235,18 +235,18 @@
235235
<string name="sync_state_remote_missing">Fehlt auf dem Server</string>
236236
<string name="sync_state_read_only_conflict">Schreibschutzkonflikt</string>
237237
<string name="sync_state_failed">Synchronisierung fehlgeschlagen</string>
238-
<string name="conflict_version_summary">Titel: %1$s\nKategorie: %2$s\nFavorit: %3$s</string>
238+
<string name="conflict_version_summary">Titel: %1$s\nUnterordner: %2$s\nFavorit: %3$s</string>
239239

240-
<!-- Rename, new note, and category dialogs -->
240+
<!-- Rename, new note, and subfolder dialogs -->
241241
<string name="rename_note_title">Notiz umbenennen</string>
242242
<string name="rename_note_file_name">Dateiname</string>
243243
<string name="note_name_invalid_characters_hint">Zeichen, die in Dateinamen nicht erlaubt sind, werden durch Leerzeichen ersetzt.</string>
244244
<string name="rename_note_update_heading">Überschrift 1 aktualisieren</string>
245245
<string name="new_note_name">Notizname</string>
246-
<string name="category_undefined_root">Keine (Stammordner)</string>
247-
<string name="category_new">Neue Kategorie</string>
248-
<string name="category_new_path">Pfad der neuen Kategorie</string>
249-
<string name="category_new_path_hint">Verwende /, um verschachtelte Kategorien zu erstellen.</string>
246+
<string name="category_undefined_root">Stammordner</string>
247+
<string name="category_new">Neuer Unterordner</string>
248+
<string name="category_new_path">Pfad des neuen Unterordners</string>
249+
<string name="category_new_path_hint">Mit / werden verschachtelte Unterordner angelegt.</string>
250250

251251
<!-- Fast scroll and find -->
252252
<string name="note_fast_scroll">Schnelles Scrollen in der Notiz</string>

‎app/src/main/res/values-de/strings_ui.xml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323

2424
<!-- App appearance -->
2525
<string name="appearance_show_list_header">Listenkopf anzeigen</string>
26-
<string name="appearance_show_list_header_summary">Zeigt die angezeigte Kategorie und den Kontonamen unter der Suchleiste.</string>
26+
<string name="appearance_show_list_header_summary">Zeigt den angezeigten Unterordner und den Kontonamen unter der Suchleiste.</string>
2727
<string name="appearance_note_cards">Notizen als Karten anzeigen</string>
2828
<string name="appearance_note_cards_summary">Zeichnet einen Rahmen um jede Notiz mit einem kleinen Abstand zwischen den Notizen.</string>
2929
<string name="appearance_header_color">Kopfzeilenfarbe</string>
3030
<string name="appearance_default_header">Standard-Kopfzeile</string>
3131
<string name="appearance_note_background">Notizhintergrund</string>
3232
<string name="appearance_default_note_background">Standard-Notizhintergrund</string>
33-
<string name="appearance_highlight_categories">Kategorien hervorheben</string>
34-
<string name="appearance_highlight_categories_summary">Gilt, wenn „Kategorie anzeigen“ aktiviert ist.</string>
35-
<string name="appearance_category_highlight_color">Hervorhebungsfarbe für Kategorien</string>
36-
<string name="appearance_default_category_highlight">Standard-Kategoriehervorhebung</string>
33+
<string name="appearance_highlight_categories">Unterordner hervorheben</string>
34+
<string name="appearance_highlight_categories_summary">Gilt, wenn „Unterordner anzeigen“ aktiviert ist.</string>
35+
<string name="appearance_category_highlight_color">Hervorhebungsfarbe für Unterordner</string>
36+
<string name="appearance_default_category_highlight">Standard-Hervorhebung für Unterordner</string>
3737
<string name="appearance_custom_colors_hint">Eigene Farben bleiben im hellen und dunklen Modus gleich. Die Textfarbe passt sich für bessere Lesbarkeit automatisch an.</string>
3838

3939
<!-- Widget appearance -->

‎app/src/main/res/values-es/strings.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<string name="widget_reset_appearance">Restablecer</string>
1313
<string name="widget_save">Guardar</string>
1414
<string name="widget_all_notes">Notas</string>
15-
<string name="widget_all_categories">Todas las categorías</string>
16-
<string name="widget_uncategorized">Sin categoría</string>
15+
<string name="widget_all_categories">Todas las subcarpetas</string>
16+
<string name="widget_uncategorized">Carpeta raíz</string>
1717
<string name="widget_no_notes">No hay notas</string>
1818
<string name="widget_note_unavailable">Nota no disponible</string>
1919
<string name="widget_create_note">Crear nota</string>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<!-- Note folder navigation -->
4-
<string name="folders_title">Carpetas</string>
5-
<string name="folders_open">Mostrar carpetas</string>
4+
<string name="folders_title">Subcarpetas</string>
5+
<string name="folders_open">Abrir subcarpetas</string>
66
<string name="folders_root">Carpeta raíz</string>
77
<string name="folders_show_subfolders">Mostrar notas de subcarpetas</string>
88
<string name="folders_expand">Expandir %1$s</string>
99
<string name="folders_collapse">Contraer %1$s</string>
10-
<string name="folders_menu_label">Carpeta: %1$s</string>
10+
<string name="folders_menu_label">Subcarpeta: %1$s</string>
1111
<string name="search_all_folders">Buscar en todas las carpetas</string>
1212
</resources>

0 commit comments

Comments
 (0)