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

Refactor map to sky map #291

Merged
merged 13 commits into from
Dec 18, 2024
Merged

Refactor map to sky map #291

merged 13 commits into from
Dec 18, 2024

Conversation

raniabbrk
Copy link
Contributor

Pull Request Description:

Description:
This PR updates the Bottom Navigation Menu to improve the user experience and visual clarity by introducing a new icon for the Sky Map feature. It also refactors the navigation bar to support both ImageVector and Painter-based icons, ensuring more design flexibility.

Changes:

  1. Added Sky Map Icon:

    • Added skymap_icon to the R.drawable resource folder.
    • This icon visually represents the Sky Map destination.
  2. Updated Bottom Navigation Menu:

    • Refactored the BottomNavigationMenu to dynamically handle both ImageVector and drawable resource icons (Painter).
    • Ensures proper size (34.dp) and color tint (white) for consistent appearance.
  3. Updated Top-Level Destinations:

    • Modified TopLevelDestinations to use iconResource for the Sky Map tab instead of an ImageVector.
  4. Improved Code Flexibility:

    • The navigation menu now supports both vector-based icons and drawable images seamlessly.

This Change:

  • Enhances the UI/UX by adding a visually distinct icon for the Sky Map.
  • Improves the Bottom Navigation Menu's flexibility to accommodate various icon types.
  • Aligns with modern Compose practices for handling icons.

Issue Reference:
Closes #262

…r flexible icons

- Renamed all references of 'Map' to 'Sky Map' to improve clarity and align with feature requirements.
- Updated `TopLevelDestination` to support both `ImageVector` and `PainterResource` for icons.
- Modified `SKY_MAP` to use a drawable resource `R.drawable.skymap_icon` as its icon.

These changes ensure the navigation reflects the updated naming and enable greater flexibility in icon selection for top-level destinations.
- Renamed the navigation route from 'Map' to 'Sky Map' in `NavHost` setup.
- Updated the `Screen.SKY_MAP` route to align with the new naming convention.
- Refactored the `MapScreen` to be displayed under the `Sky Map` route.
…Map'

- Updated the `selectedItem` in `BottomNavigationMenu` to reference `Route.SKY_MAP`.
- Ensured consistency with the refactor from "Map" to "Sky Map" across the application.
- Adjusted string resources and navigation routes to reflect the new name.

This change aligns the navigation destination for the sky map screen with the updated naming convention, improving clarity for users and developers.
- Updated the clickable modifier on the LandingScreen background to navigate to `Screen.SKY_MAP`.
- Changed the navigation action from "Map" to "Sky Map" for consistency with updated naming conventions.
- Ensured all references to "Map" in the LandingScreen are aligned with the refactored route and screen name.
…hanges

- Updated `navigateTo` tests to reflect the renaming of the route from "Map" to "Sky Map".
- Adjusted assertions to ensure navigation to `Route.SKY_MAP` instead of the previous "Map".
- Verified that the top-level destinations list includes `TopLevelDestinations.SKY_MAP`.
- Ensured correct options are set when navigating to the 'Sky Map' route using argument captors.
…d Painter icons

- Updated the `BottomNavigationMenu` to dynamically load icons based on their type:
  - If `iconVector` is provided, display an `Icon` with the specified ImageVector.
  - If `iconResource` is provided, use a `painterResource` to display a drawable image.
- Applied a color tint (white) to ensure visual consistency across all icons.
- Adjusted icon size to `34.dp` for better alignment and usability.
- Added a new drawable resource `skymap_icon` to represent the Sky Map feature.
- The icon will be used in the bottom navigation menu to visually distinguish the Sky Map destination.
@raniabbrk raniabbrk self-assigned this Dec 18, 2024
… descriptions

- Updated test tags and text descriptions referencing 'map' to 'sky map' to align with the recent renaming.
… descriptions

- Updated test tags and text descriptions referencing 'map' to 'sky map' to align with the recent renaming.
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@Kenzoud Kenzoud self-requested a review December 18, 2024 13:38
Copy link
Contributor

@Kenzoud Kenzoud left a comment

Choose a reason for hiding this comment

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

Good job on refactoring the "Map" to "SkyMap", this new title presents the functionality better and the new icon looks good! Approved for merge.

@Kenzoud Kenzoud merged commit 607a979 into main Dec 18, 2024
2 of 3 checks passed
@Kenzoud Kenzoud deleted the refactor/map-to-sky-map branch December 18, 2024 13:42
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.

Refactor map to sky map
2 participants