Skip to content

Add landscape composite horizon directions and annotation toggle#22

Merged
c0d3rb4b4 merged 2 commits into
mainfrom
codex/add-sun-visibility-toggle-and-direction-markings
Feb 27, 2026
Merged

Add landscape composite horizon directions and annotation toggle#22
c0d3rb4b4 merged 2 commits into
mainfrom
codex/add-sun-visibility-toggle-and-direction-markings

Conversation

@c0d3rb4b4
Copy link
Copy Markdown
Owner

Motivation

  • Improve landscape composite UX by hiding sun/moon when below the horizon, showing compass/horizon direction markings, and providing a single control to toggle all composite annotations (markings, direction labels, and shot numbers).
  • Make composite rendering observer-aware so horizon/direction markings align to sampled sun azimuth/altitude where observer coordinates are available.

Description

  • Add observer-aware metadata to placements in buildLandscapeCompositeLayout: sunAltitudeDeg, sunAzimuthDeg, and isAboveHorizon, and use these to suppress sun/moon rendering when below horizon (file: apps/mobile/src/utils/photographyGuide.ts).
  • Add a 16-point compass marker set and compute horizon-aligned ticks in the composite modal; only markers falling inside the frame are shown (file: apps/mobile/src/screens/PhotographyGuideScreen.tsx).
  • Add a showCompositeMarkings toggle button in the landscape composite modal that shows/hides horizon ticks, compass labels, shot index tags, and clamp indicators (file: apps/mobile/src/screens/PhotographyGuideScreen.tsx).
  • Update composite render flow to skip drawing sun/moon for placements where isAboveHorizon is false and to conditionally render shot numbers/clamp indicators based on the toggle; add supporting styles.
  • Add a unit test that verifies observer-aware layouts expose azimuth/altitude metadata and correctly flag below-horizon placements (file: apps/mobile/tests/photography-guide.test.ts).

Testing

  • Ran the photography guide unit tests with pnpm -C apps/mobile test tests/photography-guide.test.ts, and all tests passed (including the new regression): success.
  • Ran TypeScript check with pnpm -C apps/mobile typecheck, and typechecking completed with no errors: success.

Codex Task

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown

Copilot AI left a 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 improves the Photography Guide “Landscape composite” modal by making the composite observer-aware (sun azimuth/altitude), adding horizon/compass direction annotations, and introducing a single toggle to show/hide composite annotations.

Changes:

  • Extend landscape composite placements with sunAltitudeDeg, sunAzimuthDeg, and isAboveHorizon, and use them to suppress below-horizon rendering.
  • Add 16-point compass direction ticks/labels aligned to the MAX sun azimuth, plus a modal toggle to show/hide composite annotations.
  • Add a unit test covering observer-aware placement metadata and horizon-flagging; bump mobile version and update changelog.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
apps/mobile/src/utils/photographyGuide.ts Adds observer-aware sun azimuth/altitude metadata and an isAboveHorizon flag to composite placements (plus fallback computation).
apps/mobile/src/screens/PhotographyGuideScreen.tsx Renders horizon compass markers and adds a UI toggle to show/hide composite annotations; suppresses rendering for below-horizon placements.
apps/mobile/tests/photography-guide.test.ts Adds a regression test asserting observer-aware layouts expose azimuth/altitude and below-horizon flags.
apps/mobile/package.json Bumps @eclipse-timer/mobile version to 1.1.38.
CHANGELOG.md Documents the new composite markings/toggle and below-horizon suppression behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<View
style={[
styles.compositeDirectionTick,
{ top: activeCompositeHorizonY - 6 },
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The horizon compass marker wrapper is offset by left: marker.x - 10, but the tick has no horizontal offset within that wrapper, so the tick renders ~10px left of the intended azimuth line while the label is centered. Consider centering the tick on marker.x (e.g., by offsetting the tick inside the wrapper or changing the wrapper positioning strategy) so tick and label align.

Suggested change
{ top: activeCompositeHorizonY - 6 },
{ top: activeCompositeHorizonY - 6, left: 10 },

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex check this

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Fixed the horizon compass tick alignment in the landscape composite overlay by adding a horizontal offset (left: 10) to the tick style, so each tick now centers on the same azimuth line as its corresponding label. apps/mobile/src/screens/PhotographyGuideScreen.tsxL456-L468
  • Committed the change on the current branch with message: Fix horizon marker tick centering in composite overlay.

Testing

  • pnpm -C apps/mobile typecheck
  • ⚠️ Screenshot not captured: this is a React Native mobile screen change and there is no runnable browser target in this environment to render PhotographyGuideScreen via the browser tool.

View task →

Comment thread apps/mobile/src/screens/PhotographyGuideScreen.tsx
Comment on lines +37 to +39
const LANDSCAPE_HORIZONTAL_FOV_DEG_24MM = 74;
const COMPASS_MARKERS = [
{ label: "N", azimuthDeg: 0 },
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

LANDSCAPE_HORIZONTAL_FOV_DEG_24MM is defined here and also in apps/mobile/src/utils/photographyGuide.ts (same value). Duplicating this constant risks the UI compass markers drifting out of sync with the layout math if one side changes. Consider exporting the FOV constant from the utils module (or a shared constants module) and reusing it here.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex Consider this

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

Testing

  • pnpm -C apps/mobile test tests/photography-guide.test.ts
  • pnpm -C apps/mobile typecheck
  • ⚠️ N/A (React Native screen change; browser screenshot capture is not applicable in this environment)

View task →

Comment on lines +57 to +60
function normalizeSignedDeltaDeg(fromDeg: number, toDeg: number) {
const delta = ((toDeg - fromDeg + 540) % 360) - 180;
return delta === -180 ? 180 : delta;
}
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

normalizeSignedDeltaDeg duplicates the same function in apps/mobile/src/utils/photographyGuide.ts. To avoid subtle divergence in angle wrap behavior between layout computation and compass marker placement, consider exporting and reusing a single implementation.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex check this

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Comment thread apps/mobile/src/screens/PhotographyGuideScreen.tsx
Comment thread apps/mobile/tests/photography-guide.test.ts
@c0d3rb4b4 c0d3rb4b4 merged commit fde93b5 into main Feb 27, 2026
5 checks passed
@c0d3rb4b4 c0d3rb4b4 deleted the codex/add-sun-visibility-toggle-and-direction-markings branch February 27, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants