Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace reading order indices with HREFs in the EPUB viewport#624

Merged
mickael-menu merged 1 commit intodevelopfrom
adjust-viewport
Jul 1, 2025
Merged

Replace reading order indices with HREFs in the EPUB viewport#624
mickael-menu merged 1 commit intodevelopfrom
adjust-viewport

Conversation

Copy link
Member

mickael-menu commented Jul 1, 2025

Replace reading order indices with HREFs in the EPUB viewport, to stay consistent with our other APIs which use HREFs instead of an index.

mickael-menu requested a review from Copilot July 1, 2025 15:55
mickael-menu temporarily deployed to LCP July 1, 2025 15:55 -- with GitHub Actions Inactive
mickael-menu temporarily deployed to LCP July 1, 2025 15:55 -- with GitHub Actions Inactive
Copilot AI reviewed Jul 1, 2025
Copy link

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 replaces reading order indices with HREF values for the EPUB viewport, aligning the API with other parts of the system.

  • Replaces the reading order indices and progressions dictionary keys with HREFs.
  • Introduces a mapping for visible reading order resources to associate indices with their corresponding HREFs.
Comments suppressed due to low confidence (2)

Sources/Navigator/EPUB/EPUBNavigatorViewController.swift:635

  • [nitpick] Consider renaming the tuple variable 'i' to a more descriptive name (e.g., 'resource') to enhance code readability.
progressions: visibleReadingOrder.reduce([:]) { progressions, i in

Sources/Navigator/EPUB/EPUBNavigatorViewController.swift:136

  • Confirm that the updated comment clearly conveys that the array contains HREFs rather than indices, to maintain consistency with the API design.
/// Visible reading order resources.

mickael-menu merged commit 54eb768 into develop Jul 1, 2025
5 checks passed
mickael-menu deleted the adjust-viewport branch July 1, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants