Skip to content

feat(nbascores): add 2x support#410

Merged
gabe565 merged 1 commit intomainfrom
nbascores-2x
Mar 16, 2026
Merged

feat(nbascores): add 2x support#410
gabe565 merged 1 commit intomainfrom
nbascores-2x

Conversation

@gabe565
Copy link
Collaborator

@gabe565 gabe565 commented Mar 16, 2026

No description provided.

@gabe565 gabe565 requested a review from tavdog as a code owner March 16, 2026 07:14
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the NBA scores application by introducing full support for 2x resolution displays. The changes involve adapting the application's rendering logic to dynamically scale all visual components, from fonts and images to layout boxes, ensuring optimal display quality on higher-density screens. This upgrade improves the overall user experience by delivering crisper graphics and text without requiring manual configuration.

Highlights

  • 2x Display Support: Implemented logic to detect and render the application at 2x resolution, providing a sharper visual experience.
  • Dynamic UI Scaling: Introduced constants and calculations to dynamically scale various UI elements, including box dimensions, image sizes, and font sizes, based on the detected display resolution.
  • Manifest Update: Declared 2x support in the manifest.yaml file, enabling the application to leverage higher resolution displays.
  • Screenshot Update: Updated the README to reflect the new 2x resolution screenshot.
Changelog
  • apps/nbascores/README.md
    • Updated the screenshot reference to point to the 2x version.
  • apps/nbascores/manifest.yaml
    • Added supports2x: true to indicate compatibility with 2x displays.
  • apps/nbascores/nba_scores.star
    • Imported canvas from render.star to access display properties.
    • Defined global constants (WIDTH, HEIGHT, IS_2X, SCALE) for dynamic resolution detection and scaling.
    • Introduced new scaled constants for various UI dimensions (e.g., TOP_ROW_HEIGHT, COMPACT_ROW_HEIGHT, FULL_LOGO_SIZE) and font names (TEAM_FONT, SCORE_FONT, COMPACT_FONT, HEADER_FONT).
    • Replaced numerous hardcoded width and height values in render.Box and render.Image with dynamically calculated scaled values.
    • Updated font assignments to use the new scaled font constants.
    • Modified the get_logoSize function to apply the SCALE factor to logo dimensions.
Activity
  • No specific activity (comments, reviews, progress) was provided in the context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds 2x support. All hardcoded dimensions have been replaced with scaled constants. The manifest and documentation have been updated.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds 2x support by refactoring hardcoded dimensions and fonts to be scalable. The review identifies several 'magic numbers' introduced in layout calculations. These should be defined as named constants to improve readability and maintainability.

@gabe565 gabe565 merged commit 78e7df7 into main Mar 16, 2026
7 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.

1 participant