refactor: admin settings componentization#21
Merged
vitormattos merged 25 commits intomainfrom Mar 20, 2026
Merged
Conversation
- Add @vue/test-utils for component mounting and interaction - Add jsdom for DOM environment in Vitest - Add @vitejs/plugin-vue for Vue SFC compilation in tests Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add jsdom as test environment for browser APIs (localStorage, window) - Configure @vitejs/plugin-vue for Vue SFC compilation - Set component test include pattern with src/tests/ suffix Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Extract LibreCode sponsorship banner into dedicated component - Encapsulate visibility state with localStorage persistence - Handle dismiss action and sponsor page navigation internally - Props: storageKey, sponsorUrl (with sensible defaults) - Fully autonomous - no parent event coordination needed Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Extract select field options editor into dedicated admin component - Implement drag-and-drop reordering with vuedraggable - Add bulk import dialog for multiple options - Validation: detect duplicate options (case-insensitive) - Keyboard support: Enter to add, Backspace/Delete to remove - Prevent empty option duplicates with smart add logic - Maintains full feature parity with extracted code Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Test sponsor page opens with correct URL and window features - Test dismiss button hides banner and persists state to localStorage - Test pre-dismissed state: starts hidden when localStorage key exists - Setup: vi.mock @nextcloud/vue components; mount with jsdom - Cleanup: afterEach clears localStorage to prevent test pollution Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Test add new option: button click emits update:modelValue with correct data - Test skip add when empty exists: prevents duplicate empty option creation - Setup: mock @nextcloud/vue + Draggable; mount with jsdom - Validation: check emitted events and payload structure Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Remove ~200 lines of options editor markup and logic - Extract to AdminSelectOptionsSection component - Fix CSS button truncation: add flex: 0 0 auto + min-width: max-content - Simplify AdminSettings template and reduce component complexity - Use v-model binding for options sync with child component - Maintain full functionality: drag, bulk import, validation, keyboard support Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.