Skip to content

Storybook: Eliminate scrollbar by moving what doesn't fit on the left page to the right page.#2592

Open
alcole2 wants to merge 5 commits into
mainfrom
1757-storybook-no-scrollbar
Open

Storybook: Eliminate scrollbar by moving what doesn't fit on the left page to the right page.#2592
alcole2 wants to merge 5 commits into
mainfrom
1757-storybook-no-scrollbar

Conversation

@alcole2

@alcole2 alcole2 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Currently, all StoryQuests are on the left page of the Storybook, using a scrollbar to see and navigate through them all. I have removed the scrollbar by having what doesn't fit in a no-scrollbar view of the left page moved to the right page. When there isn't enough space on either page, the use can flip the page and the remaining StoryQuests will be there.

Resolves #1757

@alcole2
alcole2 requested a review from a team as a code owner July 24, 2026 13:31
@alcole2 alcole2 linked an issue Jul 24, 2026 that may be closed by this pull request
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/1757-storybook-no-scrollbar/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@manuq manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This works very well! Have you tried this with dozens of entries? If so, how? It would be nice to have a way to mock a lot of entries for testing the book.

I left a suggestion about an unneeded variable, it's just a detail.

Please:

  • Use imperative for the title of the pull request. Something like "Storybook: Eliminate scrollbar..."
  • Add a description to the pull request
  • In the description, add "Resolves... " as last line with a link to the resolved issue.

Check https://github.com/endlessm/threadbare/wiki/Contributing#pull-request-descriptions for the convention details of the request above!

Comment thread scenes/menus/storybook/components/storybook.gd
Comment thread scenes/menus/storybook/components/storybook.gd Outdated
Comment thread scenes/menus/storybook/components/storybook.gd Outdated
Comment thread scenes/menus/storybook/components/storybook.gd Outdated
@alcole2 alcole2 changed the title Eliminating the Storybook scrollbar by moving what doesn't fit on the left page to the right page. Storybook: Eliminate scrollbar by moving what doesn't fit on the left page to the right page. Jul 24, 2026
@manuq

manuq commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

@alcole2 I tested this with the Template Elder which has a single quest, and this is what I see:

Grabacion.de.pantalla.desde.2026-07-24.11-15-35.mp4

@alcole2

alcole2 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Interesting, I think I know how to fix that!

@manuq

manuq commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Interesting, I think I know how to fix that!

Great, I have added a test scene with mock titles: #2593

Please review it, as it will be useful for this pull request. This is how your change looks like with 30 mock titles:

Grabacion.de.pantalla.desde.2026-07-24.11-38-15.mp4

And with six:

image

@alcole2

alcole2 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

I fixed it! Initially, I had moved the MarginContainer to the center of the book so everything would align properly when both sides of the book were needed, not realizing that it placed the StoryQuests in the middle of the book when there was 8 or less items. If the right page isn't needed, it wouldn't put any buttons on it and therefore it kind of didn't exist. I just changed it so that if there is 8 StoryQuests or less, it will basically fill up the right side with space so it still correctly aligns with the book.

I need to fix the rest of your changes and then update the pull request.

Question: Are the pages for each StoryQuest in the scene with mock titles blank simply because there isn't actually any information attached to them?

@manuq

manuq commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

I fixed it! Initially, I had moved the MarginContainer to the center of the book so everything would align properly when both sides of the book were needed, not realizing that it placed the StoryQuests in the middle of the book when there was 8 or less items. If the right page isn't needed, it wouldn't put any buttons on it and therefore it kind of didn't exist. I just changed it so that if there is 8 StoryQuests or less, it will basically fill up the right side with space so it still correctly aligns with the book.

I need to fix the rest of your changes and then update the pull request.

Question: Are the pages for each StoryQuest in the scene with mock titles blank simply because there isn't actually any information attached to them?

Yes, check the script in https://github.com/endlessm/threadbare/blob/cf8d301f78122f0c01468c771879ca2919df21d5/scenes/menus/storybook/components/storybook_test.gd

alcole2 and others added 4 commits July 24, 2026 11:27
Co-authored-by: Manuel Quiñones <manuq@endlessaccess.org>
Co-authored-by: Manuel Quiñones <manuq@endlessaccess.org>
Co-authored-by: Manuel Quiñones <manuq@endlessaccess.org>
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.

Storybook: List of stories does not fit on the page

2 participants