Skip to content

Add prev and next button to navigate through different pages - #2511

Merged
ssddanbrown merged 1 commit into
masterfrom
unknown repository
May 29, 2021
Merged

ssddanbrown merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jan 27, 2021

Copy link
Copy Markdown
  • Added feature to navigate through the different pages.

  • This will help the user to navigate through different pages without scrolling above and clicking on the page.

  • User can directly switch to the next page from the bottom of the page.

  • This feature will be more helpful if the user using mobile/tab then, the user doesn't have to switch to the info tab from the content tab to view the next page.
    bookstack1

  • After the implementation of this feature user can view the next or previous page without switching to the info tab from the content tab.

bookstack2

Prev and Next button functionality can be seen in the attached video below:

bookstack-prev-new.1.mp4

@Wookbert

Wookbert commented Feb 2, 2021

Copy link
Copy Markdown

I'm actually using both my own, simple implementation and @james-geiger’s implementation from #1381 in parallel for quite some time now, and have come to the conclusion that previewing the page titles as he does, is really handy (yes, the page titles of the current book are also displayed in the sidebar, but when you've reached the end of the page, your focus is ... well, on the end of the page).

His rather large buttons work also well, as they distinguish themselves from the actual content. One could argue if one could decrease the height by a few pixels.

image

@ssddanbrown ssddanbrown added this to the Next Feature Release milestone May 29, 2021
@ssddanbrown ssddanbrown linked an issue May 29, 2021 that may be closed by this pull request
ssddanbrown added a commit that referenced this pull request May 29, 2021
- Updated styling to include item name.
- Extracted used text to translations.
- Updated the design to better suit the surrounding blocks.
- Removed newly added model/repo methods.
- Moved core logic out of controller and instead into a "NextPreviousContentLocator"
helper with re-uses the output from the book-tree generation.
- Also added the system to chapters.

For #2511
ssddanbrown added a commit that referenced this pull request May 29, 2021
@ssddanbrown
ssddanbrown merged commit 7ca66c5 into BookStackApp:master May 29, 2021
@ssddanbrown

Copy link
Copy Markdown
Member

Thanks for this @shubhamosmosys,
I have now reviewed this and made a series of changes in 0cfff6a, with some testing added in ed6ec34.

The design is now as shown below, This will appear on both page and chapter display pages.

Screenshot from 2021-05-29 12-54-19

This will be part of the next feature release.

@ssddanbrown

Copy link
Copy Markdown
Member

Also, Thanks @Wookbert for your input on the various implementations.

@Wookbert

Copy link
Copy Markdown

@ssddanbrown Excellent! Any chance you could add an optional single pixel frame (as @james-geiger did) or shaded background, so it has more of a button character rather than just a text link. Me and my colleague both think it makes the feature more obvious and more likely to be used.

@ssddanbrown

Copy link
Copy Markdown
Member

@Wookbert I've purposefully try to keep these links rather muted by default as to not be distracting or result in a series of boxes at the bottom of the page. They will currently show an outline when moused over, which could be force enabled by default by a line of custom head css if desired.

@Wookbert

Copy link
Copy Markdown

Ah, OK. Will inspect and if „necessary“ comment once released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Navigation at the End of the Page

2 participants