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

fix(obs): build #2722

Merged
merged 3 commits into from
Dec 9, 2024
Merged

fix(obs): build #2722

merged 3 commits into from
Dec 9, 2024

Conversation

jonathanfallon
Copy link
Member

@jonathanfallon jonathanfallon commented Dec 9, 2024

#fixes (issues)

Description

Checklist

Merge

Je squash la PR et vérifie que le message de commit utilise la convention d'Angular :

<type>(<scope>): <short summary>
  │       │             │
  │       │             └─⫸ Summary in present tense. Not capitalized. No period at the end.
  │       │
  │       └─⫸ Commit Scope: proxy|acquisition|export|...
  │
  └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test

Types de commit

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (examples: Github Actions)
  • docs: Documentation only changes
  • feat: A new feature (Minor bump)
  • fix: A bug fix (Patch bump)
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Adding missing tests or correcting existing tests

Le scope (optionnel) précise le module ou le composant impacté par le commit.

Summary by CodeRabbit

  • New Features

    • Enhanced period selection options with new components for month, semester, trimester, and year.
  • Bug Fixes

    • Improved error handling and loading states across various components.
  • Refactor

    • Transitioned from DashboardContext to useDashboardContext for accessing dashboard state, streamlining context management.
  • Documentation

    • Updated import statements and context usage across multiple components for clarity and consistency.

Copy link
Contributor

coderabbitai bot commented Dec 9, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces significant changes across multiple components and files, primarily focusing on the transition from using DashboardContext to a custom hook, useDashboardContext. This refactoring enhances how the dashboard state is accessed and managed, streamlining the components' code. The changes affect various components, including Dashboard, KeyFigures, and several graph and map components, all of which now utilize the new hook for context access. Import statements are updated accordingly, and the overall functionality of each component remains intact.

Changes

File Path Change Summary
public/src/app/observatoire/territoire/Dashboard.tsx Replaced DashboardContext with useDashboard hook for managing dashboard state.
public/src/app/observatoire/territoire/KeyFigures.tsx Updated to use useDashboardContext instead of DashboardContext.
public/src/app/observatoire/territoire/graphs/DistanceGraph.tsx Replaced context access with useDashboardContext.
public/src/app/observatoire/territoire/graphs/FluxGraph.tsx Updated to use useDashboardContext for accessing dashboard state.
public/src/app/observatoire/territoire/graphs/IncentiveGraph.tsx Switched to useDashboardContext for dashboard state access.
public/src/app/observatoire/territoire/graphs/OccupationGraph.tsx Changed to use useDashboardContext for retrieving dashboard data.
public/src/app/observatoire/territoire/graphs/RepartitionDistanceGraph.tsx Updated to use useDashboardContext for accessing dashboard state.
public/src/app/observatoire/territoire/graphs/RepartitionHoraireGraph.tsx Replaced context access with useDashboardContext.
public/src/app/observatoire/territoire/maps/AiresMap.tsx Updated to use useDashboardContext for accessing dashboard state.
public/src/app/observatoire/territoire/maps/DensiteMap.tsx Changed context access to useDashboardContext.
public/src/app/observatoire/territoire/maps/FluxMap.tsx Updated to use useDashboardContext for dashboard state access.
public/src/app/observatoire/territoire/maps/OccupationMap.tsx Replaced DashboardContext with useDashboardContext.
public/src/app/observatoire/territoire/tables/BestFluxTable.tsx Updated to use useDashboardContext instead of DashboardContext.
public/src/app/observatoire/territoire/tables/BestTerritoriesTable.tsx Changed to utilize useDashboardContext for accessing dashboard state.
public/src/components/observatoire/SelectIncentiveTerritory.tsx Updated to use useDashboardContext for dashboard access.
public/src/components/observatoire/SelectMonth.tsx Replaced DashboardContext with useDashboardContext.
public/src/components/observatoire/SelectObserve.tsx Updated to use useDashboardContext for dashboard state access.
public/src/components/observatoire/SelectPeriod.tsx Changed to utilize useDashboardContext instead of DashboardContext.
public/src/components/observatoire/SelectSemester.tsx Updated to use useDashboardContext for accessing dashboard state.
public/src/components/observatoire/SelectTerritory.tsx Replaced context access with useDashboardContext.
public/src/components/observatoire/SelectTrimester.tsx Updated to use useDashboardContext for dashboard state access.
public/src/components/observatoire/SelectYear.tsx Changed to utilize useDashboardContext instead of DashboardContext.
public/src/context/DashboardProvider.tsx Introduced useDashboardContext hook; updated context creation to handle undefined initial state.
public/src/helpers/api.ts Updated to use useDashboardContext for accessing dashboard parameters.
public/src/helpers/dashboard.ts Changed to use useDashboardContext for retrieving dashboard state.

Possibly related PRs

  • Fix/campaign obs #2614: Modifications to Dashboard.tsx, replacing SelectTerritory with SelectIncentiveTerritory, relevant to managing dashboard state.
  • Fix obs graph incitation #2627: Updates to IncentiveGraph and related components to utilize useDashboardContext, aligning with the main PR's changes.
  • Fix/build obs #2721: Changes to Dashboard.tsx to use useDashboard hook instead of DashboardContext, directly related to the main PR's focus.

🐇 "In the meadow where we play,
The dashboard's bright, come what may.
With hooks that guide us, clear and bright,
We hop along, our future's light.
No more context, just pure delight,
In every graph, our data's insight!" 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8e4e68b and f1ac74e.

⛔ Files ignored due to path filters (1)
  • public/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (25)
  • public/src/app/observatoire/territoire/Dashboard.tsx (2 hunks)
  • public/src/app/observatoire/territoire/KeyFigures.tsx (1 hunks)
  • public/src/app/observatoire/territoire/graphs/DistanceGraph.tsx (2 hunks)
  • public/src/app/observatoire/territoire/graphs/FluxGraph.tsx (2 hunks)
  • public/src/app/observatoire/territoire/graphs/IncentiveGraph.tsx (1 hunks)
  • public/src/app/observatoire/territoire/graphs/OccupationGraph.tsx (2 hunks)
  • public/src/app/observatoire/territoire/graphs/RepartitionDistanceGraph.tsx (1 hunks)
  • public/src/app/observatoire/territoire/graphs/RepartitionHoraireGraph.tsx (1 hunks)
  • public/src/app/observatoire/territoire/maps/AiresMap.tsx (1 hunks)
  • public/src/app/observatoire/territoire/maps/DensiteMap.tsx (1 hunks)
  • public/src/app/observatoire/territoire/maps/FluxMap.tsx (1 hunks)
  • public/src/app/observatoire/territoire/maps/OccupationMap.tsx (2 hunks)
  • public/src/app/observatoire/territoire/tables/BestFluxTable.tsx (2 hunks)
  • public/src/app/observatoire/territoire/tables/BestTerritoriesTable.tsx (2 hunks)
  • public/src/components/observatoire/SelectIncentiveTerritory.tsx (1 hunks)
  • public/src/components/observatoire/SelectMonth.tsx (1 hunks)
  • public/src/components/observatoire/SelectObserve.tsx (1 hunks)
  • public/src/components/observatoire/SelectPeriod.tsx (1 hunks)
  • public/src/components/observatoire/SelectSemester.tsx (1 hunks)
  • public/src/components/observatoire/SelectTerritory.tsx (1 hunks)
  • public/src/components/observatoire/SelectTrimester.tsx (1 hunks)
  • public/src/components/observatoire/SelectYear.tsx (1 hunks)
  • public/src/context/DashboardProvider.tsx (1 hunks)
  • public/src/helpers/api.ts (2 hunks)
  • public/src/helpers/dashboard.ts (1 hunks)

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?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 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 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.

@jonathanfallon jonathanfallon merged commit e2dfe09 into main Dec 9, 2024
10 checks passed
@jonathanfallon jonathanfallon deleted the fix/build_obs branch December 9, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants