-
Notifications
You must be signed in to change notification settings - Fork 0
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
713 unused code aus dem refarch template entfernen #1052
base: dev
Are you sure you want to change the base?
713 unused code aus dem refarch template entfernen #1052
Conversation
WalkthroughThe pull request removes a set of functionalities related to the snackbar notification system and associated utilities from the application. The changes include deleting the snackbar component from the main view, its import in App.vue, and the entire TheSnackbar.vue file. In addition, the corresponding Pinia store for managing snackbar notifications is completely removed. The composable function designed to prevent data loss on navigation (saveLeave.ts) and several utility functions for formatting strings and dates (formatter.ts) are also deleted. Moreover, the health check logic in HomeView.vue has been simplified by removing error handling that previously utilized the snackbar functionality. The related tests have been pared down, eliminating setups for Vuetify components and specific snackbar rendering tests. Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
wls-gui-wahllokalsystem/src/views/HomeView.vue (1)
30-32
: Consider adding error handling for the health check API call.The error handling for the
checkHealth()
promise has been removed along with the snackbar notification system. While this aligns with the PR objective of removing unused code, it means that API failures will now go unhandled.If the health check API call fails (e.g., network error, server error), users won't receive any notification, and the status will silently remain as "DOWN". Consider adding minimal error handling without relying on the removed snackbar functionality.
- checkHealth().then((content: HealthState) => (status.value = content.status)); + checkHealth() + .then((content: HealthState) => (status.value = content.status)) + .catch((error) => { + console.error("Health check failed:", error); + status.value = "DOWN"; + });wls-gui-wahllokalsystem/tests/unit/example.spec.ts (1)
3-40
: Simplified Test Suite for ClarityThe extensive removal of setup code and tests targeting unused components (e.g., snackbar related tests) has greatly simplified this file. The remaining tests now focus solely on basic functionality and equality assertions. Ensure that this reduction in tests does not leave any critical gaps if any leftover UI or business logic still requires verification.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
wls-gui-wahllokalsystem/src/App.vue
(0 hunks)wls-gui-wahllokalsystem/src/components/TheSnackbar.vue
(0 hunks)wls-gui-wahllokalsystem/src/composables/saveLeave.ts
(0 hunks)wls-gui-wahllokalsystem/src/stores/snackbar.ts
(0 hunks)wls-gui-wahllokalsystem/src/util/formatter.ts
(0 hunks)wls-gui-wahllokalsystem/src/views/HomeView.vue
(1 hunks)wls-gui-wahllokalsystem/tests/unit/example.spec.ts
(1 hunks)
💤 Files with no reviewable changes (5)
- wls-gui-wahllokalsystem/src/App.vue
- wls-gui-wahllokalsystem/src/components/TheSnackbar.vue
- wls-gui-wahllokalsystem/src/composables/saveLeave.ts
- wls-gui-wahllokalsystem/src/stores/snackbar.ts
- wls-gui-wahllokalsystem/src/util/formatter.ts
🔇 Additional comments (1)
wls-gui-wahllokalsystem/tests/unit/example.spec.ts (1)
1-1
: Streamlined Test Dependency ImportThe removal of Vue-specific testing dependencies in favor of a direct
vitest
import is a solid move toward cleaner, more focused tests in line with the refactored template objectives.
Beschreibung:
Referenzen1:
Verwandt mit Issue #
Closes #713
Summary by CodeRabbit
Refactor
Chores
Footnotes
Nicht zutreffende Referenzen vor dem Speichern entfernen ↩