Skip to content
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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

DanielOber
Copy link
Contributor

@DanielOber DanielOber commented Mar 14, 2025

Beschreibung:

  • elemente entfernt die nicht benutzt werden (formatter.ts, snackbar, saveLeave)
  • declaration.d.ts nicht entfernt, da eventuell später gebraucht wird

Referenzen1:

Verwandt mit Issue #

Closes #713

Summary by CodeRabbit

  • Refactor

    • Removed on-screen notification messages that previously alerted users during status updates and error events. The interface is now streamlined, with status information displayed directly without extra pop-up cues.
  • Chores

    • Eliminated the unsaved changes prompt during navigation to simplify transitions and reduce interruptions, enhancing the overall user experience.

Footnotes

  1. Nicht zutreffende Referenzen vor dem Speichern entfernen

@DanielOber DanielOber linked an issue Mar 14, 2025 that may be closed by this pull request
2 tasks
@DanielOber DanielOber self-assigned this Mar 14, 2025
Copy link
Contributor

coderabbitai bot commented Mar 14, 2025

Walkthrough

The 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)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or `` to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or `` anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the wls-gui-wahllokalsystem frontend related issues for Wahllokalsystem label Mar 14, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 Clarity

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea37c4 and d441bdd.

📒 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 Import

The 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wls-gui-wahllokalsystem frontend related issues for Wahllokalsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

⚰️ unused code aus dem refarch template entfernen
1 participant