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

Add an optimizer library to score tracks #203

Merged
merged 21 commits into from
Jun 4, 2024

Conversation

flyingtof
Copy link
Collaborator

@flyingtof flyingtof commented May 24, 2024

Summary by CodeRabbit

  • New Features

    • Added a new GitHub link for flyingtof in the About modal.
    • Introduced a computeScore method for optimized route scoring.
    • Updated the optimize function in the optimizer library for enhanced performance.
  • Bug Fixes

    • Corrected property access in PlannerElement from this.score.distance to this.score.distanceM.
  • Refactor

    • Refactored scoring logic in PathElement for better readability and efficiency.
    • Updated variable names in handleUpload method for clarity.
  • Documentation

    • Added contribution guidelines in CONTRIBUTING.md.
  • Chores

    • Updated various dependencies in package.json to their latest versions.
    • Added new configurations for Babel, ESLint, and TypeScript in the optimizer library.
    • Updated Docker configuration files for better environment setup.

@christophe-taret-zenika christophe-taret-zenika force-pushed the feat/use-optimizer-in-xc-planning branch 2 times, most recently from 577a05e to 3e47dae Compare May 24, 2024 16:27
Copy link
Owner

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR
I'll complete the review the next non-flying day :)

apps/fxc-front/src/app/logic/score/scorer.ts Outdated Show resolved Hide resolved
apps/fxc-front/vite.config.ts Outdated Show resolved Hide resolved
docker/docker-compose.yml Show resolved Hide resolved
libs/optimizer/src/index.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.spec.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.ts Outdated Show resolved Hide resolved
@flyingtof
Copy link
Collaborator Author

Tell me if it's ok for you.
I would like to stabilize this code because the more I modify it, the more the code for the next PR is less easy to rebase.

@vicb
Copy link
Owner

vicb commented May 28, 2024

Tell me if it's ok for you. I would like to stabilize this code because the more I modify it, the more the code for the next PR is less easy to rebase.

Yep the best is to pause worked based on this until it gets merged.
It doesn't have to be perfect to be merged but we should at least have a clear view about what is ok and what need to be updated later (i.e. TODOs).

I should be able to review tomorrow.

Thanks a lot!

@flyingtof flyingtof mentioned this pull request May 28, 2024
@flyingtof
Copy link
Collaborator Author

@vicb do you have any idea why the tests fails on optimizer lib? I can not reproduce the problem locally (a nicer way to say WOMM ;-) )

@flyingtof
Copy link
Collaborator Author

@vicb do you have any idea why the tests fails on optimizer lib? I can not reproduce the problem locally (a nicer way to say WOMM ;-) )

issue created #209

@christophe-taret-zenika christophe-taret-zenika force-pushed the feat/use-optimizer-in-xc-planning branch 4 times, most recently from aa443ca to a7d7eb2 Compare May 29, 2024 07:53
@vicb vicb changed the title feat: use optimizer in xc planning Add an optimizer library to score tracks May 29, 2024
apps/fxc-front/vite.config.ts Outdated Show resolved Hide resolved
@vicb
Copy link
Owner

vicb commented Jun 2, 2024

The issue with the hack for 3d is:

  1. it breaks the routing
  2. it doesn't fix the root cause and the bug can still hit back in a future update on other part of the code

So I'm -1 on using this commit.
The correct fix is for igc-xc-score to move away from using the collections package which pollutes the global namespace. See mmomtchev/igc-xc-score#234.

@flyingtof
Copy link
Collaborator Author

The issue with the hack for 3d is:

  1. it breaks the routing
  2. it doesn't fix the root cause and the bug can still hit back in a future update on other part of the code

So I'm -1 on using this commit. The correct fix is for igc-xc-score to move away from using the collections package which pollutes the global namespace. See mmomtchev/igc-xc-score#234.

I agree that this hack, as almost every hack, has drawbacks. It permit to have something that works for the user vs an application that can't ne used.
I agree that it introduce a technical debt.
I agree that it is a temporary solution, but is easy to revert when root cause disappear.
But when switching to 3D mode, why does the application loads a library that

  • it has already loaded somewhere
  • it actually even does not need in 3D mode
  • require modifications in that library to work in flyxc context. Does it means that the problem may occur again when using other libraries?
    I think that the root cause is more in this loading mechanism. But that's beyond my knowledge to solve such an issue.

@vicb
Copy link
Owner

vicb commented Jun 2, 2024

  • it has already loaded somewhere
  • it actually even does not need in 3D mode

Switching to 3D mode does not reload igc-xc-score (I guess it is what you mean). The correct way to think about it is that it doesn't unload it when switching to 3D. What flyxc does in this case is that it removes the 2D map and replaces it with the component holding the 3D map.

However when igc-xc-score was first loaded (in 2D mode) then the collections dep polluted the global namespace by changing builtin types prototype (see the issue on igc-xc-score).

It turns out that the changes done by collections are not compatible with the ArcGIS JS SDK used for the 3D map.

What your hack does is that it fully reload the page (instead of just swapping the 2D component for the 3D component). In this case the igc-xc-score lib is not loaded as it's a dep of the 2D only.

  • require modifications in that library to work in flyxc context. Does it means that the problem may occur again when using other libraries?

It's a problem with any library polluting the global namespace.
Having a transitive dep on collections might cause other issue that we are not aware today and might cause issues later when any dep is updated.

collections is used only for Map and SortedSet in igc-xc-score, it should be easy to swap them for an implementation that does not pollute the global namespace.

@vicb vicb force-pushed the feat/use-optimizer-in-xc-planning branch from 46e2fd0 to ba76ae2 Compare June 3, 2024 10:10
Copy link

coderabbitai bot commented Jun 3, 2024

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

95 files out of 152 files are above the max files limit of 50. Please upgrade to Pro plan to get higher limits.

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

Walkthrough

The recent changes encompass a wide range of updates, including refactoring scoring logic, introducing new methods and types, updating configurations, and enhancing documentation. Key updates include modifications to the PathElement and PlannerElement classes, restructuring league definitions, and updating scoring rules. Additionally, various configuration files and dependencies have been updated, and new testing and optimization functionalities have been introduced in the optimizer library.

Changes

File/Directory Change Summary
CONTRIBUTING.md Introduced guidelines for contributing to the project.
apps/fxc-front/src/app/components/2d/path-element.ts Refactored scoring logic, introduced computeScore method, updated imports.
apps/fxc-front/src/app/components/2d/planner-element.ts Updated property access from this.score.distance to this.score.distanceM.
apps/fxc-front/src/app/components/ui/about-modal.ts Added a new GitHub link for flyingtof.
apps/fxc-front/src/app/components/ui/main-menu.ts Updated handleUpload method to use HTMLInputElement type and renamed variables for clarity.
apps/fxc-front/src/app/components/ui/pref-modal.ts Updated imports and usage to include LEAGUE_CODES.
apps/fxc-front/src/app/logic/score/league/leagues.ts Restructured league definitions, introduced LeagueCode type, added getScoringRuleName function.
apps/fxc-front/src/app/logic/score/scorer.ts Updated Score class properties and simplified scoreTriangles function.
apps/fxc-front/src/app/redux/planner-slice.ts Updated league property type from string to LeagueCode.
apps/fxc-front/vite.config.ts Added a new global object {} in the define section.
docker/.env Added COMPOSE_PROJECT_NAME variable set to flyxc.
docker/docker-compose.yml Defined services for launching Docker images with specific configurations.
libs/optimizer/.babelrc Introduced Babel preset configuration using @nx/js/babel.
libs/optimizer/.eslintrc.json Introduced ESLint configurations for TypeScript, JavaScript, and JSON files.
libs/optimizer/README.md Described the optimizer library and its optimize function.
libs/optimizer/jest.config.ts Configured Jest for testing the optimizer library.
libs/optimizer/project.json Defined linting and testing configurations using Nx for the optimizer project.
libs/optimizer/src/index.ts Introduced new exports for optimizer functions and types.
libs/optimizer/src/lib/optimizer.spec.ts Added test cases for scoring rules in the optimizer module.
libs/optimizer/src/lib/optimizer.ts Introduced functionality for optimizing flight tracks and defined related interfaces and functions.
libs/optimizer/src/lib/scoring-rules.ts Introduced scoring rules for various competitions and exported related types and functions.
libs/optimizer/src/lib/utils/create-segments.ts Added createSegments function to generate a track with segments.
libs/optimizer/src/lib/utils/merge-tracks.ts Added mergeTracks function to merge multiple tracks.
libs/optimizer/tsconfig.json Updated to extend a base configuration and reference additional configuration files.
libs/optimizer/tsconfig.lib.json Introduced configuration settings for TypeScript compilation.
libs/optimizer/tsconfig.spec.json Introduced configuration settings for TypeScript compilation specific to testing.
nx.json Added new TypeScript compilation configuration with caching enabled.
package.json Updated various dependencies and added new ones.
tsconfig.base.json Added new path mapping for @flyxc/optimizer to libs/optimizer/src/index.ts.

Poem

In the code where logic thrives,
Paths and leagues take new drives.
Optimizer's wings now soar,
Scores refined, rules galore.
Docker's ship set to sail,
Contributions without fail.
CodeRabbit cheers, with joy so bright,
For changes made, a coder's delight! 🐇✨


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

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

Copy link

@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: 19

Outside diff range and nitpick comments (4)
apps/fxc-front/src/app/redux/planner-slice.ts (1)

Line range hint 11-25: The use of LeagueCode for the league property enhances type safety. Consider using strict equality for comparisons.

- if (route.length == 0) {
+ if (route.length === 0) {
Tools
Biome

[error] 3-4: All these imports are only used as types.


[error] 4-5: All these imports are only used as types.

apps/fxc-front/src/app/components/ui/about-modal.ts (1)

Line range hint 75-75: Consider specifying a type for the window object to improve type safety when accessing custom properties.

- (window as any).klaro?.show();
+ (window as { klaro: { show: () => void } }).klaro?.show();
apps/fxc-front/src/app/components/2d/path-element.ts (2)

Line range hint 110-110: Replace == with === to avoid type coercion issues.

- if (this.encodedRoute.length == 0) {
+ if (this.encodedRoute.length === 0) {

Using === ensures that both the type and value are checked, which is safer and prevents potential bugs due to type coercion.

Also applies to: 175-175, 206-206, 208-208, 242-242, 276-276

Tools
Biome

[error] 17-18: Some named imports are only used as types.


[error] 18-19: All these imports are only used as types.


Line range hint 195-267: Optimize the optimize and computeScore methods for better performance and clarity.

Consider refactoring these methods to separate concerns more clearly and improve readability. For instance, breaking down the optimize method into smaller, more focused methods could make the code easier to understand and maintain.

Tools
Biome

[error] 276-276: Use === instead of ==.
== is only allowed when comparing against null

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 17a915d and ba76ae2.

Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (29)
  • CONTRIBUTING.md (1 hunks)
  • apps/fxc-front/src/app/components/2d/path-element.ts (6 hunks)
  • apps/fxc-front/src/app/components/2d/planner-element.ts (1 hunks)
  • apps/fxc-front/src/app/components/ui/about-modal.ts (1 hunks)
  • apps/fxc-front/src/app/components/ui/main-menu.ts (1 hunks)
  • apps/fxc-front/src/app/components/ui/pref-modal.ts (2 hunks)
  • apps/fxc-front/src/app/logic/score/league/leagues.ts (1 hunks)
  • apps/fxc-front/src/app/logic/score/scorer.ts (1 hunks)
  • apps/fxc-front/src/app/redux/planner-slice.ts (3 hunks)
  • apps/fxc-front/vite.config.ts (1 hunks)
  • docker/.env (1 hunks)
  • docker/docker-compose.yml (1 hunks)
  • libs/optimizer/.babelrc (1 hunks)
  • libs/optimizer/.eslintrc.json (1 hunks)
  • libs/optimizer/README.md (1 hunks)
  • libs/optimizer/jest.config.ts (1 hunks)
  • libs/optimizer/project.json (1 hunks)
  • libs/optimizer/src/index.ts (1 hunks)
  • libs/optimizer/src/lib/optimizer.spec.ts (1 hunks)
  • libs/optimizer/src/lib/optimizer.ts (1 hunks)
  • libs/optimizer/src/lib/scoring-rules.ts (1 hunks)
  • libs/optimizer/src/lib/utils/create-segments.ts (1 hunks)
  • libs/optimizer/src/lib/utils/merge-tracks.ts (1 hunks)
  • libs/optimizer/tsconfig.json (1 hunks)
  • libs/optimizer/tsconfig.lib.json (1 hunks)
  • libs/optimizer/tsconfig.spec.json (1 hunks)
  • nx.json (1 hunks)
  • package.json (4 hunks)
  • tsconfig.base.json (1 hunks)
Files skipped from review due to trivial changes (11)
  • docker/.env
  • docker/docker-compose.yml
  • libs/optimizer/.babelrc
  • libs/optimizer/.eslintrc.json
  • libs/optimizer/jest.config.ts
  • libs/optimizer/project.json
  • libs/optimizer/tsconfig.json
  • libs/optimizer/tsconfig.lib.json
  • libs/optimizer/tsconfig.spec.json
  • package.json
  • tsconfig.base.json
Additional context used
Biome
libs/optimizer/src/lib/utils/merge-tracks.ts

[error] 15-15: Use === instead of ==.
== is only allowed when comparing against null


[error] 1-1: All these imports are only used as types.

libs/optimizer/src/lib/utils/create-segments.ts

[error] 1-1: All these imports are only used as types.

apps/fxc-front/src/app/logic/score/league/leagues.ts

[error] 1-1: All these imports are only used as types.

apps/fxc-front/src/app/redux/planner-slice.ts

[error] 60-60: Use === instead of ==.
== is only allowed when comparing against null


[error] 1-1: Some named imports are only used as types.


[error] 3-4: All these imports are only used as types.


[error] 4-5: All these imports are only used as types.

apps/fxc-front/vite.config.ts

[error] 11-11: Unexpected any. Specify a different type.

apps/fxc-front/src/app/components/ui/about-modal.ts

[error] 75-75: Unexpected any. Specify a different type.


[error] 1-1: Some named imports are only used as types.

libs/optimizer/src/lib/scoring-rules.ts

[error] 21-21: The computed expression can be simplified without the use of a string literal.


[error] 105-105: The computed expression can be simplified without the use of a string literal.


[error] 111-111: The computed expression can be simplified without the use of a string literal.

apps/fxc-front/src/app/components/ui/pref-modal.ts

[error] 24-26: Prefer for...of instead of forEach.


[error] 1-1: Some named imports are only used as types.


[error] 8-9: Some named imports are only used as types.

libs/optimizer/src/lib/optimizer.ts

[error] 91-91: Use === instead of ==.
== is only allowed when comparing against null


[error] 130-130: Forbidden non-null assertion.


[error] 146-146: Use === instead of ==.
== is only allowed when comparing against null


[error] 170-170: Unexpected any. Specify a different type.


[error] 201-201: Unexpected any. Specify a different type.


[error] 208-208: Unexpected any. Specify a different type.


[error] 257-257: Forbidden non-null assertion.


[error] 2-3: Some named imports are only used as types.


[error] 3-4: All these imports are only used as types.


[error] 4-5: Some named imports are only used as types.


[error] 122-122: Reassigning a function parameter is confusing.

apps/fxc-front/src/app/components/2d/planner-element.ts

[error] 208-208: The assignment should not be in an expression.


[error] 220-220: Use === instead of ==.
== is only allowed when comparing against null


[error] 1-1: Some named imports are only used as types.


[error] 6-7: All these imports are only used as types.


[error] 9-10: Some named imports are only used as types.

apps/fxc-front/src/app/components/2d/path-element.ts

[error] 80-82: Prefer for...of instead of forEach.


[error] 110-110: Use === instead of ==.
== is only allowed when comparing against null


[error] 116-118: Prefer for...of instead of forEach.


[error] 175-175: Use === instead of ==.
== is only allowed when comparing against null


[error] 206-206: Use === instead of ==.
== is only allowed when comparing against null


[error] 206-206: Use === instead of ==.
== is only allowed when comparing against null


[error] 208-208: Use === instead of ==.
== is only allowed when comparing against null


[error] 242-242: Use === instead of ==.
== is only allowed when comparing against null


[error] 242-242: Use === instead of ==.
== is only allowed when comparing against null


[error] 276-276: Use === instead of ==.
== is only allowed when comparing against null


[error] 314-314: The assignment should not be in an expression.


[error] 3-4: All these imports are only used as types.


[error] 4-5: Some named imports are only used as types.


[error] 17-18: Some named imports are only used as types.


[error] 18-19: All these imports are only used as types.

libs/optimizer/src/lib/optimizer.spec.ts

[error] 8-180: Prefer for...of instead of forEach.


[error] 23-178: Prefer for...of instead of forEach.


[error] 1-1: Some named imports are only used as types.


[error] 1-2: Some named imports are only used as types.

apps/fxc-front/src/app/components/ui/main-menu.ts

[error] 255-255: Prefer for...of instead of forEach.


[error] 306-306: Use === instead of ==.
== is only allowed when comparing against null


[error] 557-557: Unexpected any. Specify a different type.


[error] 564-564: Unexpected any. Specify a different type.


[error] 653-653: Use === instead of ==.
== is only allowed when comparing against null


[error] 683-683: Use === instead of ==.
== is only allowed when comparing against null


[error] 1-2: Some named imports are only used as types.


[error] 2-3: Some named imports are only used as types.


[error] 6-7: All these imports are only used as types.


[error] 12-13: Some named imports are only used as types.


[error] 16-25: Some named imports are only used as types.


[error] 28-29: Some named imports are only used as types.

LanguageTool
libs/optimizer/README.md

[uncategorized] ~9-~9: Possible missing article found.
Context: ...ptimizer.ts#optimizefunction computes score of a given track given by aScoringTra...


[grammar] ~9-~9: Did you mean the possessive pronoun “its”?
Context: ...oringTrackfor a given league known by it'sLeagueCode. The optimize` function ...


[uncategorized] ~13-~13: “an” (indefinite article before a vowel sound) seems less likely than “and” (in addition to, following this).
Context: ...equestdescribing containing the track an some options. It returns anIterator<...

CONTRIBUTING.md

[grammar] ~15-~15: There seems to be a noun/verb agreement error. Did you mean “adds” or “added”?
Context: ...## Project setup - run npm install - add default keys definitions - `cp apps/f...

Markdownlint
CONTRIBUTING.md

21-21: null
Emphasis used instead of a heading


25-25: null
Emphasis used instead of a heading


29-29: null
Emphasis used instead of a heading

Additional comments not posted (24)
libs/optimizer/src/index.ts (3)

1-1: Export of getOptimizer and CircuitType looks good.


2-2: Type exports are correctly defined and useful for external integrations.


3-3: Export of scoring rules related types and constants is well-implemented.

apps/fxc-front/src/app/logic/score/scorer.ts (3)

1-1: Import of CircuitType is correctly utilized in the Score class.


4-8: Property definitions in the Score class are clear and appropriately typed.


12-17: Constructor implementation is robust, using modern JavaScript features to handle defaults effectively.

apps/fxc-front/src/app/logic/score/league/leagues.ts (1)

3-46: League definitions and utility functions are well-implemented and provide a robust way to handle different leagues and their scoring rules.

CONTRIBUTING.md (3)

3-10: The list of required tools is comprehensive and well-detailed.


33-46: The installation instructions for the Datastore emulator are clear and well-detailed.


49-51: The provided commands are useful for developers to ensure code quality before PR submission.

nx.json (1)

25-29: The configuration for TypeScript under "@nx/js:tsc" is correctly set up and consistent with other configurations.

apps/fxc-front/src/app/components/ui/about-modal.ts (1)

23-24: The addition of new contributors is correctly implemented.

apps/fxc-front/src/app/components/ui/pref-modal.ts (1)

11-11: LGTM! Import change aligns with the PR's objectives to handle league configurations.

libs/optimizer/src/lib/optimizer.ts (1)

1-1: Good reminder to replace console logs with a proper logging library in the future.

apps/fxc-front/src/app/components/2d/planner-element.ts (1)

142-142: LGTM! Using distanceM aligns with the PR's objectives to handle units more accurately.

apps/fxc-front/src/app/components/2d/path-element.ts (1)

48-48: Ensure consistent use of state management.

The use of @state() for league is consistent with other state properties in this component, which is good for maintainability.

apps/fxc-front/src/app/components/ui/main-menu.ts (8)

Line range hint 1-1: The class structure and logic within MainMenu appear well-organized and maintainable.


Line range hint 1-1: The AirspaceItems class is well-implemented with appropriate use of LitElement's directives for conditional rendering.


Line range hint 1-1: The SkywaysItems class is well-implemented with appropriate use of LitElement's directives for conditional rendering.


Line range hint 1-1: The ViewItems class is well-implemented with appropriate use of LitElement's directives for conditional rendering.


Line range hint 1-1: The FullScreenItems class is well-implemented with appropriate use of LitElement's directives for conditional rendering.


Line range hint 1-1: The TrackItems class is well-implemented with appropriate use of LitElement's directives for conditional rendering.


Line range hint 1-1: The LiveTrackItems class is well-implemented with appropriate use of LitElement's directives for conditional rendering.


Line range hint 1-1: Verify the impact of maybeHideSidePane on other parts of the application.

apps/fxc-front/src/app/components/2d/path-element.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.spec.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.spec.ts Outdated Show resolved Hide resolved
libs/optimizer/src/lib/optimizer.ts Show resolved Hide resolved
libs/optimizer/src/lib/scoring-rules.ts Show resolved Hide resolved
libs/optimizer/src/lib/utils/create-segments.ts Outdated Show resolved Hide resolved
libs/optimizer/README.md Outdated Show resolved Hide resolved
libs/optimizer/README.md Outdated Show resolved Hide resolved
apps/fxc-front/src/app/logic/score/league/leagues.ts Outdated Show resolved Hide resolved
Repository owner deleted a comment from flyingtof Jun 3, 2024
Repository owner deleted a comment from coderabbitai bot Jun 3, 2024
Repository owner deleted a comment from coderabbitai bot Jun 3, 2024
@vicb vicb mentioned this pull request Jun 3, 2024
Repository owner deleted a comment from coderabbitai bot Jun 3, 2024
@vicb
Copy link
Owner

vicb commented Jun 3, 2024

I have pushed more changes to the PR.

igc-xc-score is now invoked from a worker so that we can workaround the global namespace issue more easily. We still need to drop the barrel file (index.ts) because importing the enum from there in fxc-front still causes the issue. That should be easy to do.

I have also added more info to the SocringResult.

Hopefully we can merge this tomorrow!

@vicb
Copy link
Owner

vicb commented Jun 3, 2024

@coderabbitai generate interesting stats about this repository and render them as a table.

Copy link

coderabbitai bot commented Jun 3, 2024

Tip

For best results, initiate chat on the files or code changes.

@vicb, here are some interesting statistics about the repository:

Metric Value
Number of Authors 7
Total Commits 678
Total Lines of Code 138,915
Number of Open Issues 30

These metrics provide a snapshot of the repository's current state, including contributions, codebase size, and ongoing issues.

Analysis chain
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Count the number of authors in the codebase.
git shortlog -sn --all | wc -l
# Count the total number of commits.
git rev-list --all --count
# Count the number of lines of code in the codebase.
tokei --output json
# Count the number of open issues using GitHub CLI.
gh issue list --repo vicb/flyxc --state open --json number --jq 'length'

Length of output: 76545

Repository owner deleted a comment from flyingtof Jun 4, 2024
@vicb vicb merged commit 5a34bf7 into vicb:master Jun 4, 2024
4 checks passed
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