-
-
Notifications
You must be signed in to change notification settings - Fork 78
feat: background support in popups #1152
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
Conversation
This reverts commit 23418f8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for displaying Pokemon background/location card visuals in popups. The implementation includes a new data field for background IDs, visual styling logic, and UI components to render backgrounds with appropriate theming.
- Adds
backgroundfield to Pokemon, quest rewards, and showcase entries throughout the stack (database schema checks, GraphQL types, backend models) - Introduces
usePokemonBackgroundVisualshook to compute visual metadata (colors, shadows, styles) based on background ID and location card masterfile data - Implements
BackgroundCardwrapper component to apply themed backgrounds with tooltips - Updates Pokemon, Pokestop, and Gym popups to display background visuals
- Upgrades uicons.js from 2.1.0 to 2.2.0
Reviewed Changes
Copilot reviewed 18 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates uicons.js dependency from 2.1.0 to 2.2.0 |
| package.json | Updates uicons.js version in dependencies |
| src/store/useMemory.js | Adds locationCards and routeTypes to masterfile state |
| src/services/queries/pokemon.js | Adds background field to Pokemon GraphQL query |
| src/services/Assets.js | Implements getBackground() method to resolve background image URLs |
| src/hooks/usePokemonBackgroundVisuals.js | New hook providing background visual computation logic |
| src/components/popups/BackgroundCard.jsx | New component wrapping content with background theming and tooltips |
| src/components/popups/GenderIcon.jsx | Simplifies by removing explicit theme color (now inherits from parent) |
| src/features/pokemon/PokemonPopup.jsx | Integrates background visuals with themed wrapper |
| src/features/pokestop/PokestopPopup.jsx | Adds background support for quest rewards and showcase entries |
| src/features/gym/GymPopup.jsx | Implements background visuals for gym defenders |
| src/components/Global.jsx | Updates popup styles for padding and overflow |
| src/assets/css/main.css | Adds showcase entry display styles |
| server/src/services/DbManager.js | Adds hasPokemonBackground schema check |
| server/src/models/Pokemon.js | Conditionally selects background column when available |
| server/src/graphql/typeDefs/scanner.graphql | Adds background field to Pokemon type |
| server/src/filters/pokemon/Backend.js | Includes background in Pokemon result object |
| packages/types/lib/server.d.ts | Adds hasPokemonBackground to DbContext interface |
| packages/types/lib/scanner.d.ts | Adds optional background field to Pokemon interface |
| packages/masterfile/lib/index.d.ts | Adds MasterfileLocationCard interface and masterfile fields |
| packages/locales/lib/human/en.json | Adds unknown_background_with_id translation key |
| AGENTS.md | Adds spacing discipline guideline |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 22 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 22 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 17 out of 21 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/features/pokestop/PokestopPopup.jsx:1
- [nitpick] The data attribute value should be a string 'true', not a boolean. Use
data-background-icon=\"true\"(which is already correct) or consider using a more semantic attribute name likedata-background-styled.
// @ts-check
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# [1.40.0-develop.20](v1.40.0-develop.19...v1.40.0-develop.20) (2025-10-30) ### Features * background support in popups ([#1152](#1152)) ([3354ef7](3354ef7))
|
🎉 This PR is included in version 1.40.0-develop.20 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.