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

[develop] Add ROM favorites and history tabs to file browser #168

Merged
merged 46 commits into from
Jan 4, 2025

Conversation

thegouldfish
Copy link

@thegouldfish thegouldfish commented Dec 4, 2024

Description

Contains the code required for showing history and favourites.

There are now 3 tabs at the top of the browser display: Files, History, Favorites.

When you launch a game, either rom or disk, the file path for those will be written out to an ini file called history.ini,
which can then be reloaded quickly from the History tab

Roms and Disks can be added as favorites.
Select the rom or Disk as normal, then bring up the options menu (R).
an option to "add to favorites" will be on the new list.
Those can then be selected from the favorites tab.

Currently there are limits to the number of history and favorites and that is set to 8.

Motivation and Context

Issue request for last game history and favorites from the menu GUI.

How Has This Been Tested?

Tested locally on Supercart 64 & SummerCart64,
Tested last loading just a rom, just a disk and a disk and rom
Tested History, loading rom, disk and rom and disk.
Tested favorites using F-Zero X and expansion.

Screenshots

Types of changes

  • Improvement (non-breaking change that adds a new feature)
  • Bug fix (fixes an issue)
  • Breaking change (breaking change)
  • Documentation Improvement
  • Config and build (change in the configuration and build system, has no impact on code or features)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>

Moved the Load last game and favorites with menu into the branch
Both history and last game works for roms and 64dd games
Giving a bit more space between the lines of history
Copy link

coderabbitai bot commented Dec 4, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.


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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

Removing the empty entry that snuck in
Fixing up ordering
@networkfusion
Copy link
Collaborator

networkfusion commented Dec 4, 2024

linked to #164 and #81

networkfusion and others added 6 commits December 4, 2024 14:09
Moved add to favorite to the options context menu
refactored most of the history / favorite code to now be "bookkeeping".
this now uses a common struct to hold the required paths and the record type (to open up future work for emus).
Users can remove favorites via the menu
Updated the tabs so they fill the top of the screen.
renamed files and variables to better match the new naming
@networkfusion
Copy link
Collaborator

All comments are for discussion... not a review...

@thegouldfish thegouldfish marked this pull request as ready for review December 23, 2024 21:54
@thegouldfish
Copy link
Author

Only thing really missing at the moment is being able to favorite 64DD games.
There was talk of updating the 64DD screen to move around a few of the options so we could have a context menu that the add would be put in (currently the only thing).
to make it match the rom screen.

@networkfusion networkfusion added the enhancement New feature or request label Dec 23, 2024
@networkfusion networkfusion changed the title History develop [develop] Add ROM favorites and history to file browser Dec 23, 2024
@networkfusion networkfusion added this to the v2.0 milestone Dec 24, 2024
networkfusion and others added 28 commits December 30, 2024 15:21
load_history and load_favorite are cleaned when going into the load-disk screen to stop a loop.
other bits of code cleaned up.
* Update various function code styles to match the rest of the menu.
* Added some function documentation.
* Changed tab placement.
* Updated tab colour.
* Changed action bar layout to match rest of menu structure.
Fixed issue with not finding the first item
Fixing looking up rom path with the wrong variable
Improve text
Documentation improvements
Fixing the context menu so the text sits in the middle again.
Updated the scroll bar height to take into account the border
updating to 8 favorites and history items
Increases ROMs displayed in menu by 1
Aligning information text
improve tab context
@networkfusion networkfusion changed the title [develop] Add ROM favorites and history to file browser [develop] Add ROM favorites and history tabs to file browser Jan 4, 2025
@networkfusion networkfusion merged commit 0375789 into Polprzewodnikowy:develop Jan 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants