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

Feat/link and tags #368

Merged
merged 5 commits into from
Sep 10, 2024
Merged

Feat/link and tags #368

merged 5 commits into from
Sep 10, 2024

Conversation

Kilerd
Copy link
Collaborator

@Kilerd Kilerd commented Sep 10, 2024

Summary by CodeRabbit

  • New Features

    • Upgraded Mantine packages to enhance functionality and performance.
    • Improved ReportGraph component for better financial data visualization.
    • Enhanced TableViewTransactionLine for managing journal tags and links, increasing interactivity.
    • Added state management for journal tags and links in the Journals component.
    • Introduced new functionality for filtering journal entries based on tags and links.
  • Bug Fixes

    • Adjusted tooltip calculations in ReportGraph for accurate financial representation.
  • Documentation

    • Updated validation rules for API responses to ensure data integrity.
  • Tests

    • Added integration tests for new transaction functionalities and validation criteria.

Copy link

coderabbitai bot commented Sep 10, 2024

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The pull request encompasses updates across multiple files, primarily focusing on enhancing state management for journal tags and links, refining chart data handling, and updating dependencies. Key changes include the introduction of new state atoms for tags and links, modifications to the ReportGraph component for improved data visualization, and the addition of validation rules for API responses. The dependency updates specifically target Mantine packages, ensuring the frontend utilizes the latest features and fixes.

Changes

Files Change Summary
frontend/package.json Updated Mantine packages from version 7.9.1 to 7.12.0.
frontend/src/components/ReportGraph.tsx Simplified amount calculation in ChartTooltip, adjusted total_domain initialization, streamlined dataset mapping, and updated chart configuration to use withRightYAxis.
frontend/src/components/journalLines/tableView/TableViewTransactionLine.tsx Introduced state management for journal tags and links, added click handlers for tags and links, and modified layout to use Stack for better organization.
frontend/src/pages/Journals.tsx Integrated state management for journal tags and links, added functions to remove tags and links, and updated rendering logic to display tags and links as Pill components.
frontend/src/states/journals.ts Added journalTagsAtom and journalLinksAtom for managing tags and links, and updated journalFetcher to include these in API requests.
integration-tests/should_txn_support_filter_by_payee_narration/main.zhang Added a new transaction entry for a payee labeled "MC" on "2023-12-02".
integration-tests/should_txn_support_filter_by_payee_narration/validations.json Modified validation criteria to expect at least two records and postings instead of one.
integration-tests/should_txn_support_filter_by_tags_and_links/main.zhang Established a framework for transactions with tags and links, including entries for "KFC" and "MC" on "2023-12-02".
integration-tests/should_txn_support_filter_by_tags_and_links/validations.json Defined validation rules for API responses related to journal entries, specifying expected record counts based on query parameters.
zhang-core/src/store/mod.rs Modified TransactionDomain struct to include a new match_keywords method for flexible matching of keywords, tags, and links.
zhang-server/Cargo.toml Added serde_qs dependency for handling query string serialization and deserialization.
zhang-server/src/request.rs Enhanced JournalRequest struct with new fields for tags and links.
zhang-server/src/routes/mod.rs Introduced a new Query<T> struct for handling query parameters, utilizing serde_qs for deserialization.
zhang-server/src/routes/transaction.rs Updated the get_journals function to use the new match_keywords method for filtering transactions based on keywords, tags, and links.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant JournalsPage
    participant JournalRequest
    participant API

    User->>JournalsPage: Interacts with tags/links
    JournalsPage->>JournalRequest: Update state with tags/links
    JournalRequest->>API: Fetch journals with updated parameters
    API-->>JournalRequest: Return filtered journal entries
    JournalRequest-->>JournalsPage: Provide journal data
    JournalsPage-->>User: Display updated journal entries
Loading

🐰 "In the garden of code, we hop with glee,
New tags and links, as bright as can be!
With charts that dance and data that sings,
A joyful update, oh, what joy it brings!
Let's celebrate with a hop and a cheer,
For every change, we hold so dear!" 🐇


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

@Kilerd
Copy link
Collaborator Author

Kilerd commented Sep 10, 2024

@coderabbitai review

Copy link

coderabbitai bot commented Sep 10, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

coderabbitai bot commented Sep 10, 2024

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

Commits

Files that changed from the base of the PR and between dbb65e8 and c5105fa.

Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (14)
  • frontend/package.json (1 hunks)
  • frontend/src/components/ReportGraph.tsx (4 hunks)
  • frontend/src/components/journalLines/tableView/TableViewTransactionLine.tsx (4 hunks)
  • frontend/src/pages/Journals.tsx (4 hunks)
  • frontend/src/states/journals.ts (1 hunks)
  • integration-tests/should_txn_support_filter_by_payee_narration/main.zhang (1 hunks)
  • integration-tests/should_txn_support_filter_by_payee_narration/validations.json (4 hunks)
  • integration-tests/should_txn_support_filter_by_tags_and_links/main.zhang (1 hunks)
  • integration-tests/should_txn_support_filter_by_tags_and_links/validations.json (1 hunks)
  • zhang-core/src/store/mod.rs (4 hunks)
  • zhang-server/Cargo.toml (1 hunks)
  • zhang-server/src/request.rs (2 hunks)
  • zhang-server/src/routes/mod.rs (1 hunks)
  • zhang-server/src/routes/transaction.rs (3 hunks)
____________________________________________________
< It's dangerous to go alone! Take this code review. >
----------------------------------------------------
 \
  \   \
       \ /\
       ( )
     .( o ).

Tip

You can validate your CodeRabbit configuration file in your editor.

If your editor has YAML language server, you can enable auto-completion and validation by adding # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json at the top of your CodeRabbit configuration file.


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 10, 2024
@Kilerd Kilerd merged commit a46bd3c into main Sep 10, 2024
24 checks passed
@Kilerd Kilerd deleted the feat/link-and-tags branch September 10, 2024 13:27
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.

1 participant