Skip to content

fix: Smart/Origin: several frontend hotfixes#4381

Merged
brunobesson merged 16 commits into
masterfrom
smart-origin/prod
Aug 4, 2025
Merged

fix: Smart/Origin: several frontend hotfixes#4381
brunobesson merged 16 commits into
masterfrom
smart-origin/prod

Conversation

@lgourdin

@lgourdin lgourdin commented Aug 1, 2025

Copy link
Copy Markdown
Contributor

This PR fixes the following issues:

  • Ticket 32: Le dernier trajet de la journée est désormais également affiché pour le trajet aller
  • Ticket 35: La limite de correspondances est désormais gardée entre l'allée et le retour
  • Ticket 37: Suppression du caractère ' dans le fichier de traduction qui empêchait la traduction de deux phrases
  • Ticket 38: Les encarts des TC ne sont désormais pas affichés si la route n'est pas en France
  • Ticket 39.a : Carte de l'encart TC + boutons non affichés si la route n'est pas desservie, afin d'économiser de la place
  • Ticket 39.b : L'encart TC est désormais pliable : si la route n'est pas desservie, alors l'encart est par défaut plié
  • Ticket 40 : Problème de fuseau horaire résolu, qui empêchait d'obtenir des résultats d'itinéraire à 00h (lot 2)
  • Ticket 41: Si l'encart TC est plié, alors il n'apparaît pas dans l'impression
  • Ticket 42: La carte est désormais centrée en mode mobile
  • Ticket 44: Résolution du problème d'affichage de la durée, de type 4h60 -> 5h00

Summary by CodeRabbit

  • New Features

    • Added new French translations for messages related to public transport accessibility and trip feasibility.
    • Introduced an accordion-style toggle for the public transport information section, enhancing user control over visibility.
  • Improvements

    • Updated warning and informational messages for clarity and correctness.
    • Improved layout and styling for better consistency, especially on mobile devices.
    • Enhanced trip planning logic for more accurate results and better handling of edge cases.
    • The public transport section now only appears for relevant locations (France) and when access waypoints are present.
  • Bug Fixes

    • Fixed grammatical errors in displayed messages.
    • Corrected duration formatting and improved no-result handling in trip planning.
  • Removals

    • Removed the public transport box from the waypoint view where it is no longer needed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 1, 2025
@coderabbitai

coderabbitai Bot commented Aug 1, 2025

Copy link
Copy Markdown

Walkthrough

The changes span translation additions, UI component logic, and styling updates related to public transport accessibility features. New English source strings with French translations were added. The TransportsBox component was refactored for conditional rendering, accordion behavior, and France-specific logic. The NearbyStopsSection and PlanATripSection components received logic, style, and messaging updates. The WaypointView template no longer includes the TransportsBox component.

Changes

Cohort / File(s) Change Summary
Translation Additions
src/translations/fr.json
Added three new English source strings with French translations related to public transport accessibility and trip feasibility.
Waypoint View Template Update
src/views/document/WaypointView.vue
Removed the <transports-box> component from the template; no other logic or structure changed.
Nearby Stops Section Logic & Style
src/views/document/utils/boxes/NearbyStopsSection.vue
Conditional CSS class for accessibility info, conditional map rendering, corrected warning messages for grammar and clarity, new watcher emitting accessibility-info-changed, updated styles for containers and map, improved mobile responsiveness.
Plan A Trip Section Logic & Style
src/views/document/utils/boxes/PlanATripSection.vue
Corrected displayed message, moved transfer limit properties to root data, removed related computed properties, rewrote datetime formatting, simplified no-result handling, improved duration formatting, updated journey steps and map container styling.
Transports Box Refactor
src/views/document/utils/boxes/TransportsBox.vue
Conditional rendering based on France location and access waypoint, new accordion toggle for content visibility, section-switching buttons shown only with accessibility info, watcher for syncing visibility, method for France check, style updates for accordion and buttons, removed hasSecondSection.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TransportsBox
    participant NearbyStopsSection
    participant PlanATripSection

    User->>TransportsBox: Loads document
    TransportsBox->>TransportsBox: checkIfInFrance() & checkAccessWaypoints()
    alt isInFrance && accessWaypoint
        TransportsBox->>User: Show accordion header
        User->>TransportsBox: Clicks header
        TransportsBox->>TransportsBox: Toggle visible
        alt showAccessibilityInfo
            TransportsBox->>User: Show section buttons
            User->>TransportsBox: Selects section
            alt activeSection == "nearby"
                TransportsBox->>NearbyStopsSection: Render
                NearbyStopsSection-->>TransportsBox: Emit accessibility-info-changed
            else activeSection == "plan"
                TransportsBox->>PlanATripSection: Render
            end
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇🌿
New strings hop in, with French so bright,
TransportsBox folds and unfolds just right.
Nearby stops whisper, maps come alive,
Trips planned with care, so journeys thrive.
A rabbit’s cheer for code refined,
In every line, a hop aligned!
🚍✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f866cb and 1396901.

📒 Files selected for processing (2)
  • src/translations/fr.json (3 hunks)
  • src/views/document/utils/boxes/PlanATripSection.vue (10 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/translations/fr.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/views/document/utils/boxes/PlanATripSection.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build (lts/*)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch smart-origin/prod

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests 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 to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@brunobesson brunobesson merged commit 3a85994 into master Aug 4, 2025
9 checks passed
@brunobesson brunobesson deleted the smart-origin/prod branch August 4, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants