Skip to content

Conversation

dmitrysulman
Copy link
Contributor

There are a couple of issues with the feature-scroll attribute in the Antora docs:

  • The endif::[] for the Offset-based Window table row is placed incorrectly:
    ifdef::feature-scroll[]
    | Offset-based `Window<T>`
    | `limit + 1` at `OffsetScrollPosition.getOffset()`
    | One to many queries fetching data starting at `OffsetScrollPosition.getOffset()` applying limiting.
    a| A `Window` can only navigate to the next `Window`.
    endif::[]
    * `Window` provides details whether there is more data to fetch.
    * Offset-based queries becomes inefficient when the offset is too large because the database still has to materialize the full result.

    This causes the table to break when feature-scroll is not set:
Screenshot 2025-03-29 at 22 02 53
  • Defining :feature-scroll: true in index.adoc has no effect because attributes set on one page are not visible to other pages. Additionally, setting the attribute value to true is redundant — ifdef blocks are evaluated based on whether the attribute is defined, regardless of its value (source).

As a result, Scroll API-related content is always hidden in the documentation.

This PR fixes the above by explicitly defining the :feature-scroll: attribute in the two pages where it's used:

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 29, 2025
@dmitrysulman
Copy link
Contributor Author

Overriding this attribute for a specific spring-data- project can be done by unsetting the attribute at the Antora playbook level.

@mp911de mp911de self-assigned this Apr 7, 2025
@mp911de mp911de added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 7, 2025
@mp911de mp911de added this to the 3.3.12 (2024.0.12) milestone May 9, 2025
@mp911de
Copy link
Member

mp911de commented May 9, 2025

Thank you for your contribution. That's merged, polished, and backported now. In query-method-details, we rather want to keep opt-in as the majority of modules doesn't support scrolling (window) queries.

@mp911de mp911de closed this May 9, 2025
mp911de pushed a commit that referenced this pull request May 9, 2025
mp911de added a commit that referenced this pull request May 9, 2025
Use dynamic copyright year. Disable feature-scroll by default on query method details to let modules opt-in.

See #3262
mp911de pushed a commit that referenced this pull request May 9, 2025
mp911de added a commit that referenced this pull request May 9, 2025
Use dynamic copyright year. Disable feature-scroll by default on query method details to let modules opt-in.

See #3262
mp911de pushed a commit that referenced this pull request May 9, 2025
mp911de added a commit that referenced this pull request May 9, 2025
Use dynamic copyright year. Disable feature-scroll by default on query method details to let modules opt-in.

See #3262
mp911de added a commit that referenced this pull request May 9, 2025
Add missing Antora property.

See #3262
mp911de added a commit that referenced this pull request May 9, 2025
Add missing Antora property.

See #3262
mp911de added a commit that referenced this pull request May 9, 2025
Add missing Antora property.

See #3262
mp911de pushed a commit that referenced this pull request May 9, 2025
mp911de added a commit that referenced this pull request May 9, 2025
Use dynamic copyright year. Disable feature-scroll by default on query method details to let modules opt-in.

See #3262
mp911de added a commit that referenced this pull request May 9, 2025
Add missing Antora property.

See #3262
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants