Skip to content

Create book/chapter combined chooser component #2992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

siltomato
Copy link
Collaborator

@siltomato siltomato commented Feb 3, 2025

This is a draft for feedback for a combined book/chapter chooser similar to the one from Platform.Bible.

This combined chooser should offer faster selection for desktop users via book filtering and faster chapter selection. I'm not sure how the usability compares to the current book/chapter chooser on mobile devices, but one possibility is to continue to offer the current, split dropdown chooser for mobile devices via media query.

  • Type to filter book names.
  • Mouse or or keyboard navigate to book and chapter.
  • Click or Enter to select book and chapter.

You can see it in storybook:
https://644bffe327c540a62f0fd260-uantdiyvlk.chromatic.com/?path=/story/shared-book-chapter-combined-chooser--default


This change is Reviewable

@siltomato siltomato added the enhancement New feature or request label Feb 3, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.70%. Comparing base (2164ba8) to head (d978e10).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2992   +/-   ##
=======================================
  Coverage   82.70%   82.70%           
=======================================
  Files         563      563           
  Lines       32695    32695           
  Branches     5303     5303           
=======================================
  Hits        27041    27041           
- Misses       4859     4871   +12     
+ Partials      795      783   -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@josephmyers
Copy link
Collaborator

Neat! A few minor comments/suggestions:

  • Would be helpful to be able to "collapse" the open book to view all books more easily
  • Clicking on open space within the book above its chapters snaps your screen to the top, which may not be desirable all the time
  • Clicking on open space within a book after its chapters closes the dropdown

@siltomato siltomato force-pushed the idea/book-chapter-combined-component branch 3 times, most recently from a7b5e58 to 22dbe81 Compare March 11, 2025 00:43
Copy link
Collaborator Author

@siltomato siltomato left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestions! I implemented them, along with fixing some bugs.

Reviewable status: 0 of 9 files reviewed, all discussions resolved

@siltomato siltomato force-pushed the idea/book-chapter-combined-component branch from 0c9905a to d978e10 Compare March 11, 2025 02:35
@josephmyers
Copy link
Collaborator

What bugs, I wonder? Might be nice to have them documented here

Copy link
Collaborator

@josephmyers josephmyers left a comment

Choose a reason for hiding this comment

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

Haven't looked at the code, but this does work quite well in Storybook, in the limited testing available there. I'm interested to see it integrated. Good job so far!

Reviewable status: 0 of 9 files reviewed, all discussions resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants