-
Notifications
You must be signed in to change notification settings - Fork 305
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
Programming exercises
: Fix repository breadcrumbs
#10383
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request enhances the breadcrumb navigation in the application by integrating support for various repository types within the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant R as Router
participant N as NavbarComponent
participant T as Translation Service
U->>R: Navigate to repository URL
R->>N: Update URL segments
N->>N: Parse URL to identify repository type
N->>T: Retrieve translation for repository type
T-->>N: Return translated title
N->>N: Update and render breadcrumbs
N-->>U: Display updated navigation
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (1)
src/main/webapp/i18n/de/repository.json (1)
35-49
: Consider using consistent German terminology.The translations mix English and German terms. Consider using German terms consistently:
- "Assignment-Repository" → "Aufgaben-Repository"
- "Template-Repository" → "Vorlagen-Repository"
- "userRepository": { - "title": "Assignment-Repository" - }, - "templateRepository": { - "title": "Template-Repository" + "userRepository": { + "title": "Aufgaben-Repository" + }, + "templateRepository": { + "title": "Vorlagen-Repository"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/main/webapp/app/shared/layouts/navbar/navbar.component.ts
(6 hunks)src/main/webapp/i18n/de/repository.json
(1 hunks)src/main/webapp/i18n/en/repository.json
(1 hunks)src/test/javascript/spec/component/shared/navbar.component.spec.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
`src/main/webapp/**/*.ts`: angular_style:https://angular.io/...
src/main/webapp/app/shared/layouts/navbar/navbar.component.ts
`src/test/javascript/spec/**/*.ts`: jest: true; mock: NgMock...
src/test/javascript/spec/**/*.ts
: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}
src/test/javascript/spec/component/shared/navbar.component.spec.ts
`src/main/webapp/i18n/de/**/*.json`: German language transla...
src/main/webapp/i18n/de/**/*.json
: German language translations should be informal (dutzen) and should never be formal (sietzen). So the user should always be addressed with "du/dein" and never with "sie/ihr".
src/main/webapp/i18n/de/repository.json
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: Call Build Workflow / Build and Push Docker Image
- GitHub Check: Call Build Workflow / Build .war artifact
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: client-tests
- GitHub Check: server-tests
- GitHub Check: Analyse
🔇 Additional comments (5)
src/test/javascript/spec/component/shared/navbar.component.spec.ts (1)
697-728
: LGTM! Well-structured test suite for repository breadcrumbs.The test suite effectively covers all repository types using parameterized tests, making it maintainable and comprehensive.
Some notable strengths:
- Uses
it.each
for concise testing of multiple cases- Verifies both URL and label for each repository type
- Consistent assertion pattern across all test cases
src/main/webapp/app/shared/layouts/navbar/navbar.component.ts (3)
409-414
: LGTM! Well-organized translation keys.The new translation keys follow the established naming pattern and are properly organized.
531-536
: LGTM! Proper handling of USER and AUXILIARY repositories.The implementation correctly handles repositories with IDs by adding appropriate translation crumbs.
971-992
: LGTM! Well-implemented repository breadcrumb logic.The
addRepositoryViewBreadcrumb
method:
- Handles repository types consistently
- Uses proper switch-case structure
- Has clear documentation
src/main/webapp/i18n/en/repository.json (1)
36-50
: LGTM! Clear and consistent translations.The English translations follow a consistent pattern and are clearly understandable.
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.
code looks good, but there seems to be an issue with the script determining whether translations are consistent. it seems that the translation keys are not correctly picked up (always starting with a dot)
aah good point, there was a mistake in the indentation of the translation .json files. Fixed it 👍 |
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.
code looks good after adapting translation files 👍
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.
Code lgtm
Checklist
General
Client
Motivation and Context
The breadcrumbs for the repository view are not working correctly.
Description
Fixes the breadcrumbs for the repository view.
Steps for Testing
Exam Mode Testing
Check the breadcrumbs work for exam routes too.
Testserver States
You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.
Review Progress
Code Review
Manual Tests
Test Coverage
Screenshots
Summary by CodeRabbit