Skip to content

Conversation

@wofferl
Copy link
Collaborator

@wofferl wofferl commented Nov 17, 2025

Summary

This PR refactored the existing logic for the starred/unread article im- and export.

Changes

Checklist

@wofferl wofferl added API Impact API/Backend code frontend impact Javascript/Frontend code labels Nov 17, 2025
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 87.09677% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/components/Sidebar.vue 87.09% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the article import/export functionality by extracting the logic into dedicated service classes and adding both occ commands and frontend UI options for backup and restore operations.

  • Moves article import/export logic from controllers to new ImportService and ExportService classes
  • Adds two new occ commands: news:item:import and news:items:export for CLI-based backup operations
  • Implements frontend upload/download buttons in the sidebar settings for article import/export
  • Updates tests to reflect the refactored architecture

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
lib/Service/ImportService.php Refactored importArticles() to articles() method with improved error handling and boolean return type
lib/Service/ExportService.php New service class extracting article export logic from controller
lib/Controller/ImportController.php New controller handling article import endpoint with JSON validation
lib/Controller/ExportController.php Refactored to use ExportService instead of direct service calls
lib/Controller/FeedController.php Removed import() method and ImportService dependency
lib/Command/Config/ItemImport.php New occ command for importing articles from JSON file
lib/Command/Config/ItemExport.php New occ command for exporting articles to JSON
src/components/Sidebar.vue Added upload/download UI buttons and methods for article import/export
tests/javascript/unit/components/Sidebar.spec.ts Added comprehensive tests for import/export methods
tests/Unit/Controller/ImportControllerTest.php New test suite for ImportController::articles()
tests/Unit/Controller/ExportControllerTest.php Updated to test refactored export controller
tests/Unit/Controller/FeedControllerTest.php Removed tests for deprecated import() method
tests/Unit/Service/ImportServiceTest.php Updated tests for renamed method and boolean return type
appinfo/routes.php Added new routes and removed deprecated feed import route
appinfo/info.xml Registered new occ commands
CHANGELOG.md Documented new features

Signed-off-by: Wolfgang <github@linux-dude.de>
Signed-off-by: Wolfgang <github@linux-dude.de>
Signed-off-by: Wolfgang <github@linux-dude.de>
@wofferl wofferl merged commit 7ae1690 into nextcloud:master Jan 8, 2026
33 of 36 checks passed
@Grotax Grotax mentioned this pull request Jan 12, 2026
Grotax added a commit that referenced this pull request Jan 13, 2026
Changed
- Drop Support for Nextcloud 31 (#3485)
- Add Support for Nextcloud 33 (#3485)
- Add feature to Group starred Items per Feed (#3148)
- Add `occ` commands for importing/exporting articles (#3437)
- Add importing/exporting articles to frontend settings (#3437)
- App settings are now displayed in an app settings dialog (#3500)

Fixed
- Special characters may be displayed incorrectly when full text is enabled (#3472)
- Wrong url to feed page (#3486)
- Long articles are cut short (#3489)
- Imported feeds or newly created folders do not disappear immediately when `showAll` is not set (#3500)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Grotax added a commit that referenced this pull request Jan 13, 2026
Changed
- Drop Support for Nextcloud 31 (#3485)
- Add Support for Nextcloud 33 (#3485)
- Add feature to Group starred Items per Feed (#3148)
- Add `occ` commands for importing/exporting articles (#3437)
- Add importing/exporting articles to frontend settings (#3437)
- App settings are now displayed in an app settings dialog (#3500)

Fixed
- Special characters may be displayed incorrectly when full text is enabled (#3472)
- Wrong url to feed page (#3486)
- Long articles are cut short (#3489)
- Imported feeds or newly created folders do not disappear immediately when `showAll` is not set (#3500)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review API Impact API/Backend code frontend impact Javascript/Frontend code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants